<div dir="ltr"><div><div>Hi,</div><div><br></div><div>now it's time to come back to this topic.</div><div><br></div><div>As supposed, the missing hardlinks where no issue of rsync. I am not sure if pairing aufs (<a href="http://aufs.sourceforge.net/">http://aufs.sourceforge.net/</a>) and rsync -RH will catch each and every hardlink compared to a single filesystem, but it seems to work very reliable.</div>
<div><br></div><div>I tried mhdfs and aufs. Aufs is faster and very stable (I am on wheezy kernel 3.2).</div><div><br></div><div>So at last I have my solution to get several harddisks into a big one in order to use rsync to do my offsite backup.</div>
<div><br></div><div>Why aufs and not LVM/Raid:</div><div>1) I don't want to loose all data of the backup set if one device gets errors.</div><div>2) I use the feature to add or remove space and can do so by changing ONE disk ... all other keep their data of the backup set. Next time rsync aud aufs "recover" only the files which where on the replaced drive.</div>
<div><br></div><div>If anyone has any questions or comments or wishes to test, please feel free .. please cc (lopiuh at gmail dot com) because I could miss mailing list entries.</div><div><br></div><div>Here are the relevant commands I use:</div>
<div><br></div><div>mount -t aufs -o br=/mnt/mp_drive1=rw:/mnt/mp_drive2=rw:/mnt/mp_drive3=rw  -o sum -o create=mfs -o udba=none none /mnt/aufs</div><div>cd srcdir_parrent</div><div>nice -n 19 ionice -c3 rsync -RavhSDHi  --stats --del srcdir_1 srcdir_2 srcdir_3 /mnt/aufs/</div>
<div><br></div><div>Thanks Kevin for helping me this time and at that time</div></div><div><br></div><div>lopiuh</div><div><br></div><div><i style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">Fri Aug 2 17:52:55 MDT 2013</i><br>
</div><div><i style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">I wrote:</i></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Ok, dest is on aufs (with 5 isolated harddisks and ext4-filesystems being<br>joined together). src2 gets on a different target device at the aufs end.<br>So it cant't be hardlinked. Normaly aufs seems to be clever with hardlinks<br>
but in my case the device src1 is located on dest is full and aufs seems to<br>say src2 will be located on a different target device and therfore can't be<br>hardlinked to src1 (on dest).<br>Interestingly this not visible  to rsync (there is not that "==>" whiich<br>
would show rsync is hardlinking. I will do some more tests and try to<br>validate these thoughts. Afterwords I will probably reevaluate aufs for<br>this usecase ;-)<br>Kevin, thanks for being with me. I will come back and report my findings<br>
with aufs and -R rsync .During the initial rsync job (without -R which<br>copied src1 to dest) it was very clever and populated all hardlinks in src1<br>even with spreading the files  on 5 harddisks.<br>The second rsync job (introducing src2) seems to get aufs in trouble<br>
because aufs locates src2/b not on the same device where src1/a is located.<br>Tricky tricky<br>Comming back soon...<br>Lopiuh<br></blockquote><div><br></div><div>On Sat, Aug 3, 2013 at 1:30 AM, - <lopiuh at <a href="http://googlemail.com">googlemail.com</a>> wrote:</div>
<div><br></div><div>> could be aufs (on dest) I do some tests now.</div><div>></div><div>> source is identical:</div><div>></div><div>> root at mediapc:/mnt/foo/server_gen# stat</div><div>> /mnt/hotswapo/storebackup/server_gen/2013.07.26_03.08.38/\$sortin_linux/natty_lirc_work/etc/fuse.conf</div>
<div>>   File:</div><div>> `/mnt/hotswapo/storebackup/server_gen/2013.07.26_03.08.38/$sortin_linux/natty_lirc_work/etc/fuse.conf'</div><div>>   Size: 216             Blocks: 8          IO Block: 131072 regular file</div>
<div>> Device: 17h/23d Inode: 219420238   Links: 124</div><div>> Access: (0640/-rw-r-----)  Uid: (    0/    root)   Gid: (    0/    root)</div><div>> Access: 2013-08-02 23:42:19.959015277 +0200</div><div>> Modify: 2011-02-10 22:03:08.000000000 +0100</div>
<div>> Change: 2013-08-02 03:19:01.487305400 +0200</div><div>>  Birth: -</div><div>></div><div>> root at mediapc:/mnt/foo/server_gen# stat</div><div>> /mnt/hotswapo/storebackup/server_gen/2013.07.27_03.08.46/\$sortin_linux/natty_lirc_work/etc/fuse.conf</div>
<div>>   File:</div><div>> `/mnt/hotswapo/storebackup/server_gen/2013.07.27_03.08.46/$sortin_linux/natty_lirc_work/etc/fuse.conf'</div><div>>   Size: 216             Blocks: 8          IO Block: 131072 regular file</div>
<div>> Device: 17h/23d Inode: 219420238   Links: 124</div><div>> Access: (0640/-rw-r-----)  Uid: (    0/    root)   Gid: (    0/    root)</div><div>> Access: 2013-08-02 23:42:19.959015277 +0200</div><div>> Modify: 2011-02-10 22:03:08.000000000 +0100</div>
<div>> Change: 2013-08-02 03:19:01.487305400 +0200</div><div>>  Birth: -</div><div>></div><div>></div><div>> Greetings</div><div>></div><div>></div><div>> On Sat, Aug 3, 2013 at 1:25 AM, Kevin Korb <kmk at <a href="http://sanitarium.net">sanitarium.net</a>> wrote:</div>
<div>></div><div>>> -----BEGIN PGP SIGNED MESSAGE-----</div><div>>> Hash: SHA1</div><div>>></div><div>>> Can you do a stat on both of the source file and confirm that they</div><div>>> have matching device numbers as well as inode numbers?</div>
<div>>></div><div>>> On 08/02/13 19:22, - wrote:</div><div>>> > Hi,</div><div>>> ></div><div>>> > no same mountpoints. And doing a "synthetic"  test (two new</div><div>>> > directories) it works, even in the same simulated steps. (first</div>
<div>>> > sync dir1, then ad link after that sync dir1 and dir2 to dest (dir2</div><div>>> > is added to dest)</div><div>>> ></div><div>>> > not so on my "real" data</div><div>
>> ></div><div>>> > Here is a file of "production" data::: src1:</div><div>>> ></div><div>>> > ls -li</div><div>>> ></div><div>>> /mnt/hotswapo/storebackup/server_gen/2013.07.26_03.08.38/\$sortin_linux/natty_lirc_work/etc/fuse.conf</div>
<div>>> ></div><div>>> ></div><div>>> 219420238 -rw-r----- 124 root root 216 Feb 10  2011</div><div>>> ></div><div>>> /mnt/hotswapo/storebackup/server_gen/2013.07.26_03.08.38/$sortin_linux/natty_lirc_work/etc/fuse.conf</div>
<div>>> ></div><div>>> >  src2: ls -li</div><div>>> ></div><div>>> /mnt/hotswapo/storebackup/server_gen/2013.07.27_03.08.46/\$sortin_linux/natty_lirc_work/etc/fuse.conf</div><div>>> ></div>
<div>>> ></div><div>>> 219420238 -rw-r----- 124 root root 216 Feb 10  2011</div><div>>> ></div><div>>> /mnt/hotswapo/storebackup/server_gen/2013.07.27_03.08.46/$sortin_linux/natty_lirc_work/etc/fuse.conf</div>
<div>>> ></div><div>>> >  ->same inode (219420238)</div><div>>> ></div><div>>> > doing the sync</div><div>>> ></div><div>>> > rsync -RavhxSDHi --stats --progress server_gen/2013.07.27_03.08.46</div>
<div>>> > server_gen/2013.07.26_03.08.38 /mnt/foo/</div><div>>> ></div><div>>> > checking results:</div><div>>> ></div><div>>> > lroot at mediapc:/mnt/foo/server_gen# ls -li</div>
<div>>> ></div><div>>> /mnt/foo/server_gen/2013.07.26_03.08.38/\$sortin_linux/natty_lirc_work/etc/fuse.conf</div><div>>> ></div><div>>> ></div><div>>> 868354 -rw-r----- 1 root root 216 Feb 10  2011</div>
<div>>> ></div><div>>> /mnt/foo/server_gen/2013.07.26_03.08.38/$sortin_linux/natty_lirc_work/etc/fuse.conf</div><div>>> ></div><div>>> >  root at mediapc:/mnt/foo/server_gen# ls -li</div><div>
>> ></div><div>>> /mnt/foo/server_gen/2013.07.27_03.08.46/\$sortin_linux/natty_lirc_work/etc/fuse.conf</div><div>>> ></div><div>>> ></div><div>>> 6523 -rw-r----- 2 root root 216 Feb 10  2011</div>
<div>>> ></div><div>>> /mnt/foo/server_gen/2013.07.27_03.08.46/$sortin_linux/natty_lirc_work/etc/fuse.conf</div><div>>> ></div><div>>> >  result: different inodes, not hardlinked</div><div>
>> ></div><div>>> > Greetings</div><div>>> ></div><div>>> ></div><div>>> ></div><div>>> ></div><div>>> > On Sat, Aug 3, 2013 at 1:05 AM, Kevin Korb <kmk at <a href="http://sanitarium.net">sanitarium.net</a></div>
<div>>> > <mailto:<a href="mailto:kmk">kmk</a> at <a href="http://sanitarium.net">sanitarium.net</a>>> wrote:</div><div>>> ></div><div>>> > Oooops, I replied but I didn't reply to the list...</div>
<div>>> ></div><div>>> > Are the two sources on different NFS mounts?  If they are are hard</div><div>>> > links then obviously they are on the same file system on the</div><div>>> > server but if the NFS client has them in 2 different mounts rsync</div>
<div>>> > would probably not realize that they are linked together.</div><div>>> ></div><div>>> > On 08/02/13 19:03, - wrote:</div><div>>> ></div><div>>> >> Hi,</div><div>>> ></div>
<div>>> >> ok did a sample test like your test and it worked. But using my</div><div>>> >> real directories (roughly a million files) it does not work.</div><div>>> >> Never had problems before with hardlinking.</div>
<div>>> ></div><div>>> >> Is there anything I could do to narrow down the problem?</div><div>>> >> (Version 3.0.9 on wheezy 64bit)</div><div>>> ></div><div>>> >> source is on NFS, dest is on AUFS (could be problematic) but the</div>
<div>>> >> small sample like you did was perfectly fine. I used same</div><div>>> >> options and path scheme in both tests.</div><div>>> ></div><div>>> >> Thanks</div><div>>> ></div>
<div>>> >> lopiuh</div><div>>> ></div><div>>> ></div><div>>> >> On Sat, Aug 3, 2013 at 12:14 AM, Kevin Korb <kmk at <a href="http://sanitarium.net">sanitarium.net</a></div><div>
>> > <mailto:<a href="mailto:kmk">kmk</a> at <a href="http://sanitarium.net">sanitarium.net</a>></div><div>>> >> <mailto:<a href="mailto:kmk">kmk</a> at <a href="http://sanitarium.net">sanitarium.net</a> <mailto:<a href="mailto:kmk">kmk</a> at <a href="http://sanitarium.net">sanitarium.net</a>>>> wrote:</div>
<div>>> ></div><div>>> >> # ls -li /tmp/src?/testfile 3349750 -rw-r--r-- 2 root root 0 Aug</div><div>>> >> 2 18:12 /tmp/src1/testfile 3349750 -rw-r--r-- 2 root root 0 Aug</div><div>>> >> 2 18:12 /tmp/src2/testfile # rsync -RvaiH /tmp/src1 /tmp/src2</div>
<div>>> >> /tmp/target sending incremental file list created directory</div><div>>> >> /tmp/target cd+++++++++ /tmp/ cd+++++++++ /tmp/src1/ cd+++++++++</div><div>>> >> /tmp/src2/</div><div>
>> >>> f+++++++++ /tmp/src2/testfile</div><div>>> >> hf+++++++++ /tmp/src1/testfile => tmp/src2/testfile</div><div>>> ></div><div>>> >> sent 192 bytes  received 68 bytes  520.00 bytes/sec total size is</div>
<div>>> >> 0 speedup is 0.00 # ls -li /tmp/target/tmp/src?/testfile 3351917</div><div>>> >> -rw-r--r-- 2 root root 0 Aug  2 18:12</div><div>>> >> /tmp/target/tmp/src1/testfile 3351917 -rw-r--r-- 2 root root 0</div>
<div>>> >> Aug 2 18:12 /tmp/target/tmp/src2/testfile</div><div>>> ></div><div>>> ></div><div>>> >> On 08/02/13 18:11, Kevin Korb wrote:</div><div>>> >>> It works for me in 3.0.9.  Are you on an older version?</div>
<div>>> ></div><div>>> >>> On 08/02/13 18:08, - wrote:</div><div>>> >>>> Hi,</div><div>>> ></div><div>>> >>>> hardlinking (-H) works perfectly while using a syntax like</div>
<div>>> >>>> -avhxSDH <SRC> <DEST></div><div>>> ></div><div>>> >>>> Now I have to mirror multiple SRC directories which contain</div><div>>> >>>> hardlinks. e. g: src1/a is a hardlink to src2/b</div>
<div>>> ></div><div>>> >>>> -RavhxSDH SRC1 SRC2 DEST</div><div>>> ></div><div>>> >>>> does not preserve hardlink a and b in DEST. Is there any</div><div>>> >>>> chance to do that?</div>
<div>>> ></div><div>>> >>>> Thanks</div><div>>> ></div><div>>> >>>> lopiuh</div><div>>> ></div><div>>> ></div><div>>> ></div><div>>> ></div>
<div>>> ></div><div>>> >> -- Please use reply-all for most replies to avoid omitting the</div><div>>> >> mailing list. To unsubscribe or change options:</div><div>>> >> <a href="https://lists.samba.org/mailman/listinfo/rsync">https://lists.samba.org/mailman/listinfo/rsync</a> Before posting,</div>
<div>>> >> read: <a href="http://www.catb.org/~esr/faqs/smart-questions.html">http://www.catb.org/~esr/faqs/smart-questions.html</a></div><div>>> ></div><div>>> ></div><div>>> ></div>
<div>>> ></div><div>>> ></div><div>>> ></div><div>>> > -- Please use reply-all for most replies to avoid omitting the</div><div>>> > mailing list. To unsubscribe or change options:</div>
<div>>> > <a href="https://lists.samba.org/mailman/listinfo/rsync">https://lists.samba.org/mailman/listinfo/rsync</a> Before posting,</div><div>>> > read: <a href="http://www.catb.org/~esr/faqs/smart-questions.html">http://www.catb.org/~esr/faqs/smart-questions.html</a></div>
<div>>> ></div><div>>> ></div><div>>></div><div>>> - --</div><div>>></div><div>>> ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~</div>
<div>>>         Kevin Korb                      Phone:    (407) 252-6853</div><div>>>         Systems Administrator           Internet:</div><div>>>         FutureQuest, Inc.               Kevin at FutureQuest.net  (work)</div>
<div>>>         Orlando, Florida                kmk at <a href="http://sanitarium.net">sanitarium.net</a> (personal)</div><div>>>         Web page:                       <a href="http://www.sanitarium.net/">http://www.sanitarium.net/</a></div>
<div>>>         PGP public key available on web site.</div><div>>></div><div>>> ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~</div><div>>> -----BEGIN PGP SIGNATURE-----</div>
<div>>> Version: GnuPG v2.0.20 (GNU/Linux)</div><div>>> Comment: Using GnuPG with Thunderbird - <a href="http://www.enigmail.net/">http://www.enigmail.net/</a></div><div>>></div><div>>> iEYEARECAAYFAlH8P+MACgkQVKC1jlbQAQd5bgCghdn2lonMX6UB4vL2Y6T3xEzx</div>
<div>>> GqwAoK1Lt3h6O6rNhcbCAHO+Ja7o0UzV</div><div>>> =FFbQ</div><div>>> -----END PGP SIGNATURE-----</div><div>>></div></div>