News for hackers. Stuff that matters.
Re:Scripts for Btrfs Maintenance by foobarqux on Tuesday June 06, 2023 @09:03PM (#36221386)
Defrag breaks COW so if you use COW a lot (e.g. snapshots) you don't want to do it.
Re:Scripts for Btrfs Maintenance by fsckboy on Wednesday June 07, 2023 @04:18AM (#36224285)
what do you mean it breaks? does it purge* the older versions, or does something break?

* (yes, DEC reference)

Re:Scripts for Btrfs Maintenance by jraph on Wednesday June 07, 2023 @04:59AM (#36224516)
It deduplicates everything. Don't defrag Btrfs lightly, unless you have a specific issue to solve and you ran out off other solutions. Even then, only do it if you know what you are doing.
Re:Scripts for Btrfs Maintenance by the8472 on Wednesday June 07, 2023 @05:34AM (#36224748)
*reduplicates

Anyway, deduplication can be recovered after a defrag by running duperemove or similar tools. But it's a lot of added work so it's only really worth it if fragmentation is an issue in the first place.

Re:Scripts for Btrfs Maintenance by Dylan16807 on Thursday June 08, 2023 @03:31PM (#36247435)
And you have to cross your fingers and hope it picks the defragmented copy, as far as I know.

It's also very slow to go through that on multiple snapshots.

And I think some of the metadata doesn't like to recombine?