On venerdì 18 maggio 2018 20:33:53 CEST, Austin S. Hemmelgarn wrote:
With a bit of work, it's possible to handle things sanely. You
can deduplicate data from snapshots, even if they are read-only
(you need to pass the `-A` option to duperemove and run it as
root), so it's perfectly reasonable to only defrag the main
subvolume, and then deduplicate the snapshots against that (so
that they end up all being reflinks to the main subvolume). Of
course, this won't work if you're short on space, but if you're
dealing with snapshots, you should have enough space that this
will work (because even without defrag, it's fully possible for
something to cause the snapshots to suddenly take up a lot more
space).
Been there, tried that. Unfortunately even if I skip the defreg a simple
duperemove -drhA --dedupe-options=noblock --hashfile=rootfs.hash rootfs
is going to eat more space than it was previously available (probably due
to autodefrag?).
Niccolò
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html