hardlinks not working with inode number > 2^31
paul+rsync at wurtel.net
Sat Feb 2 12:34:11 GMT 2008
I've been using 3.0.0pre8 to move a Debian archive from one filesystem
to another. This archive contains a daily snapshot of the Debian ftp
site, with common files hardlinked to save space.
I noticed that it was using far more space than necessary. Upon
investigation it seems that all the source files that have inode numbers
greater than 2^31 aren't being hardlinked together at the destination.
XFS uses a sparse inode number distribution. Here is an ls -i of a
The files with 3239109xxx inodes aren't getting hardlinked.
Note that this is still less than 2^32, so should fit in an unsigned 32 bit int.
Note also that on large (>1TB) XFS filesystems on 64bit systems, a mount
option "inode64" is recommended, as otherwise inodes are only allocated
from the 1st 1TB space. This will reduce performance (the inodes are
then not always located near the data), and can also lead to not being
able to create new files if the 1st 1TB is full.
If rsync cannot currently cope with larger than 31bit inodes, than this
would need to be dealt with IMHO. It's not like larger than 1TB
filesystems are a rare thing nowadays, with single 3,5inch SATA disks
already available at 1TB sizes for very reasonable prices.
More information about the rsync