Deduplicating Files while moving them to XFS
2
votes
2
answers
2927
views
I've got a folder on a non
reflink
-capable file system (ext4) which I know contains many files with identical blocks in them.
I'd like to move/copy that directory to an XFS file system whilst simultaneously deduplicating them. (I.e. if a block of a copied file is already present in a different file, I'd like to not actually copy it, but to make a second block ref point to that in the new file.)
One option would of course be first copying over all files to the XFS filesystem, running duperemove
on them there, and thus removing the duplicates after the fact. Small problem: this might get time-intense, as the target filesystem isn't as quick on random accesses.
Therefore, I'd prefer if the process that copies over the files already takes care of telling the kernel that, hey, that block is a duplicate of that other block that's already there.
Is such a thing possible?
Asked by Marcus Müller
(47272 rep)
May 1, 2021, 12:15 PM
Last activity: Dec 19, 2023, 04:02 PM
Last activity: Dec 19, 2023, 04:02 PM