xtrabackup SST fails if /tmp/test directory exists

Bug #1294760 reported by Alex Yurchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
Fix Released
Undecided
Unassigned
5.6
Fix Released
Undecided
Unassigned
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Undecided
Unassigned
5.6
Fix Released
Undecided
Unassigned

Bug Description

For the moment reporting here. Not clear whether it is a bug in SST script or innobackupex.

140319 18:40:18 innobackupex: Starting to lock all tables...
>> log scanned up to (1595989)
140319 18:40:18 innobackupex: All tables locked and flushed to disk

140319 18:40:18 innobackupex: Starting to backup non-InnoDB tables and files
innobackupex: in subdirectories of '/dev/shm/galera0/mysql/var/'
innobackupex: Backing up files '/dev/shm/galera0/mysql/var//performance_schema/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (18 files)
innobackupex: Backing up files '/dev/shm/galera0/mysql/var//mysql/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (72 files)
innobackupex: Error: Failed to create directory /tmp/test: File exists at /usr/bin/innobackupex line 4043.
140319 18:40:19 innobackupex: Waiting for ibbackup (pid=14769) to finish
>> log scanned up to (1595989)
>> log scanned up to (1595989)
>> log scanned up to (1595989)
>> log scanned up to (1595989)
>> log scanned up to (1595989)
>> log scanned up to (1595989)
... and it goes on and on and on

Tags: sst xtrabackup

Related branches

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Yes, this is a bug in innobackupex:

innobackupex: Error: Failed to create directory /tmp/test: File exists at /usr/sbin/innobackupex line 4043.
140319 23:02:46 innobackupex: Waiting for ibbackup (pid=30894) to finish
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>> log scanned up to (6262436592)
>

 I will file a bug against PXB.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

This happens only when test database is empty (which is default for mysql) and a /tmp/test directory exists.

This needs to be fixed in innobackupex.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :
Revision history for this message
Alex Yurchenko (ayurchen) wrote :

So it looks like innobackupex is run with /tmp as an argument (default tmpdir?):

perl /usr/bin/innobackupex --defaults-file=/run/shm/galera0/mysql/etc/my.cnf --user=root --password=rootpass --socket=/dev/shm/galera0/mysql/var//mysqld.sock --galera-info --stream=tar /tmp

and tries to create schema directories right in /tmp. Perhaps specifying a different (and empty) tmpdir explicitly in my.cnf is a workaround.

Responsibility to create a dedicated empty directory inside tmpdir may belong with either innobackupex or SST script. Fixing SST is probably the right thing as it is responsible for the rest of the setup.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

It is not the temporary directory specified on command line at the end which is the problem:

perl /usr/bin/innobackupex --defaults-file=/run/shm/galera0/mysql/etc/my.cnf --user=root --password=rootpass --socket=/dev/shm/galera0/mysql/var//mysqld.sock --galera-info --stream=tar /tmp

It is the temporary directory which xtrabackup uses, passed in --tmpdir which is /tmp by default.

Anyways, I am thinking of working around this.

tags: added: sst xtrabackup
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/PXC-1654

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.