diff --git a/docs/changelog.md b/docs/changelog.md index 1d75941e..eaf90c6c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,21 @@ docstring gives: it is a record, not a claim about now. ## 2026-11-21 +- **`trinity`'s photo disk passes no SMART through, and the lock-directory + change is reverted.** The first run of `smart-state-sensitive` read the NVMe + and the HOUSEHOLD drive and returned nothing for the photo disk. Its Seagate + enclosure (`0bc2:ab18`, `uas`) failed "Read Device Identity" under + `-d sat`, `-d sat,12` and `-T permissive`. Dropping the disk off `uas` + was judged not worth a reboot and slower transfers, so the gap is recorded + in `hardware.md` and the docs that promised a row for it. Separately, + #1597 merged with a commit that moved the job's lock into the textfile + directory, to get around `ProtectSystem=strict` making `/run/lock` + read-only. That left a lock file beside the metrics. The lock goes back to + `/run/lock`, and the unit names `/run/lock` in `ReadWritePaths`, which grants + nothing new because the directory is world-writable. The monitoring host's + `homelab-smart-state.service`, sandboxed the same way without it, exits 0 + daily, so whether strict blocks `/run/lock` there is not settled. + - **`trinity` reads SMART from its own disks.** It was the one host with a checkout and Alloy that collected none, so a failing NVMe under the password vault, or a failing photo disk, would have shown first as I/O errors. A new diff --git a/docs/hardware.md b/docs/hardware.md index bb74f677..092de1c1 100644 --- a/docs/hardware.md +++ b/docs/hardware.md @@ -472,7 +472,11 @@ the runbook rather than backed up. 2026-09-28 as LUKS2 with `ext4` inside, opened at boot by a keyfile on the encrypted root, with a recovery passphrase in a second keyslot ([ADR-0054](adr/0054-encrypt-trinitys-disks-and-seal-the-root-key-to-the-tpm.md)). - It reports itself as a *PS4 Game Drive*. + It reports itself as a *PS4 Game Drive*. Its enclosure (Seagate + `0bc2:ab18`, on the `uas` driver) passes no SMART through: `smartctl` + with `-d sat`, `-d sat,12` and `-T permissive` all fail to read its + identity (2026-11-21). So no rule can warn of its failure in advance, and a + dying disk shows first as I/O errors and failed backup jobs. One consumer spinning disk with no mirror, so the off-estate copy [ADR-0023](adr/0023-keep-the-household-recovery-path-outside-the-estate.md) requires is what protects it — the same as would have been true of a bought diff --git a/docs/runbooks/build-the-sensitive-tier-host.md b/docs/runbooks/build-the-sensitive-tier-host.md index 1a67fdcf..0f6ae93b 100644 --- a/docs/runbooks/build-the-sensitive-tier-host.md +++ b/docs/runbooks/build-the-sensitive-tier-host.md @@ -692,7 +692,7 @@ the installer primes it too. `verify-backups-sensitive.prom` must read exit code `0`. And `smart-state-sensitive`, daily at 08:30, which reads SMART from the NVMe -and the photo disk as root. It needs `smartmontools` from step 4. The +as root. It needs `smartmontools` from step 4. The installer primes it, so read what it found straight away: ```bash @@ -701,9 +701,10 @@ grep -E '^homelab_smart_(devices|healthy)' /var/lib/node_exporter/textfile_colle ``` The job's exit code must be `0`, and `homelab_smart_healthy` must carry a row -for `nvme0n1` and one for the photo disk. A USB disk whose bridge does not -pass SMART through is left out with a warning in -`journalctl -u homelab-smart-state-sensitive`, not counted as healthy. +for `nvme0n1`. The photo disk has none: its enclosure passes no SMART through +(`docs/hardware.md`), so `homelab_smart_devices` counts it and nothing else +is read from it. The HOUSEHOLD drive, while it is plugged in, has a row of its +own. ## 13. Before the first real photo, document or vault item diff --git a/docs/runbooks/schedule-maintenance.md b/docs/runbooks/schedule-maintenance.md index 709763b9..a0066b66 100644 --- a/docs/runbooks/schedule-maintenance.md +++ b/docs/runbooks/schedule-maintenance.md @@ -768,7 +768,9 @@ MANIFEST. That is where `oracle`'s copies are verified, without a key on deletes a set it is reading. `smart-state-sensitive` is the monitoring host's local `smart-state` for -`trinity`'s own disks: the boot NVMe and the USB photo disk at `/srv/immich`. +`trinity`'s own disks. In practice that is the boot NVMe: the USB photo disk +at `/srv/immich` sits in an enclosure that passes no SMART through +([`hardware.md`](../hardware.md)). It runs as root for the same reason, and writes `smart-state-trinity.prom`, which `SmartStateStale` and the drive rules read like any other host's. It is not `make smart-state`, because that target also renders the baseline table diff --git a/systemd/README.md b/systemd/README.md index c8648559..a7e701c7 100644 --- a/systemd/README.md +++ b/systemd/README.md @@ -75,7 +75,7 @@ instead. | `homelab-backup-sensitive` | daily 04:30 | Quiesces the tier and archives its volumes | | `homelab-backup-library` | daily 05:15 | Archives Immich's library and copies it to `oracle` | | `homelab-verify-backups-sensitive` | daily 06:30 | Proves every volume and library set still decrypts, and `oracle`'s copies still hash to their MANIFESTs | -| `homelab-smart-state-sensitive` | daily 08:30 | Reads SMART from `trinity`'s NVMe and photo disk, as root | +| `homelab-smart-state-sensitive` | daily 08:30 | Reads SMART from `trinity`'s NVMe, as root (the photo disk's enclosure passes none) | ## On agent hosts diff --git a/systemd/sensitive/homelab-smart-state-sensitive.service b/systemd/sensitive/homelab-smart-state-sensitive.service index c147d436..bf3508f8 100644 --- a/systemd/sensitive/homelab-smart-state-sensitive.service +++ b/systemd/sensitive/homelab-smart-state-sensitive.service @@ -1,5 +1,11 @@ -# SMART health for trinity's own disks: the boot NVMe that holds the tier, and -# the USB disk at /srv/immich that holds the photographs (ADR-0064). +# SMART health for trinity's own disks: the boot NVMe that holds the tier. +# +# NOT THE PHOTO DISK. The USB disk at /srv/immich sits in a Seagate enclosure +# (0bc2:ab18, on the uas driver) that answers no ATA pass-through: -d sat, +# -d sat,12 and -T permissive all fail "Read Device Identity" (2026-11-21). +# smartctl still returns a device, so homelab_smart_devices counts it, but it +# carries no health series and no rule can page on it. Its protection is the +# nightly copy to oracle and verify-backups-sensitive's re-read of it. # # The monitoring host's homelab-smart-state.service, run on the other host with # a checkout, and that unit explains every directive below; this one states @@ -17,13 +23,11 @@ # ioctls need raw device access, and no group substitutes. Nothing here runs as # @RUN_USER@, so the unit reads that user's checkout and writes one directory. # -# ITS LOCK LIVES IN THE TEXTFILE DIRECTORY. run-scheduled.sh opens -# ${HOMELAB_LOCK_DIR:-/run/lock}/homelab-.lock before it runs anything, and -# ProtectSystem=strict leaves every path read-only but /dev, /proc, /sys and -# the ReadWritePaths below, /run/lock included. This job shares no lock with -# any other, so its own lock file can sit in the one directory it may write; -# node_exporter reads only *.prom there. Narrower than opening /run/lock, which -# holds other programs' locks. +# /run/lock IS NAMED IN ReadWritePaths because run-scheduled.sh opens its lock +# there before it runs anything, and ProtectSystem=strict is documented to +# leave everything outside /dev, /proc, /sys and ReadWritePaths read-only. The +# directory is already world-writable (1777), so naming it grants this unit +# nothing an unprivileged user lacks. # # THE HOUSEHOLD DRIVE IS READ WHILE IT IS PLUGGED IN, and that is fine. It is # attached here between copies (ADR-0073) and leaves with the holder; its @@ -38,7 +42,6 @@ User=root Group=root WorkingDirectory=@DEPLOY_ROOT@ EnvironmentFile=-/etc/default/homelab-timers -Environment=HOMELAB_LOCK_DIR=/var/lib/node_exporter/textfile_collector ExecStart=@DEPLOY_ROOT@/scripts/run-scheduled.sh --job smart-state-sensitive -- /usr/bin/make -C @DEPLOY_ROOT@ smart-state-sensitive TimeoutStartSec=300 Restart=no @@ -50,7 +53,7 @@ RestrictRealtime=true PrivateTmp=true ProtectHome=read-only ProtectSystem=strict -ReadWritePaths=/var/lib/node_exporter/textfile_collector +ReadWritePaths=/var/lib/node_exporter/textfile_collector /run/lock ProtectKernelTunables=true ProtectKernelModules=true ProtectControlGroups=true