feat: tiered zfs pools and a shared steam library #127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "tiered-storage"
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?
twilight and emergent keep everything on a single hard drive, with an NVMe that was only a read cache (L2ARC). Every write and every cache miss waited on the hard drive, and twilight's is shingled (ST8000DM004): in one hour of uptime processes spent 17 minutes stalled on IO, with writes regularly waiting seconds. This shows up as hitching in games.
What changes
storage.zfs.poolgainsspecialandlogdevice lists besidecache, and a per-devicesize, so one disk can be split between roles.special_small_blocks=128Kon its root dataset, so every dataset lives on the special vdev by default. A dataset opts out to the regular vdevs withspecialSmallBlocks = "0".programs.steam.sharedLibrary.enableadds a dataset mounted at/games/steam, owned by asteamgroup holding every user with Steam enabled, group-writable and excluded from snapshots. Proton prefixes are not shared, because Wine refuses to run from a prefix another user owns: inside Steam's sandbox each user's own~/.local/share/Steam/steamapps/compatdatais mounted over the library's.Before merging
zpool removecan evacuate the special vdev back onto the hard drive later.specialSmallBlocks = "0"before then.sharedLibrary.enable = falsereverts the Steam side.Migration: twilight
Disks are only partitioned at install time, so the layout this describes has to be made by hand. The pool stays online throughout.
sgdiskis in thegptfdiskpackage.Data written before the change stays on the hard drive until it is rewritten:
/games/steamunder Settings > Storage and move the installed games to it. The move rewrites them onto the NVMe.Existing snapshots keep the old copies on the hard drive until they expire.
zpool list -vshows how much sits on each device.Migration: emergent
Check first that the pool matches what the config says (a single hard drive plus the Intel NVMe as cache, ashift 12, ZFS 2.4 for
zfs rewrite):Then follow the twilight steps with these differences:
zpool statusprints it.NVME=/dev/disk/by-id/nvme-INTEL_SSDPEKNW010T9_BTNR03440DTZ1P0B,H=decca03cc77f0eadbbfd278c985, and+128Gfor thel2cpartition.rpool/local/steam(emergent is still on the legacy layout).sudo zfs rewrite -rx <mountpoint>for each mountpoint inzfs list -o name,mountpoint, with the same remount for/nix/store.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.