innobackupex does not copy back table files in subfolders from NFS mount

Bug #1003518 reported by Stefan Greiner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
Low
Alexey Kopytov
1.6
Won't Fix
Low
Unassigned
2.0
Fix Released
Low
Alexey Kopytov
2.1
Fix Released
Low
Alexey Kopytov

Bug Description

Hi there,

our situation:
MySQL Server on Debian Squeeze with percona-xtrabackup
Backup Fileserver: Windows 2008R2

Backups are created with innobackupex.
The backup target is a mounted folder via NFS from the WINDOWS Fileserver.
example: /nfs_folder/2012-05-23_16-14-39/

When I want to use --copy-back it only copies back the files directly under /nfs_folder/2012-05-23_16-14-39/ and not the files under /nfs_folder/2012-05-23_16-14-39/db_name/

Reason: innobackupex uses the find() function from the /usr/share/perl/5.10.1/File/Find.pm perl lib. This library has an optimization when running on linux to count the links under a folder. In Linux the count for a folder is greater or equal to 2. When it is 2 then perl running on linux thinks it has no subfolders because . and .. are the 2 ones. Any subfolder unter a common linux filesystem would increase that counter (e.g. with db_name folder it would be 3, with the mysql database it would be 4 and so on). BUT: the files and folders come from an NFS mount based on NTFS. That means: the counter is always 2. So there is no need to check for subfolders (It would be - but Perl thinks not)
You can see it when running in shell:
(Links will be 2)
stat /nfs_folder
stat /nfs_folder/2012-05-23_16-14-39/
(Links will be 2 + number of subfolders)
stat /home/user/aFolderWithFilesAndSubfolders

Solution: implement the following line of code to disable that optimization at the beginning (line 42) of innobackupex

$File::Find::dont_use_nlink=1;

Thank you so far.

Regards,
Stefan

Related branches

description: updated
description: updated
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Stefan,

Thank you so much for providing a detailed bug report and problem analysis.

description: updated
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-852

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.