Sys-ctl-hlth-btrfs Role¶
Description: Scheduled health check for Btrfs filesystems that alerts on non-zero device error counters
Variables¶
author: Kevin Veen-Birkenbach
description: Scheduled health check for Btrfs filesystems that alerts on non-zero device error counters
company: Kevin Veen-Birkenbach https://www.veen.world
license: Infinito.Nexus Community License (Non-Commercial)
min_ansible_version: 2.9
platforms: [{‘name’: ‘ArchLinux’, ‘versions’: [‘all’]}, {‘name’: ‘Debian’, ‘versions’: [‘all’]}, {‘name’: ‘EL’, ‘versions’: [‘all’]}, {‘name’: ‘Fedora’, ‘versions’: [‘all’]}, {‘name’: ‘Ubuntu’, ‘versions’: [‘all’]}]
galaxy_tags: [‘monitor’, ‘btrfs’, ‘health’, ‘systemd’, ‘filesystem’]
README¶
sys-ctl-hlth-btrfs¶
Description¶
Checks the health of all mounted Btrfs filesystems by inspecting device error counters.
Overview¶
This role health-check for Btrfs filesystems, alerts on any device error counters.
Cosmos¶
The diagram places sys-ctl-hlth-btrfs in the Infinito.Nexus cosmos: the components it deploys (capabilities), the central services it consumes (dependencies), and its outward reach (federation and bridged external networks).
flowchart LR
subgraph role [sys-ctl-hlth-btrfs 💻]
svc_btrfs["btrfs"]
endSolid 1:1 edges are fixed relationships; dashed 0..1 edges are
conditional (enabled only in matching deployments); red 0..0 edges
are turned off in this role. Node markers show the role’s deploy modes
(💻 host, 🐳 compose, 🐝 swarm); ❌ marks a service that is explicitly
turned off, and ⚙️ an Ansible role dependency declared in
meta/main.yml.
Features¶
Iterates over every Btrfs filesystem.
Runs
btrfs device statsand alerts if any error counters are non-zero.Hooks into systemd and a timer for regular checks.
On failure, calls
sys-ctl-alm-compose.infinito@…for notification.
Usage¶
Just include this role in your playbook; it will:
Deploy a small shell script
Install a
.serviceand.timerunit.Send alerts via
sys-ctl-alm-composeif any filesystem shows errors.
Credits¶
Implemented by Kevin Veen-Birkenbach. Part of the Infinito.Nexus Project and maintained by Kevin Veen-Birkenbach. Licensed under the Infinito.Nexus Community License (Non-Commercial).