'Invalid cross-device link' message on sparc

Tim Conway conway at us.ibm.com
Mon Mar 15 14:47:40 GMT 2004

tmp/rsync/unusable_link-dest/dir/foo and dir/foo are on different 
filesystems.  --link-dest= makes hard links - new directory entries 
pointing at the same inodes.  Directory entries don't have any way to 
specify the device containing the filesystem.  It's assumed that it's the 
same device containing the directory.  symlinks can span devices, but they 
don't maintain a link count on the file, so deleting the original link 
takes the link count to 0 and frees the data, and also leaves the symlink 
as a "broken link".
If you want to use --link-dest, you will have to point to a place on the 
same filesystem containing the stuff you're linking.
     --link-dest=DIR         create hardlinks to DIR for unchanged files

Tim Conway
Unix System Administration
Contractor - IBM Global Services
conway at us.ibm.com

augustin at i90fs4:/tmp/rsync% /usr/local/rsync-20040311/bin/rsync -a -v 
--link-dest=/tmp/rsync/unusable_link-dest source/ dest
building file list ... done
created directory dest
link /tmp/rsync/unusable_link-dest/dir/foo => dir/foo : Invalid 
cross-device link

More information about the rsync mailing list