Files
mesh-catalog/modules/zfs/cmd/zfs-tools/testdata/zpool-status-degraded.txt
T
jochen e69506a26f
mesh/merge-gate pass: builds zfs, sent nowhere; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery superseded: a newer head of the same pull request
Make the zfs module safe to put on the home server, and give it the pool's scrub schedule
The safety review of the first version found it safe for the pool's data and asked for these fixes before
it goes on the home server:

- zfs_snapshot: no recursive. Every answer gives the dataset's free space and the pool's capacity, and
  says that the snapshot holds every block deleted or overwritten until it is destroyed by hand.
- A command that runs out of time is ended with its whole process group. An act that timed out is
  answered from the list, or as "outcome unknown", never as "NOT DONE".
- The watch runs as the operator account.
- The event follower reads ZFS's queue from its start, with a cursor per boot, so the pool's import and
  any downtime reach the journal once. It writes "dropped N events", kills zpool before waiting for it,
  and exits non-zero after five failed follows in a row.
- Past error counts are a warning, and counts that rise are unhealthy.
- The guard test catches .Run(, exec.Command(, exec.CommandContext( and process starts.
- The fixtures and the parser follow OpenZFS 2.4.4's own printers: human scan sizes under -p, no iostat
  section lines, error scrubs, per-vdev rebuild resilvers, paused scrubs.

The operator also asked the module to own the scrub. A timer and a service of the module's own run
zpool scrub -w -- <pool> from the scrub-pool, scrub-cadence, scrub-day and scrub-time settings. In the
same declaration, the distribution's weekly and monthly timers for that pool are held stopped and
disabled, so exactly one schedule scrubs it. zfs_scrub shows the schedule and the next run, with any
resilver's progress. zfs_scrub_start, zfs_scrub_pause and zfs_scrub_stop act with why. The health check
warns of a late or failed scrub and of a running resilver, and is unhealthy for a resilver that finished
with errors.
2026-10-09 01:17:34 +02:00

24 lines
1.1 KiB
Plaintext

pool: tank
state: DEGRADED
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Thu Oct 8 21:02:17 2026
8.98T / 26.2T scanned at 1.03G/s, 5.95T / 26.2T issued at 700M/s
1.01G resilvered, 22.72% done, 08:25:13 to go
config:
NAME STATE READ WRITE CKSUM
tank DEGRADED 0 0 0
raidz2-0 DEGRADED 0 0 0
ata-WDC_WD120EFBX-68B0EN0_D7JA0001 ONLINE 0 0 0
spare-1 DEGRADED 0 0 0
ata-WDC_WD120EFBX-68B0EN0_D7JA0002 FAULTED 12 107 3 too many errors
ata-WDC_WD120EFBX-68B0EN0_D7JA0009 ONLINE 0 0 0 (resilvering)
ata-WDC_WD120EFBX-68B0EN0_D7JA0003 ONLINE 0 0 0
ata-WDC_WD120EFBX-68B0EN0_D7JA0004 ONLINE 0 0 0
spares
ata-WDC_WD120EFBX-68B0EN0_D7JA0009 INUSE currently in use
errors: 2 data errors, use '-v' for a list