aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/etc/mkinitcpio.conf
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:35 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:35 +0100
commit14a6992a4ebe826266a1ea4320c34c0ac91932ee (patch)
tree0dd1735409889b688dc9347032a109307cbd86f0 /etc/mkinitcpio.conf
parent22816819ffd5f3adb515dcea991cd1c3af368e36 (diff)
downloaddotfiles-14a6992a4ebe826266a1ea4320c34c0ac91932ee.tar.gz
dotfiles-14a6992a4ebe826266a1ea4320c34c0ac91932ee.tar.bz2
dotfiles-14a6992a4ebe826266a1ea4320c34c0ac91932ee.zip
feat(systemd): monthly btrfs balance template
Template service+timer that runs `btrfs balance start -dusage=50 -musage=50 %f` once a month on the instance's mount path. Mirrors the shape of the stock btrfs-scrub@.{service,timer} so the operational model is identical: enable btrfs-balance@-.timer for /, btrfs-balance@\ x2dhome.timer for /home, etc. Why a partial balance and not a full one: full `btrfs balance start` rewrites every block group, which on a multi-TB volume takes hours and can chew through enormous amounts of CSUM/free-space-tree work. `-dusage=50 -musage=50` only consolidates block groups that are less than half full, which is exactly the operation that reclaims space 'lost' to fragmentation after lots of small writes — the only practical reason a healthy single-disk btrfs needs balancing at all. `Nice=19 IOSchedulingClass=idle` keeps it out of the way of foreground work; `KillSignal=SIGINT` (same as btrfs-scrub) lets a graceful Ctrl-C checkpoint the operation cleanly. Persistent=true catches the run on next boot if the machine was off when the timer fired. Enabled in systemd-units/system.txt as btrfs-balance@-.timer (root volume only — /home isn't a separate subvolume on this machine).
Diffstat (limited to 'etc/mkinitcpio.conf')
0 files changed, 0 insertions, 0 deletions