feat(beefcake): move cold persist state off the SSD onto zstorage #801
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cold-persist"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Precise fix for the SSD pressure that paused the guest on 2026-07-21: move the cold state off the SSD, keep the hot state on it.
What the audit actually found
The guest 30.6G
/persistis mostly not data worth keeping on SSD:var/cache/restic-backups-*CacheDirectory, rebuildableroot/.cachevar/lib/jellyfinvar/logChange
Move the restic caches + jellyfin metadata (~19G) onto
/storage(virtiofs -> zstorage, 2.4T free). They still survive reboots, preserving the original intent (the restic caches were persisted deliberately so post-reboot runs do not re-fetch indexes from the remote sftp repos).forgejo deliberately stays on SSD. virtiofs is ~430x slower for git (see
forgejo.nix) and PR #756 fixed 2-7s repo pages by getting git off it. Moving/persistwholesale to zstorage would have re-broken that while leaving the caches on SSD -- exactly backwards.Why explicit fileSystems binds, not a second persistence root
impermanence emits bind units with
DefaultDependencies=falseand no ordering against/storage. At boot they could bind before the virtiofs mount exists, and services would silently write to the ephemeral root and lose data at the next reboot. UsingfileSystems+depends = [ "/storage" ]makes it explicit -- verified in the generated fstab:⚠️ NOT a plain deploy -- migrate first
Deploying alone would present empty dirs to jellyfin/restic (data still sits in
/persist). Before/with the deploy, on the guest:then deploy, confirm the binds are live (
findmnt /var/lib/jellyfin), verify jellyfin + a restic run, and only then remove the old copies from/persistto actually reclaim the SSD.Restic caches are rebuildable, so if you would rather not rsync 15G over virtiofs you can simply let restic repopulate them (first run after is slower).
Deferred deliberately
/root/.cache(5.1G) nests inside the wholesale-persisted/root./var/log(1.7G) -- capping journaldSystemMaxUseis the better lever.Verified
Config evaluates; fstab carries the ordering option on all four binds; tmpfiles creates the backing dirs. Not deployed -- given I caused the outage earlier today, I did not want to ship an impermanence change to this host unvalidated.
🤖 Generated with Claude Code
https://claude.ai/code/session_015dwmWkDcFN7CnZ5TmLK9nY