Comment 0 for bug 1736380

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Hi,
Created general tablespace with relative path:

create tablespace out_rel_ts1 add datafile '../relative_path/out_rel_ts1.ibd' engine=innodb

I see out_rel_ts1.isl and out_rel_ts1.ibd file Inside datadir:

[shahriyar.rzaev@qaserver-02 full]$ pwd
/home/shahriyar.rzaev/XB_TEST/backup_dir/ps_5_7_x_2_4/cycle1/full

[shahriyar.rzaev@qaserver-02 full]$ ls 2017-12-05_10-12-27/
backup-my.cnf ibdata1 ibtmp1 out_rel_ts1.isl performance_schema test xtrabackup_binlog_pos_innodb xtrabackup_logfile
full_backup.stream ib_logfile0 mysql out_ts1.ibd sys ts1.ibd xtrabackup_checkpoints xtrabackup_slave_info
ib_buffer_pool ib_logfile1 out_rel_ts1.ibd out_ts1.isl sysbench_test_db xtrabackup_binlog_info xtrabackup_info

Trying to copy-back:

/home/shahriyar.rzaev/XB_TEST/server_dir/target/percona-xtrabackup-2.4.x-debug/bin/xtrabackup --copy-back --slave-info --no-version-check --core-file --parallel=10 --throttle=40 --check-privileges --keyring-file-data=/home/shahriyar.rzaev/XB_TEST/server_dir/PS041217-percona-server-5.7.20-18-linux-x86_64-debug/mysql-keyring/keyring --target-dir=/home/shahriyar.rzaev/XB_TEST/backup_dir/ps_5_7_x_2_4/cycle1/full/2017-12-05_10-12-27 --datadir=/home/shahriyar.rzaev/XB_TEST/server_dir/PS041217-percona-server-5.7.20-18-linux-x86_64-debug/node1
...
171205 10:18:07 [06] Copying ./out_rel_ts1.isl to /home/shahriyar.rzaev/XB_TEST/server_dir/PS041217-percona-server-5.7.20-18-linux-x86_64-debug/node1/out_rel_ts1.isl
171205 10:18:10 [04] Copying ./out_rel_ts1.ibd to ../relative_path/out_rel_ts1.ibd
...

As you see the .ibd file was copied to path relative to backup directory itself, not to relative path to datadir of MySQL:

[shahriyar.rzaev@qaserver-02 full]$ ls
2017-12-05_10-12-27 relative_path

If you start server after that:

2017-12-05T10:18:16.954937Z 0 [ERROR] InnoDB: Failed to find tablespace for table `sysbench_test_db`.`sbtest20` in the cache. Attempting to load the tablespace with spac
e id 72
2017-12-05T10:18:16.955015Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2017-12-05T10:18:16.955023Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2017-12-05T10:18:16.955038Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: '../relative_path/out_rel_ts1.ibd' OS error: 71
2017-12-05T10:18:16.955042Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2017-12-05T10:18:16.955045Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2017-12-05T10:18:16.955050Z 0 [ERROR] InnoDB: A link file was found named './out_rel_ts1.isl' but the linked tablespace '../relative_path/out_rel_ts1.ibd' could not be o
pened read-only.
2017-12-05T10:18:16.955056Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2017-12-05T10:18:16.955059Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2017-12-05T10:18:16.955063Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: '../relative_path/out_rel_ts1.ibd' OS error: 71
2017-12-05T10:18:16.955069Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2017-12-05T10:18:16.955072Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2017-12-05T10:18:16.955075Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './out_rel_ts1.ibd' OS error: 71
2017-12-05T10:18:16.955079Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2017-12-05T10:18:16.955082Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2017-12-05T10:18:16.955087Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `out_rel_ts1`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
10:18:16 UTC - mysqld got signal 11 ;