{ "module": "zfs", "version": "1", "capabilities": [ "service-manager" ], "emits": [ "snapshot.taken", "scrub.requested" ], "config": { "scrub-pool": { "type": "string", "description": "The name of the ZFS pool the module scrubs; the operator's, with no default.", "trusted": true, "required": true }, "scrub-cadence": { "type": "string", "description": "How often the pool named by scrub-pool is scrubbed: weekly, or monthly on the first scrub-day of each month. Weekly is what the distribution's timer did on the home server before the module, so taking it over moves nothing until the operator chooses.", "enum": [ "weekly", "monthly" ], "trusted": true, "default": "weekly" }, "scrub-day": { "type": "string", "description": "The weekday the scrub starts, Mon to Sun; for a monthly scrub, the first such day of the month. Checked by the scheduled run, which refuses any other value and runs nothing; Monday is when the distribution's weekly timer fired.", "enum": [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" ], "trusted": true, "default": "Mon" }, "scrub-time": { "type": "string", "description": "The time the scrub starts, HH:MM from 00:00 to 23:59 in the machine's time zone; the scheduled run checks it every quarter of an hour, so the scrub starts within 15 minutes of it. Midnight is when the distribution's weekly timer fired.", "pattern": "([01][0-9]|2[0-3]):[0-5][0-9]", "trusted": true, "default": "00:00" } }, "tools": [ "zfs_datasets", "zfs_snapshots", "zfs_snapshot", "zfs_pools", "zfs_space", "zfs_pool_layout", "zfs_scrub", "zfs_scrub_start", "zfs_scrub_pause", "zfs_scrub_stop", "zfs_io", "zfs_arc", "zfs_events", "zfs_properties", "zfs_health" ], "replaces": { "zfs_datasets": [ "zfs list" ], "zfs_snapshots": [ "zfs list -t snapshot" ], "zfs_snapshot": [ "zfs snapshot" ], "zfs_pools": [ "zpool list", "zpool status -x" ], "zfs_space": [ "zfs list -o space", "zpool list -v" ], "zfs_pool_layout": [ "zpool status", "zpool status -v" ], "zfs_scrub": [ "zpool history -i" ], "zfs_io": [ "zpool iostat", "zpool iostat -v" ], "zfs_arc": [ "arcstat", "arc_summary", "cat /proc/spl/kstat/zfs/arcstats" ], "zfs_events": [ "zpool events", "zpool events -v" ], "zfs_properties": [ "zfs get all", "zfs get" ], "zfs_scrub_start": [ "zpool scrub" ], "zfs_scrub_pause": [ "zpool scrub -p" ], "zfs_scrub_stop": [ "zpool scrub -s" ] }, "resources": [ { "id": "watch", "type": "process", "name": "zfs-watch", "artifact": "tools", "run": [ "./zfs-tools", "watch" ], "user": "${machine:account}", "health": { "kind": "tool", "tool": "zfs_health", "interval": "60s", "timeout": "20s", "looks": 2, "grace": "60s" } }, { "id": "state-dir", "type": "directory", "path": "/var/lib/zfs-tools", "mode": "0755", "owner": "${machine:account}" }, { "id": "cursor-dir", "type": "directory", "path": "/run/zfs-events", "mode": "0700" }, { "id": "events", "type": "process", "name": "zfs-events", "artifact": "tools", "run": [ "./zfs-tools", "events" ], "health": { "kind": "unit" } }, { "id": "config-dir", "type": "directory", "path": "/etc/zfs-tools", "mode": "0755" }, { "id": "scrub-config", "type": "file", "path": "/etc/zfs-tools/scrub.conf", "mode": "0644", "template": "files/scrub.conf" }, { "id": "scrub-state-dir", "type": "directory", "path": "/var/lib/zfs-scrub", "mode": "0700" }, { "id": "scrub-run", "type": "process", "name": "zfs-mesh-scrub", "artifact": "tools", "run": [ "./zfs-tools", "scrub-run" ], "schedule": "*/15 * * * *" }, { "id": "distribution-weekly", "type": "service", "unit": "zfs-scrub-weekly@${config:scrub-pool}.timer", "state": "stopped", "boot": "disabled" }, { "id": "distribution-monthly", "type": "service", "unit": "zfs-scrub-monthly@${config:scrub-pool}.timer", "state": "stopped", "boot": "disabled" } ], "build": { "artifacts": [ { "name": "tools", "kind": "bundle", "language": "go", "system": "arch", "from": "cmd/zfs-tools", "binary": "zfs-tools", "loads": [ "zfs-tools" ] }, { "name": "files", "kind": "archive", "from": "files" } ] } }