Re: [Fstransform-devel] preservation of hard links
Status: Beta
Brought to you by:
paperinik
|
From: Massimiliano G. <mas...@gm...> - 2014-11-02 23:08:17
|
On 10/29/14 23:58, Olaf Leidinger wrote: > On 10/29/14 23:36, Massimiliano Ghilardi wrote: >> Yes, it preserves hard links. In order to do that, it keeps an >> in-memory cache of hard links found so far. If the cache gets larger >> than available RAM, it starts swapping to disk and you're in trouble: >> it will take ages to finish, or, if it runs out of swap space, it >> will crash. > > Actually, I can't really guess how many hard links are there on this > partition. The server has 8 GiB of RAM + 8 GiB of swap... I'll try and > report back how it worked. > > Best, > Olaf Hello Olaf, I added support for disk-based inode cache in the latest version of fstranform. While not released yet, initial tests are successful. You can download it from https://github.com/cosmos72/fstransform either with the 'download ZIP' button on the right, or by cloning the GIT repository. To actually enable the disk-based inode cache, you must add the option --inode-cache="DIR" to fsmove. If you use the main fstransform script, the option becomes --opts-fsmove="--inode-cache=DIR" where DIR is be the path of a non-existing directory (fsmove will create it) - it can also be inside the filesystem to be transformed. Such directory will be filled with one soft-link per group of hard-links pointing to the same file, so it must be inside a filesystem with plenty of available inodes ("df -i" is your friend). Best regards, Max |