Fwd: hardlinking and -R (multiple source directories)

Kevin Korb kmk at sanitarium.net
Fri Aug 2 17:25:23 MDT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can you do a stat on both of the source file and confirm that they
have matching device numbers as well as inode numbers?

On 08/02/13 19:22, - wrote:
> Hi,
> 
> no same mountpoints. And doing a "synthetic"  test (two new
> directories) it works, even in the same simulated steps. (first
> sync dir1, then ad link after that sync dir1 and dir2 to dest (dir2
> is added to dest)
> 
> not so on my "real" data
> 
> Here is a file of "production" data::: src1:
> 
> ls -li 
> /mnt/hotswapo/storebackup/server_gen/2013.07.26_03.08.38/\$sortin_linux/natty_lirc_work/etc/fuse.conf
>
> 
219420238 -rw-r----- 124 root root 216 Feb 10  2011
> /mnt/hotswapo/storebackup/server_gen/2013.07.26_03.08.38/$sortin_linux/natty_lirc_work/etc/fuse.conf
>
>  src2: ls -li 
> /mnt/hotswapo/storebackup/server_gen/2013.07.27_03.08.46/\$sortin_linux/natty_lirc_work/etc/fuse.conf
>
> 
219420238 -rw-r----- 124 root root 216 Feb 10  2011
> /mnt/hotswapo/storebackup/server_gen/2013.07.27_03.08.46/$sortin_linux/natty_lirc_work/etc/fuse.conf
>
>  ->same inode (219420238)
> 
> doing the sync
> 
> rsync -RavhxSDHi --stats --progress server_gen/2013.07.27_03.08.46 
> server_gen/2013.07.26_03.08.38 /mnt/foo/
> 
> checking results:
> 
> lroot at mediapc:/mnt/foo/server_gen# ls -li 
> /mnt/foo/server_gen/2013.07.26_03.08.38/\$sortin_linux/natty_lirc_work/etc/fuse.conf
>
> 
868354 -rw-r----- 1 root root 216 Feb 10  2011
> /mnt/foo/server_gen/2013.07.26_03.08.38/$sortin_linux/natty_lirc_work/etc/fuse.conf
>
>  root at mediapc:/mnt/foo/server_gen# ls -li 
> /mnt/foo/server_gen/2013.07.27_03.08.46/\$sortin_linux/natty_lirc_work/etc/fuse.conf
>
> 
6523 -rw-r----- 2 root root 216 Feb 10  2011
> /mnt/foo/server_gen/2013.07.27_03.08.46/$sortin_linux/natty_lirc_work/etc/fuse.conf
>
>  result: different inodes, not hardlinked
> 
> Greetings
> 
> 
> 
> 
> On Sat, Aug 3, 2013 at 1:05 AM, Kevin Korb <kmk at sanitarium.net 
> <mailto:kmk at sanitarium.net>> wrote:
> 
> Oooops, I replied but I didn't reply to the list...
> 
> Are the two sources on different NFS mounts?  If they are are hard 
> links then obviously they are on the same file system on the
> server but if the NFS client has them in 2 different mounts rsync
> would probably not realize that they are linked together.
> 
> On 08/02/13 19:03, - wrote:
> 
>> Hi,
> 
>> ok did a sample test like your test and it worked. But using my 
>> real directories (roughly a million files) it does not work.
>> Never had problems before with hardlinking.
> 
>> Is there anything I could do to narrow down the problem?
>> (Version 3.0.9 on wheezy 64bit)
> 
>> source is on NFS, dest is on AUFS (could be problematic) but the 
>> small sample like you did was perfectly fine. I used same
>> options and path scheme in both tests.
> 
>> Thanks
> 
>> lopiuh
> 
> 
>> On Sat, Aug 3, 2013 at 12:14 AM, Kevin Korb <kmk at sanitarium.net
> <mailto:kmk at sanitarium.net>
>> <mailto:kmk at sanitarium.net <mailto:kmk at sanitarium.net>>> wrote:
> 
>> # ls -li /tmp/src?/testfile 3349750 -rw-r--r-- 2 root root 0 Aug
>> 2 18:12 /tmp/src1/testfile 3349750 -rw-r--r-- 2 root root 0 Aug
>> 2 18:12 /tmp/src2/testfile # rsync -RvaiH /tmp/src1 /tmp/src2 
>> /tmp/target sending incremental file list created directory 
>> /tmp/target cd+++++++++ /tmp/ cd+++++++++ /tmp/src1/ cd+++++++++ 
>> /tmp/src2/
>>> f+++++++++ /tmp/src2/testfile
>> hf+++++++++ /tmp/src1/testfile => tmp/src2/testfile
> 
>> sent 192 bytes  received 68 bytes  520.00 bytes/sec total size is
>> 0 speedup is 0.00 # ls -li /tmp/target/tmp/src?/testfile 3351917 
>> -rw-r--r-- 2 root root 0 Aug  2 18:12 
>> /tmp/target/tmp/src1/testfile 3351917 -rw-r--r-- 2 root root 0
>> Aug 2 18:12 /tmp/target/tmp/src2/testfile
> 
> 
>> On 08/02/13 18:11, Kevin Korb wrote:
>>> It works for me in 3.0.9.  Are you on an older version?
> 
>>> On 08/02/13 18:08, - wrote:
>>>> Hi,
> 
>>>> hardlinking (-H) works perfectly while using a syntax like 
>>>> -avhxSDH <SRC> <DEST>
> 
>>>> Now I have to mirror multiple SRC directories which contain 
>>>> hardlinks. e. g: src1/a is a hardlink to src2/b
> 
>>>> -RavhxSDH SRC1 SRC2 DEST
> 
>>>> does not preserve hardlink a and b in DEST. Is there any 
>>>> chance to do that?
> 
>>>> Thanks
> 
>>>> lopiuh
> 
> 
> 
> 
> 
>> -- Please use reply-all for most replies to avoid omitting the 
>> mailing list. To unsubscribe or change options: 
>> https://lists.samba.org/mailman/listinfo/rsync Before posting, 
>> read: http://www.catb.org/~esr/faqs/smart-questions.html
> 
> 
> 
> 
> 
> 
> -- Please use reply-all for most replies to avoid omitting the
> mailing list. To unsubscribe or change options: 
> https://lists.samba.org/mailman/listinfo/rsync Before posting,
> read: http://www.catb.org/~esr/faqs/smart-questions.html
> 
> 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlH8P+MACgkQVKC1jlbQAQd5bgCghdn2lonMX6UB4vL2Y6T3xEzx
GqwAoK1Lt3h6O6rNhcbCAHO+Ja7o0UzV
=FFbQ
-----END PGP SIGNATURE-----


More information about the rsync mailing list