xtrabackup SST fails if /tmp/test directory exists

Bug #1294760 reported by Alex Yurchenko on 2014-03-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
Undecided
Unassigned
5.6
Undecided
Unassigned
Percona XtraDB Cluster
Status tracked in 5.6
5.5
Undecided
Unassigned
5.6
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

Related branches

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.

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.

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.

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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers