monitoring: btrfs scrub for / and /mnt/support, schedules page #405
No reviewers
Labels
No labels
audit-work
bug
docs
general-admin
major-upgrade
needs-vps-sync
new-service
on-hold
outside-work
post-podman
renovate
upstream
vps
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mysticalsoap/docker!405
Loading…
Reference in a new issue
No description provided.
Delete branch "btrfs-scrub"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #124.
Problem
Only
/mnt/externalhad a scrub timer. The LUKS root (every app database, the restic source data) and/mnt/support(the restic repo) were never checksummed beyond what a read happened to touch, and a scrub that found errors would have reported them nowhere but the journal.Separately, timers are spread over system units, user units, Dagu DAGs and distro packages, so picking a slot for a new job meant reading all four.
Fix
btrfs-scrub@templates under_helper/monitoring/systemd/: the service drop-in makes every instanceoneshotwith anExecStartPostthat writesbtrfs_scrub_last_success_timestamp_seconds(skipped on a non-zero exit, so uncorrectable errors leave the timestamp stale); per-instance timer drop-ins pin/to the 1st and/mnt/supportto the 2nd at 14:00, clear of the 03:15 backup.btrfsalert group:BtrfsDeviceErrorson node-exporter's existingnode_btrfs_device_errors_total(the kernel'sbtrfs device stats, which a scrub bumps on a bad checksum),BtrfsScrubStaleat 35d,BtrfsScrubMetricMissing./mnt/externalis excluded from alerting; it sits unplugged for months.Schedules.md: every timer on the host in one table by clock time, with what each restarts or reads heavily. Linked from the docs index and Maintenance.mysticalsoap/dotfiles@c06da0f).Verification
promtool check rulespasses; Prometheus restarted on the branch's rules, all three evaluate withhealth: ok./) and 2026-11-02 14:00 (/mnt/support)./345.72 GiB in 2:50 at 2.03 GiB/s,/mnt/support8.39 GiB in 2 s, no errors on either, device stats all zero.Type=simplefiresExecStartPostthe moment the scrub starts; withType=oneshotthe mark script's PID and the metric file's mtime both follow the scrub's exit.btrfs_scrub_last_success_timestamp_secondspresent in Prometheus for both mounts;BtrfsScrubMetricMissingwent pending → inactive once they appeared.🤖 Generated with Claude Code
4d85c9768c4acfeb965b