Missing .isl file for general tablespace from backup

Bug #1658692 reported by Shahriyar Rzayev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Status tracked in 2.4
2.4
Fix Released
High
Vasily Nemkov

Bug Description

Creating general tablespace:

mysql> create tablespace out_datadir add datafile '/home/tablespace/out_datadir.ibd';
Query OK, 0 rows affected (0.03 sec)

# ls /var/lib/mysql | grep .isl
out_datadir.isl

Took backup using:

/usr/bin/xtrabackup --defaults-file=/etc/my.cnf --user=root --password='Baku12345#' --target-dir=/home/backup_dir/full/2017-01-23_17-40-54 --backup --host=127.0.0.1 --port=3306 --compress=quicklz --compress-chunk-size=65536 --compress-threads=4 --encrypt=AES256 --encrypt-key='VVTBwgM4UhwkTTV98fhuj+D1zyWoA89K' --encrypt-threads=4 --encrypt-chunk-size=65536

Looking for .isl file in backup_dir:

# ls 2017-01-23_17-40-54/
backup-my.cnf.qp.xbcrypt fff in_datadir.ibd.qp.xbcrypt performance_schema testing xtrabackup_logfile.qp.xbcrypt
ccc ib_buffer_pool.qp.xbcrypt mysql qptest xtrabackup_checkpoints.xbcrypt
dbtest ibdata1.qp.xbcrypt out_datadir.ibd.qp.xbcrypt sys xtrabackup_info.qp.xbcrypt

As a result if you prepare and copy-back backup then start MySQL:

2017-01-23T13:37:14.305679Z 0 [ERROR] InnoDB: A tablespace for `out_datadir` has been found in multiple places;
2017-01-23T13:37:14.305687Z 0 [ERROR] InnoDB: Default location: ./out_datadir.ibd, Space ID=72, Flags=2048
2017-01-23T13:37:14.305691Z 0 [ERROR] InnoDB: Dictionary location: /home/tablespace/out_datadir.ibd, Space ID=72, Flags=2048
2017-01-23T13:37:14.305694Z 0 [ERROR] InnoDB: Will not open tablespace `out_datadir`
2017-01-23T13:37:14.305704Z 0 [Warning] InnoDB: Ignoring tablespace `out_datadir` because it could not be opened.
2017-01-23T13:37:14.305824Z 0 [ERROR] InnoDB: A tablespace for `out_datadir` has been found in multiple places;
2017-01-23T13:37:14.305830Z 0 [ERROR] InnoDB: Default location: ./out_datadir.ibd, Space ID=72, Flags=2048
2017-01-23T13:37:14.305833Z 0 [ERROR] InnoDB: Dictionary location: /home/tablespace/out_datadir.ibd, Space ID=72, Flags=2048
2017-01-23T13:37:14.305836Z 0 [ERROR] InnoDB: Will not open tablespace `out_datadir`
2017-01-23T13:37:14.305844Z 0 [Warning] InnoDB: Ignoring tablespace `out_datadir` because it could not be opened.

The workaround is, removing general tablespace from outside directory, then the result will be:

2017-01-23T13:38:52.083484Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2017-01-23T13:38:52.083510Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2017-01-23T13:38:52.083513Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2017-01-23T13:38:52.083517Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: '/home/tablespace/out_datadir.ibd' OS error: 71
2017-01-23T13:38:52.089836Z 0 [Note] InnoDB: The InnoDB data dictionary table SYS_DATAFILES for tablespace ID 72 was updated to use file ./out_datadir.ibd.

Tags: qa
Revision history for this message
Vasily Nemkov (vasily.nemkov) wrote :

PR was merged to the 2.4

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-494

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.