hard links on samba shares

Matt McCutchen matt at mattmccutchen.net
Fri Oct 23 01:23:02 MDT 2009


On Fri, 2009-10-23 at 09:15 +0200, Riccardo Iaconelli wrote:
> I'm encountering a bug with samba shares, rsync and hard links. I was trying 
> to investigate why on my "linksys" samba share i wouldn't get any hard link 
> transferred and rsyncs to it would take forever. To keep a long story short, 
> here's the output of the command, which should be pretty explanatory :-)
> 
> mount says that:
> //192.168.0.105/DISK on /samba/linksys type cifs (rw,mand)
> 
> 
> [root at popper linksys]# ls -lah test/*
> -rw-rw-r-- 2 502 501 4 2009-10-23 08:53 test/file1
> -rw-rw-r-- 2 502 501 4 2009-10-23 08:53 test/file2
> 
> [root at popper linksys]# rsync -avz --hard-links test/ test2/
> sending incremental file list
> ./
> file1
> file2
> 
> sent 146 bytes  received 53 bytes  398.00 bytes/sec
> total size is 8  speedup is 0.04
> 
> [root at popper linksys]# ls -lah test2/*
> -rw-rw-r-- 1 502 501 4 2009-10-23 08:53 test2/file1
> -rw-rw-r-- 1 502 501 4 2009-10-23 08:53 test2/file2
> 
> Is this a bug or just samba being not reliable for hard links? :-)

Probably the latter.  You can always strace rsync to check that it is
issuing the link(2) call and see what the result is.

-- 
Matt



More information about the rsync mailing list