Set up fstrim to run once a week or so and scrub your disks periodically. It will not fix any errors unless you have a RAID but it will still tell you if there are any corrupted blocks. If you delete large blocks of data you might want to rebalance every now and then. You really shouldn't need to do maintenance on a filesystem.
I'd mostly focus on scrub, but I'll also recommend that you keep an eye on your unallocated blocks, running out of them can get you into out-of-space situations that are non-trivial to fix. My general recommendation is about 5G per device, that should give it enough breathing room that it won't -ENOSPC
on most workloads. Also, please note that unallocated space is a subset of free space, that is, all unallocated space is free space but the inverse isn't true.
Getting more unallocated space is as easy as running a balance with a filter, say "btrfs balance start -dusage=10 /mountpoint
". Just don't balance metadata unless you want to convert it.
Regarding defrag, I still defrag databases, system journal files, etc, even on SSDs. Those workloads tend to cause a lot of fragmentation that can impact your performance (try reading your journalctl
logs before and after a defrag, as an example).
Free and Open Source Software
If it's free and open source and it's also software, it can be discussed here. Subcommunity of Technology.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.