4 ms·
Couldn't you do passive dedup somehow by having a periodic task that searched for dupes and replaced them with hardlinks?
by pmarreck 5y ago
Couldn't you do passive dedup somehow by having a periodic task that searched for dupes and replaced them with hardlinks?
- XorNot 5y agoThis removes copy-on-write though, which is why it's a bad idea. Editing a file in one place and having it surprise edit everywhere else is a good way to wind up with a disaster.
- linsomniac 5y agoI don't think so, for a few reasons: - My primary need for it is on my backup box, which does "rsync --inplace" to keep small changes to large files from completely creating a new copy of that file every backup run. Hardlinks would cause all of those to compete if some previously similar file started getting updated (OS updates or similar starting files that then diverge. - Each system gets it's own ZFS, so I can snapshot them at the end of the backup, keep different retention times, etc. But I can't hardlink across filesystems, I don't think. The linked article did mention increasing dedup block size, which might help. If I could even cut down the DDT by half, that would make it more doable.
- yjftsjthsd-h 5y agoWouldn't the better option be to overwrite one duplicate with `cp --reflink`? That way you keep the nice CoW properties... I think.
- Dylan16807 5y agoZFS can't do reflinks.
- yjftsjthsd-h 5y agoOh, I didn't realize that, thanks