Subject: hashify
From: Tor Rune Skoglund <trs@swi.no>
Date: Sun, 18 Mar 2018 17:10:03 +0100
Sun, 18 Mar 2018 17:10:03 +0100
Hi List,

I wonder if the issue with hard links not being preserved when CoW
breaks hashed files is still present in the current version of hashify,
or if there are any options to handle it?

http://linux-vserver.org/Frequently_Asked_Questions#What_is_vhashify.3F :

"... There seems to be a catch when a hashified file has multiple
hardlinks inside a guest, or when another internal hardlink is added
after hashification. Link breaking will remove all the internal
hardlinks too, so the guest will end up with different copies of the
original file. The correct solution would be to not hashify files that
have multiple links prior to hashification, and to break the link to the
hashified version when a new internal hardlink is created. Apparently,
this is not implemented yet (?)."

If nothing is there in the code today to handle such issues, what is the
right way to deal with it:

1) Don't care, as any problems arising from any possibly broken in-vm
hardlinks are so rare that side-effects of it "never" happens?

2) Patch the vhashify code so that files that are already hardlinks
inside a vm will not be hashified? (As suggested above)

3) Patch the CoW code so that it handles files that was originally
hardlinked in the vm to be restored as hardlinked also when CoW does its
work?

4) Don't use hashify?

What do you suggest? Anyone with any experiences to share?

BR, Tor Rune Skoglund, trs@swi.no




Hi List,

I wonder if the issue with hard links not being preserved when CoW breaks hashed files is still present in the current version of hashify, or if there are any options to handle it?

http://linux-vserver.org/Frequently_Asked_Questions#What_is_vhashify.3F :

"... There seems to be a catch when a hashified file has multiple hardlinks inside a guest, or when another internal hardlink is added after hashification. Link breaking will remove all the internal hardlinks too, so the guest will end up with different copies of the original file. The correct solution would be to not hashify files that have multiple links prior to hashification, and to break the link to the hashified version when a new internal hardlink is created. Apparently, this is not implemented yet (?)."

If nothing is there in the code today to handle such issues, what is the right way to deal with it:

1) Don't care, as any problems arising from any possibly broken in-vm hardlinks are so rare that side-effects of it "never" happens?

2) Patch the vhashify code so that files that are already hardlinks inside a vm will not be hashified? (As suggested above)

3) Patch the CoW code so that it handles files that was originally hardlinked in the vm to be restored as hardlinked also when CoW does its work?

4) Don't use hashify?

What do you suggest? Anyone with any experiences to share?

BR, Tor Rune Skoglund, trs@swi.no