On Sun, 22 Nov 2020, at 08:44, [email protected] wrote: > On Sun, Nov 22, 2020 at 04:43:21AM +0000, Gareth Evans wrote: > > Hi all, > > > > I have asked this question on both the rsync mailing list and > > serverfault.com but got no response from either. > > Please, don't hijack threads. > > > I would be grateful, if this isn't too off-topic, if anyone could explain > > the following: > > > > man rsync for -H includes: > > > > "If you specify a --link-dest directory that contains hard links, the > > linking of the destination files against the --link-dest files can cause > > some paths in the destination to become linked together due to the > > --link-dest associations." > > > > How and/or why does this happen? What sort of scenario might lead to it? > > The way I understand it is this: > > Suppose whithin --link-dest, files A and B are hard-linked together. > > Now suppose you have two files in your source, say A' and B', with > equal content to A and B (and thus equal themselves, but /not/ linked). > You rsync with --link-dest and with -H. > > Now due to --link-dest, rsync sees "ah, A' == A, so I'll create > A'' on dest hard linked to A'...". Same goes with B and its kin. > > Now you end up with two files A'' and B'' on dest which are hard > linked to A' and B' on link-dest which are hard linked together. > > Due to how hard links work (they are all just directory entries > pointing all to the same i-node), A'' and B'' are hard linked > together. > > Somewhat contradicting your expectation set by -H (preserve hard > links), since the sources A and B had equal content but weren't > hard linked. > > This is all, of course, a hunch, and should be backed (or falsified) > by code study and/or experimental evidence, which is left as an > exercise for the reader ;-) > > Cheers > - t > > Attachments: > * signature.asc
Thanks for your explanation Tomas. > Please, don't hijack threads ...but what did I do wrong re thread hijacking? I understand that to mean changing the content of an existing thread, as a quick google seems to confirm. I did delete the content and change the subject of an existing email, which appears to me to create a new thread, rather than preserving "conversation" links to the deleted content/subject. Am I mistaken or did you mean something else? Thanks, Gareth

