Add the zfs module, so the mesh can see the home server's pools and snapshot a dataset
mesh/merge-gate pass: builds new: modules/zfs, sent nowhere; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check fail: its merge-check.sh failed: --- FAIL: TestASnapshotIsAnsweredFromTheListAfterwardsAndRecorded (0.00s)
mesh/delivery superseded: a newer head of the same pull request
mesh/merge-gate pass: builds new: modules/zfs, sent nowhere; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check fail: its merge-check.sh failed: --- FAIL: TestASnapshotIsAnsweredFromTheListAfterwardsAndRecorded (0.00s)
mesh/delivery superseded: a newer head of the same pull request
The home server's pool holds the operator's media library, and no mesh tool could say whether it is healthy, how full it is, when it was last scrubbed or what snapshots exist; the only way was a login. This module reads all of it with fixed zfs and zpool commands (list, get, status, iostat, events, history) and has one act, zfs_snapshot, which only adds a snapshot: refused for an unknown dataset, a name outside [A-Za-z0-9._-], an existing snapshot or no why; run as sudo -n zfs snapshot -- ds@name; answered from zfs list afterwards, with any other snapshot that came or went meanwhile; recorded as the event snapshot.taken. No destroy, rollback, set or send exists, and a test holds every command to its verb. Health (ADR 0240): zfs_health on the watch process, unhealthy for a pool not ONLINE, device or data errors, a pool past 90 % full or no ZFS at all; past 80 % and a scrub older than 35 days are warnings. Beside it, the event follower (zpool events -f, as root) keeps ZFS's errors in its journal past a reboot and is judged by its unit, the check the module does not run itself. No seat (ADR 0121), no package: ZFS is the machine's.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
13 1 0x01 147 39984 7071415536 284772115112591
|
||||
name type data
|
||||
hits 4 90
|
||||
misses 4 10
|
||||
c 4 1073741824
|
||||
c_min 4 1051456512
|
||||
c_max 4 2147483648
|
||||
size 4 1000000000
|
||||
l2_hits 4 0
|
||||
l2_misses 4 0
|
||||
l2_size 4 0
|
||||
l2_asize 4 0
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
13 1 0x01 147 39984 7071415536 284772115112591
|
||||
name type data
|
||||
hits 4 908234567
|
||||
iohits 4 1234567
|
||||
misses 4 95765433
|
||||
demand_data_hits 4 500000000
|
||||
demand_data_misses 4 50000000
|
||||
demand_metadata_hits 4 300000000
|
||||
demand_metadata_misses 4 10000000
|
||||
c 4 16823304192
|
||||
c_min 4 1051456512
|
||||
c_max 4 33646608384
|
||||
size 4 16798000128
|
||||
l2_hits 4 1200000
|
||||
l2_misses 4 3600000
|
||||
l2_size 4 412316860416
|
||||
l2_asize 4 398000000000
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
type filesystem -
|
||||
creation 1700000000 -
|
||||
used 27487790694400 -
|
||||
mountpoint /storage/media inherited from tank
|
||||
compression lz4 inherited from tank
|
||||
compressratio 1.00 -
|
||||
recordsize 1048576 local
|
||||
atime off inherited from tank
|
||||
sharenfs rw=@192.0.2.0/24 local
|
||||
encryption aes-256-gcm -
|
||||
keylocation https://keys.example/k?token=s3cret local
|
||||
keyformat passphrase -
|
||||
keystatus available -
|
||||
encryptionroot tank/media -
|
||||
quota 0 default
|
||||
tank:purpose the library local
|
||||
@@ -0,0 +1,4 @@
|
||||
tank/media@2026-08-01 1785542400 274877906944 26388279066624
|
||||
tank/media@2026-09-01 1788220800 137438953472 26800000000000
|
||||
tank/media@before-rename 1791100800 1048576 26938034880512
|
||||
tank/downloads@weekly 1790496000 0 1099511627776
|
||||
@@ -0,0 +1,4 @@
|
||||
tank filesystem /storage 28591834521600 11203942195200 196608 1.01 off 0 196608 28591834324992 0 0 0 0 0 28870035210240 42496 lz4
|
||||
tank/media filesystem /storage/media 27487790694400 11203942195200 26938034880512 1.00 rw=@192.0.2.0/24 549755813888 26938034880512 0 0 0 0 0 0 27500000000000 26950000000000 lz4
|
||||
tank/downloads filesystem /storage/downloads 1099511627776 11203942195200 1099511627776 1.02 off 0 1099511627776 0 0 2199023255552 0 0 0 1121501860331 1121501860331 lz4
|
||||
tank/vm volume - 4398046511 11208340241711 2147483648 1.85 - 0 2147483648 0 2250562863 - - 0 4398046511 3972844748 3972844748 zstd
|
||||
@@ -0,0 +1,40 @@
|
||||
TIME CLASS
|
||||
Oct 8 2026 20:58:02.112233445 sysevent.fs.zfs.history_event
|
||||
version = 0x0
|
||||
class = "sysevent.fs.zfs.history_event"
|
||||
pool = "tank"
|
||||
history_internal_str = "func=1 mintxg=0"
|
||||
eid = 0x10
|
||||
|
||||
Oct 8 2026 21:01:55.889900112 ereport.fs.zfs.io
|
||||
class = "ereport.fs.zfs.io"
|
||||
ena = 0x5e1f2b3c4d500001
|
||||
pool = "tank"
|
||||
pool_guid = 0x1234567890abcdef
|
||||
vdev_path = "/dev/disk/by-id/ata-WDC_WD120EFBX-68B0EN0_D7JA0002-part1"
|
||||
vdev_type = "disk"
|
||||
zio_err = 0x5
|
||||
eid = 0x11
|
||||
|
||||
Oct 8 2026 21:02:01.000000001 resource.fs.zfs.statechange
|
||||
version = 0x0
|
||||
class = "resource.fs.zfs.statechange"
|
||||
pool = "tank"
|
||||
vdev_path = "/dev/disk/by-id/ata-WDC_WD120EFBX-68B0EN0_D7JA0002-part1"
|
||||
vdev_state = 0x5
|
||||
vdev_laststate = 0x7
|
||||
eid = 0x12
|
||||
|
||||
Oct 8 2026 21:02:01.500000000 sysevent.fs.zfs.config_sync
|
||||
version = 0x0
|
||||
class = "sysevent.fs.zfs.config_sync"
|
||||
pool = "tank"
|
||||
eid = 0x13
|
||||
|
||||
Oct 8 2026 21:02:17.000000000 sysevent.fs.zfs.resilver_start
|
||||
version = 0x0
|
||||
class = "sysevent.fs.zfs.resilver_start"
|
||||
pool = "tank"
|
||||
resilver_type = "healing"
|
||||
eid = 0x14
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
History for 'tank':
|
||||
2026-07-12.00:24:01 [txg:4410021] scan setup tank (552) func=1 mintxg=0 maxtxg=4410021
|
||||
2026-07-13.02:30:00 [txg:4419020] scan done tank (552) errors=0
|
||||
2026-08-02.10:00:00 zfs snapshot tank/media@2026-08-01
|
||||
2026-08-20.13:12:40 [txg:4621100] scan setup tank (552) func=2 mintxg=3 maxtxg=4621100
|
||||
2026-08-20.19:40:02 [txg:4623199] scan done tank (552) errors=0
|
||||
2026-09-13.00:24:01 [txg:4701131] scan setup tank (552) func=1 mintxg=0 maxtxg=4701131
|
||||
2026-09-13.03:00:00 [txg:4702000] scan cancelled tank (552) errors=0
|
||||
2026-10-08.21:02:17 [txg:4801131] scan setup tank (552) func=2 mintxg=3 maxtxg=4801131
|
||||
@@ -0,0 +1,12 @@
|
||||
tank 28797591658086 19184805568512 212 14 221249536 1048576
|
||||
raidz2-0 28797591658086 19184805568512 212 14 221249536 1048576
|
||||
ata-WDC_WD120EFBX-68B0EN0_D7JA0001 - - 35 2 36874922 174762
|
||||
ata-WDC_WD120EFBX-68B0EN0_D7JA0002 - - 36 2 36874922 174762
|
||||
logs - - - - - -
|
||||
mirror-1 12582912 16093544448 0 0 0 0
|
||||
nvme-Samsung_SSD_980_PRO_1TB_S5P2NG0R100001-part1 - - 0 0 0 0
|
||||
nvme-Samsung_SSD_980_PRO_1TB_S5P2NG0R100002-part1 - - 0 0 0 0
|
||||
cache - - - - - -
|
||||
nvme-Samsung_SSD_980_PRO_1TB_S5P2NG0R100001-part2 480000000000 520000000000 40 1 5242880 131072
|
||||
rpool 85899345920 412316860416 3 25 98304 1310720
|
||||
nvme-Samsung_SSD_970_EVO_Plus_500GB_S4EVNX0R200001-part2 85899345920 412316860416 3 25 98304 1310720
|
||||
@@ -0,0 +1 @@
|
||||
tank 47982397226598 43664981476204 4317415750394 91 27 DEGRADED 1.00
|
||||
@@ -0,0 +1,2 @@
|
||||
tank 47982397226598 28797591658086 19184805568512 60 3 ONLINE 1.00
|
||||
rpool 498216206336 85899345920 412316860416 17 - ONLINE 1.00
|
||||
@@ -0,0 +1,23 @@
|
||||
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
|
||||
9876543210123 / 28797591658086 scanned at 1101004800/s, 6543210987654 / 28797591658086 issued at 734003200/s
|
||||
1088516226 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
|
||||
@@ -0,0 +1,14 @@
|
||||
pool: tank
|
||||
state: ONLINE
|
||||
scan: scrub in progress since Sun Oct 4 00:24:01 2026
|
||||
13523942719488 / 28797591658086 scanned at 1298300000/s, 8400000000000 / 28797591658086 issued at 830000000/s
|
||||
0 repaired, 29.17% done, 06:49:34 to go
|
||||
config:
|
||||
|
||||
NAME STATE READ WRITE CKSUM
|
||||
tank ONLINE 0 0 0
|
||||
mirror-0 ONLINE 0 0 0
|
||||
ata-ST16000NM001G-2KK103_ZL200001 ONLINE 0 0 0
|
||||
ata-ST16000NM001G-2KK103_ZL200002 ONLINE 0 0 0
|
||||
|
||||
errors: No known data errors
|
||||
@@ -0,0 +1,38 @@
|
||||
pool: rpool
|
||||
state: ONLINE
|
||||
status: Some supported and requested features are not enabled on the pool.
|
||||
The pool can still be used, but some features are unavailable.
|
||||
action: Enable all features using 'zpool upgrade'. Once this is done,
|
||||
the pool may no longer be accessible by software that does not support
|
||||
the features. See zpool-features(7) for details.
|
||||
scan: scrub repaired 0 in 00:04:11 with 0 errors on Sun Jul 12 00:28:12 2026
|
||||
config:
|
||||
|
||||
NAME STATE READ WRITE CKSUM
|
||||
rpool ONLINE 0 0 0
|
||||
nvme-Samsung_SSD_970_EVO_Plus_500GB_S4EVNX0R200001-part2 ONLINE 0 0 0
|
||||
|
||||
errors: No known data errors
|
||||
|
||||
pool: tank
|
||||
state: ONLINE
|
||||
scan: scrub repaired 0 in 1 days 02:10:05 with 0 errors on Mon Sep 14 02:34:06 2026
|
||||
config:
|
||||
|
||||
NAME STATE READ WRITE CKSUM
|
||||
tank ONLINE 0 0 0
|
||||
raidz2-0 ONLINE 0 0 0
|
||||
ata-WDC_WD120EFBX-68B0EN0_D7JA0001 ONLINE 0 0 0
|
||||
ata-WDC_WD120EFBX-68B0EN0_D7JA0002 ONLINE 0 0 0
|
||||
ata-WDC_WD120EFBX-68B0EN0_D7JA0003 ONLINE 0 0 0
|
||||
ata-WDC_WD120EFBX-68B0EN0_D7JA0004 ONLINE 0 0 0
|
||||
logs
|
||||
mirror-1 ONLINE 0 0 0
|
||||
nvme-Samsung_SSD_980_PRO_1TB_S5P2NG0R100001-part1 ONLINE 0 0 0
|
||||
nvme-Samsung_SSD_980_PRO_1TB_S5P2NG0R100002-part1 ONLINE 0 0 0
|
||||
cache
|
||||
nvme-Samsung_SSD_980_PRO_1TB_S5P2NG0R100001-part2 ONLINE 0 0 0
|
||||
spares
|
||||
ata-WDC_WD120EFBX-68B0EN0_D7JA0009 AVAIL
|
||||
|
||||
errors: No known data errors
|
||||
Reference in New Issue
Block a user