docs(spike): stable intermediary mount — swap drive underneath (C1-immune, no-restart)
Live-validated on demo guest 9201 (felhom-flash throwaway): shared/slave mount propagation delivers host->guest drive swaps live with no restart and no pct change; bind source = permanent stable dir => inherently C1-immune (clean boot with drive absent). nsenter fallback non-viable on unprivileged LXC; ro-tmpfs placeholder is the CAP_DAC_OVERRIDE-proof fail-close. Report-only, no code change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,30 @@
|
||||
|
||||
---
|
||||
|
||||
# REPORT — SPIKE: stable intermediary mount (swap the backing drive underneath) (2026-06-15)
|
||||
|
||||
## Type
|
||||
Architecture spike — report-only + live throwaway experiments on `felhom-flash` (`/dev/sdc1`) on demo guest 9201 (`felhom-pve`, PVE 9.2.2, unprivileged LXC). No production code, no version bump. Full doc: [documentation/audits/SPIKE-intermediary-mount-2026-06-15.md](documentation/audits/SPIKE-intermediary-mount-2026-06-15.md). Decides the *bigger architecture* behind the **C1 critical bug** surfaced in the B3 run below; the self-heal hook ships separately as the immediate C1 net.
|
||||
|
||||
## Result
|
||||
**Viable and strictly better than today's per-drive `pct set -mpN` model.** Bind a *permanent* stable host dir into the guest once (one provision-time reboot), then mount/unmount the real drive **underneath it host-side** — changes reach the running guest **live, no restart, no `pct` change** — via `shared`(host)/`slave`(guest) mount propagation that PVE/LXC delivers automatically. Proven both directions (mount appears / unmount disappears), both bind forms.
|
||||
|
||||
**Inherently C1-immune (headline):** rebooted guest 9201 with the drive **absent** → clean boot in 12 s, because the `mp` bind source is the always-present stable dir, not `<drive>/felhom-data` (which vanishes today → guest brick). End-state: 9201 restored to original config (mp0/1/2/9), 25 containers healthy; all experiment mounts/dirs/artifacts removed; `felhom-usb`/`sda`/PBS/`local(-lvm)` never touched.
|
||||
|
||||
## Findings / decisions
|
||||
- **Q1 propagation:** ✅ live no-restart, both forms; guest receives binds as `shared,slave` (no custom `lxc.mount.entry` flags needed).
|
||||
- **Q2 nsenter fallback:** ❌ not viable on the unprivileged LXC (`mount: must be superuser`; block device absent from guest `/dev`). **Use propagation.**
|
||||
- **Q3 idmap:** ✅ guest uid/gid 1000 → host 101000 read/write unchanged; no regression.
|
||||
- **Q4 fail-closed:** ✅ naturally fail-closed (bare stable dir host-root-owned/unmapped → guest can't write). **`chmod 0000` is reliable only on a host-root-owned dir** — container-root's `CAP_DAC_OVERRIDE` bypasses 0000 on a *mapped*-owned dir (proven). **ro tmpfs placeholder = the capability-proof EROFS fail-close**, auto-shadowed by the drive on reconnect, auto-re-exposed on eject. App-stop stays primary.
|
||||
- **Q5 C1 immunity:** ✅ reboot-with-drive-absent boots clean.
|
||||
- **Q6 round-trip:** ✅ eject/reconnect = pure host `mount`/`umount`, no restart; reboot mid-eject = no brick.
|
||||
- **Q7/Q8 fit:** parent-bind makes enroll/plug/eject/reconnect **all restart-free**; only whole-guest decommission touches the bind. Migration/FileBrowser cleaner. **Confinement correction:** bind only `<raw>/felhom-data` onto the stable path (proven — customer's `dump/images/private/lost+found` stay out of the guest), not the raw whole-drive mount.
|
||||
|
||||
## Fork picks (for the build spec)
|
||||
parent-bind form · propagation (not nsenter) · ro-placeholder fail-close (+ host-root-owned dir as 2nd layer) · `HDD_PATH` kept identical via in-guest bind/symlink *or* repoint (decide) · agent mounts `<raw>/felhom-data` onto the stable path. See the doc's FORK LIST + current→intermediary migration sketch.
|
||||
|
||||
---
|
||||
|
||||
# REPORT — B3: live unattended storage-lifecycle exercise + feature sweep (2026-06-15)
|
||||
|
||||
## Type
|
||||
|
||||
Reference in New Issue
Block a user