XtraBackup SST doesn't work properly if innodb_data_home_dir and/or innodb_log_group_home_dir is set in my.cnf

Bug #1019288 reported by Peter Boros
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
New
Undecided
Unassigned
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Confirmed
Undecided
Unassigned

Bug Description

The wsrep_xtrabackup_sst script copies everything to datadir, and not to it's configured location.

mysql> select @@innodb_log_group_home_dir;
+-----------------------------+
| @@innodb_log_group_home_dir |
+-----------------------------+
| /innodb_log |
+-----------------------------+
1 row in set (0.00 sec)

mysql> select @@innodb_data_home_dir;
+------------------------+
| @@innodb_data_home_dir |
+------------------------+
| /innodb_data |
+------------------------+
1 row in set (0.00 sec)

At sst time, the sst finishes without errors.

At startup time, new, empty data files and transaction logs are created.

120629 9:38:15 [Note] WSREP: Shifting PRIMARY -> JOINER (TO: 42449)
120629 9:38:15 [Note] WSREP: Requesting state transfer: success, donor: 0
120629 9:38:53 [Note] WSREP: 0 (ip-10-112-39-98): State transfer to 1 (ip-10-244-33-92) complete.
120629 9:38:53 [Note] WSREP: Member 0 (ip-10-112-39-98) synced with group.

After that, since innodb_data_home_dir and innodb_log_group_home_dir is empty, innodb will create empty log and data files.

InnoDB: The first specified data file /innodb_data/ibdata1 did not exist:
InnoDB: a new database to be created!
120629 9:39:09 InnoDB: Setting file /innodb_data/ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
120629 9:39:09 InnoDB: Log file /innodb_log/ib_logfile0 did not exist: new to be created
InnoDB: Setting log file /innodb_log/ib_logfile0 size to 64 MB
InnoDB: Database physically writes the file full: wait...
120629 9:39:12 InnoDB: Log file /innodb_log/ib_logfile1 did not exist: new to be created
InnoDB: Setting log file /innodb_log/ib_logfile1 size to 64 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.

After this, the original tables are not accessible.

mysql> use sbtest;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+------------------+
| Tables_in_sbtest |
+------------------+
| sbtest |
+------------------+
1 row in set (0.00 sec)

mysql> show create table sbtest;
ERROR 1146 (42S02): Table 'sbtest.sbtest' doesn't exist
mysql> Bye
[root@ip-10-245-85-116 mysql]# tail ip-10-245-85-116.err
120629 9:46:03 [ERROR] Cannot find or open table sbtest/sbtest from
the internal data dictionary of InnoDB though the .frm file for the
table exists. Maybe you have deleted and recreated InnoDB data
files but have forgotten to delete the corresponding .frm files
of InnoDB tables, or you have moved .frm files to another database?
or, the table contains indexes that this version of the engine
doesn't support.
See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
how you can resolve the problem.

According to the cluster the node is up and should be able to serve data.

How to repeat:
- Start an xtradb cluster node with innodb_data_home_dir and innodb_log_group_home_dir pointing to a different location then the datadir.
- Add an other node to the cluster with the same configuration.

Peter Boros (pboros)
description: updated
description: updated
Peter Boros (pboros)
description: updated
Revision history for this message
Frederic Descamps (lefred) wrote :

When there no data on the new node, Innodb just created empty ibdata1 and iblog files in the location defined in my.cnf, so MySQL starts but it's wrong.
When there is already data but an SST is needed, MySQL will not boot has there is innodb corruption.

Changed in percona-xtradb-cluster:
status: New → Confirmed
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Reported a similar bug here -- lp:1098566

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.