Include btrfsmaintenance Debian package in Freedombox

Summary
Btrfs maintenance tasks such as scrub and balance can be automated with the btrfsmaintenance package. I don’t believe that Freedombox automates these tasks today, but their periodic use is recommended.

Problem
From btrfs wiki:

scrub

The user is supposed to run it manually or via a periodic system service.

defragmentation for mechanical disk users

The reason there’s a need for defragmentation stems from the COW design that BTRFS is built on and is inherent.

btrfs check --repair should not be used lightly. Can we help the user make a good choice here?

Do not use –repair unless you are advised to do so by a developer or an experienced user, and then only after having accepted that no fsck successfully repair all types of filesystem corruption. Eg. some other software or hardware bugs can fatally damage a volume.

balance may be needed for users with multiple devices in their btrfs

Solution

  • figure out whether a disk is mechanical or a nonvolitile memory unit, or allow users to specify
  • automate safe and sensible maintenance with btrfsmaintenance or FB specific scripts
  • possibly help users use btrfs check --repair only when appropriate
1 Like