LINSTOR rollout: flux-root, ZFS pools, Piraeus operator #5

Closed
opened 2026-11-01 23:54:12 +00:00 by ginjiruu · 4 comments
Owner

Storage leg of the migration (docs/linstor-zfs-handoff.md is the spec).

Status

  • Host prep (modules/zfs.nix, drbd.nix, storage-client.nix, hostIds, checks) — deployed
  • Data disks: by-id pinned for think-0{1,2,3}; stale ceph_bluestore labels + GPT wiped 2026-11-02
  • flux-root on disk (30-flux-root.yaml: flux2 2.10.0 bundle + GitRepository/Kustomization reading lab/clusters clusters/<name> over public https; sops-age secret assembled by the converge unit) — on dev, vm:e2e proving it
  • lab/clusters + machine-configs main pushes after vm:e2e green -> fleet gets flux
  • Pools: on main, zfs-pool-init fires per think; verify tank + tank/linstor/pool0 via zpool list
  • clusters/think/storage/: piraeus-operator HelmRelease (pin >= 2.10, crds-first KS per the generic-templates/openebs-zfs-operator pattern)
  • LinstorCluster CR: drbd-module-loader LB_HOW=deps_only (NixOS loads host drbd9 9.2.16; satellite images must not try to compile it)
  • LinstorSatelliteConfiguration: zfs pool tank/linstor/pool0, nodeAffinity thinks ONLY (Pis lack drbd per §5.7 RESTRICT; diskless TieBreakers ride the thinks too)
  • StorageClasses linstor-csi-2r (AutoPlace 2 + diskless TieBreaker) / -1r / -tmp (§4.9); al-extents resource-group property (§5.8)
  • VolumeSnapshotClass + §7 gate tests A/B/C (snapshot->clone timing, refreservation) through the k3s-packaged snapshot controller
  • RWO taint keeping stateful pods off the Pis (§5.7, manifests side)
  • Retire converge-era raw manifests as HelmReleases adopt them (converge timer self-masks when helmreleases exist)

Open doc questions to close during implementation (§11)

  • LinstorSatelliteConfiguration ZFS field name against the pinned operator version's CRD (zfsPool vs parent dataset naming)
  • volblocksize/volmode/refreservation exposure as pool properties (host sets them on pool0; LINSTOR must not fight them)
  • DRBD 9.2.16 <-> pinned piraeus version pairing
Storage leg of the migration (`docs/linstor-zfs-handoff.md` is the spec). ## Status - [x] Host prep (`modules/zfs.nix`, `drbd.nix`, `storage-client.nix`, hostIds, checks) — deployed - [x] Data disks: by-id pinned for think-0{1,2,3}; stale ceph_bluestore labels + GPT wiped 2026-11-02 - [x] flux-root on disk (`30-flux-root.yaml`: flux2 2.10.0 bundle + GitRepository/Kustomization reading lab/clusters `clusters/<name>` over public https; sops-age secret assembled by the converge unit) — on dev, vm:e2e proving it - [ ] lab/clusters + machine-configs main pushes after vm:e2e green -> fleet gets flux - [ ] Pools: on main, `zfs-pool-init` fires per think; verify `tank` + `tank/linstor/pool0` via zpool list - [ ] `clusters/think/storage/`: piraeus-operator HelmRelease (pin >= 2.10, crds-first KS per the `generic-templates/openebs-zfs-operator` pattern) - [ ] LinstorCluster CR: drbd-module-loader `LB_HOW=deps_only` (NixOS loads host drbd9 9.2.16; satellite images must not try to compile it) - [ ] LinstorSatelliteConfiguration: zfs pool `tank/linstor/pool0`, nodeAffinity thinks ONLY (Pis lack drbd per §5.7 RESTRICT; diskless TieBreakers ride the thinks too) - [ ] StorageClasses `linstor-csi-2r` (AutoPlace 2 + diskless TieBreaker) / `-1r` / `-tmp` (§4.9); al-extents resource-group property (§5.8) - [ ] VolumeSnapshotClass + §7 gate tests A/B/C (snapshot->clone timing, refreservation) through the k3s-packaged snapshot controller - [ ] RWO taint keeping stateful pods off the Pis (§5.7, manifests side) - [ ] Retire converge-era raw manifests as HelmReleases adopt them (converge timer self-masks when helmreleases exist) ## Open doc questions to close during implementation (§11) - LinstorSatelliteConfiguration ZFS field name against the pinned operator version's CRD (`zfsPool` vs parent dataset naming) - volblocksize/volmode/refreservation exposure as pool properties (host sets them on pool0; LINSTOR must not fight them) - DRBD 9.2.16 <-> pinned piraeus version pairing
Author
Owner

Storage manifests landed on lab/clusters main @ 2b3dc784: clusters/think/storage with operator (piraeus chart 2.12.1, installCRDs, KS-healthCheck-gated CR tree via dependsOn) and cluster CRs (LinstorCluster + satellite config thinks-only, zfsPool tank/linstor/pool0, LB_HOW=deps_only, SCs 2r/1r/tmp with TieBreaker+al-extents via property.linstor.csi.linbit.com, VolumeSnapshotClass).

Field names closed against sources, not memory:

  • LinstorSatelliteConfiguration storagePools items: zfsPool.zPool (operator 2.12.1 CRD rendered from chart). dataset-vs-zpool passthrough still a runtime gate check.
  • drbd-module-loader env: podTemplate initContainers override (docs/how-to/drbd-loader.md), LB_HOW=deps_only, fallback documented inline.
  • SC parameter namespaces: pkg/volume/parameter.go + pkg/linstor/const.go (linstor master): linstor.csi.linbit.com/* = recognized keys lowercased; property.linstor.csi.linbit.com/* = raw RG property with case kept (that is how TieBreaker/DisklessPlugin survives; bare slash-keys would be dropped as unknown namespace).

Host-side bug found while wiring: modules/drbd.nix loaded kernelModules drbd9, but the nixpkgs out-of-tree package registers the module as drbd (modprobe drbd9 = not found; modinfo drbd = updates/drbd.ko 9.2.16). Fleet ran DRBD-less since host-prep, silently. Fixed + drbd_transport_tcp added (softdep only pulls handshake; LINSTOR defaults to tcp transport). machine-configs main 584a118.

Next: vm:check green on dev tip -> machine-configs main push -> flux + zfs-pool-init land on the thinks -> operator reconciles -> gate tests A/B/C.

Storage manifests landed on lab/clusters main @ 2b3dc784: clusters/think/storage with operator (piraeus chart 2.12.1, installCRDs, KS-healthCheck-gated CR tree via dependsOn) and cluster CRs (LinstorCluster + satellite config thinks-only, zfsPool tank/linstor/pool0, LB_HOW=deps_only, SCs 2r/1r/tmp with TieBreaker+al-extents via property.linstor.csi.linbit.com, VolumeSnapshotClass). Field names closed against sources, not memory: - LinstorSatelliteConfiguration storagePools items: zfsPool.zPool (operator 2.12.1 CRD rendered from chart). dataset-vs-zpool passthrough still a runtime gate check. - drbd-module-loader env: podTemplate initContainers override (docs/how-to/drbd-loader.md), LB_HOW=deps_only, fallback documented inline. - SC parameter namespaces: pkg/volume/parameter.go + pkg/linstor/const.go (linstor master): linstor.csi.linbit.com/* = recognized keys lowercased; property.linstor.csi.linbit.com/* = raw RG property with case kept (that is how TieBreaker/DisklessPlugin survives; bare slash-keys would be dropped as unknown namespace). Host-side bug found while wiring: modules/drbd.nix loaded kernelModules drbd9, but the nixpkgs out-of-tree package registers the module as drbd (modprobe drbd9 = not found; modinfo drbd = updates/drbd.ko 9.2.16). Fleet ran DRBD-less since host-prep, silently. Fixed + drbd_transport_tcp added (softdep only pulls handshake; LINSTOR defaults to tcp transport). machine-configs main 584a118. Next: vm:check green on dev tip -> machine-configs main push -> flux + zfs-pool-init land on the thinks -> operator reconciles -> gate tests A/B/C.
Author
Owner

vm harness: flux chain fully green (dev tip bded8c7)

Three real bugs found and fixed via the VM, all of which would have hit the think fleet:

  1. Flux bundle NetworkPolicies crash-looped every controller. The pinned install.yaml's allow-egress selects all flux pods; cilium classifies kubelet host-origin probes as world, so /healthz got 'drop (Policy denied) -> pod:9440 tcp SYN' while reconciliation itself was fine. Fix: fluxInstallFiltered strips NetworkPolicy docs at render time (43->40 docs). k3s re-applies the manifests dir every 5 min, so live deletion was never a fix.
  2. systemctl mask cannot retire the converge timer on NixOS (unit files are /etc store symlinks; mask's symlink collides). Retirement is now a marker file /var/lib/k3s-manifests-converge/retired checked at the top of each tick; timer keeps ticking (cheap no-op) and self-heals if HelmRelease CRDs ever vanish.
  3. A leaked nix escape in that unit: the store script literally contained mkdir -p "$${RETIRED%/*}"; bash made a garbage relative dir and the marker redirect ENOENT'd every tick. Hardcoded path; proven on the VM (marker written 30s after switch).

Also adopted from studying niki-on-github/nixos-k3s (docs/niki-nixos-k3s-study.md): disable-network-policy on servers (k3s's kube-router netpol controller is a redundant second engine beside cilium; both cilium's k3s guide and their module disable it).

vm:check on bded8c7: node Ready, 7/7 flux deployments Available with zero manual intervention, podinfo HelmReady from git, converge marker self-written, DNS green. Next: push machine-configs main -> fleet adoption (flux-root + drbd fix + zfs pools on the thinks), then Piraeus reconcile behind the KS dependsOn.

## vm harness: flux chain fully green (dev tip bded8c7) Three real bugs found and fixed via the VM, all of which would have hit the think fleet: 1. **Flux bundle NetworkPolicies crash-looped every controller.** The pinned install.yaml's allow-egress selects all flux pods; cilium classifies kubelet host-origin probes as world, so /healthz got 'drop (Policy denied) -> pod:9440 tcp SYN' while reconciliation itself was fine. Fix: fluxInstallFiltered strips NetworkPolicy docs at render time (43->40 docs). k3s re-applies the manifests dir every 5 min, so live deletion was never a fix. 2. **systemctl mask cannot retire the converge timer on NixOS** (unit files are /etc store symlinks; mask's symlink collides). Retirement is now a marker file /var/lib/k3s-manifests-converge/retired checked at the top of each tick; timer keeps ticking (cheap no-op) and self-heals if HelmRelease CRDs ever vanish. 3. **A leaked nix escape in that unit**: the store script literally contained mkdir -p "\$${RETIRED%/*}"; bash made a garbage relative dir and the marker redirect ENOENT'd every tick. Hardcoded path; proven on the VM (marker written 30s after switch). Also adopted from studying niki-on-github/nixos-k3s (docs/niki-nixos-k3s-study.md): disable-network-policy on servers (k3s's kube-router netpol controller is a redundant second engine beside cilium; both cilium's k3s guide and their module disable it). vm:check on bded8c7: node Ready, 7/7 flux deployments Available with zero manual intervention, podinfo HelmReady from git, converge marker self-written, DNS green. Next: push machine-configs main -> fleet adoption (flux-root + drbd fix + zfs pools on the thinks), then Piraeus reconcile behind the KS dependsOn.
Author
Owner

Storage bring-up complete 2026-11-02, Pi-facing path settled.

Fleet state: 7/7 linstor nodes Online (3 diskful thinks with ZFS pool
tank/linstor/pool0 Ok + 4 diskless Pi satellites), LinstorCluster
Applied/Available/Configured, csi-node 3/3 everywhere, snapshot API live.

Verified matrix (raw receipts in flux-clusters docs):

  • RWO provision/attach/mount/IO on think-01: PASS. 2 diskful UpToDate +
    diskless quorum tiebreaker on third think, RG landed
    DrbdOptions/Disk/al-extents=32767.
  • RWX on pi-01 via NFS-Ganesha: PASS. nfs4.2 mount of
    linstor-csi-nfs.piraeus.svc export, probe IO + clean delete lifecycle.
  • RWO on Pi: architecturally impossible with this stack. Pi satellites
    report DRBD9_KERNEL unsupported (by design, $5.7 - no drbd on
    kernel-pi), and linstor-csi v1.13.2 contains zero iSCSI attach code.
    iSCSI to Pi would need LINSTOR Gateway; deferred, open-iscsi on the
    Pi hosts stays as standby plumbing.

DECISION recorded: Pis consume think storage as NFS RWX; RWO workloads
schedule on thinks. Full intent + evidence trail:
flux-clusters docs/storage-architecture.md and docs/storage-debugging.md
(committed through 8359f3b3).

Host-side modules needed no changes for this - storage-client.nix
(NFSv4 client + open-iscsi) was already correct on all four Pis.

Storage bring-up complete 2026-11-02, Pi-facing path settled. Fleet state: 7/7 linstor nodes Online (3 diskful thinks with ZFS pool tank/linstor/pool0 Ok + 4 diskless Pi satellites), LinstorCluster Applied/Available/Configured, csi-node 3/3 everywhere, snapshot API live. Verified matrix (raw receipts in flux-clusters docs): - RWO provision/attach/mount/IO on think-01: PASS. 2 diskful UpToDate + diskless quorum tiebreaker on third think, RG landed DrbdOptions/Disk/al-extents=32767. - RWX on pi-01 via NFS-Ganesha: PASS. nfs4.2 mount of linstor-csi-nfs.piraeus.svc export, probe IO + clean delete lifecycle. - RWO on Pi: architecturally impossible with this stack. Pi satellites report DRBD9_KERNEL unsupported (by design, $5.7 - no drbd on kernel-pi), and linstor-csi v1.13.2 contains zero iSCSI attach code. iSCSI to Pi would need LINSTOR Gateway; deferred, open-iscsi on the Pi hosts stays as standby plumbing. DECISION recorded: Pis consume think storage as NFS RWX; RWO workloads schedule on thinks. Full intent + evidence trail: flux-clusters docs/storage-architecture.md and docs/storage-debugging.md (committed through 8359f3b3). Host-side modules needed no changes for this - storage-client.nix (NFSv4 client + open-iscsi) was already correct on all four Pis.
Author
Owner

Closing — delivered, commit trail

All checklist items landed live or were mooted by better outcomes. mc = machine-configs, fc = lab/clusters (flux-clusters).

Host prep + flux-root

  • flux-root on disk (0e5aa43, ADR-0004 cd365d6): flux self-bootstraps from rendered Cilium/flux manifests (9d1330a).
  • Converge retirement is a marker file, not systemctl mask — mask can't work on NixOS store symlinks (a150249, quoting fix ebaa523). Flux bundle NetworkPolicies stripped: cilium classifies kubelet host-origin probes as world and crash-looped the controllers (a150249). rpfilter dropped Cilium bpf host replies (5404beb).
  • vm:check green on bded8c7 (node Ready, 7/7 flux deployments Available, podinfo HelmReady) -> main push -> fleet adoption, as planned.

Data disks + pools

  • think-0{1,2,3} LINSTOR data disks pinned by real by-id paths (99d9363), stale ceph labels wiped.
  • Boot-time tank import fixed (82e147d: NixOS never auto-imports non-root pools) then superseded by native boot.zfs.extraPools (564a274). think-01 unattended-reboot proof: zfs-import-tank success, tank ONLINE.
  • tank/linstor/pool0 created and Ok on all 3 thinks; thin tier tank/linstor/thin0 added post-ticket (1ab3607, fc c7c71137).

DRBD host fix (bug found during rollout)

  • nixpkgs registers the out-of-tree module as drbd, not drbd9; fleet ran DRBD-less silently. Fixed 584a118, transport_tcp added, fleet-wide verified.

Operator + CRs (fc)

  • Storage leg 2b3dc784: piraeus-operator chart 2.12.1 (crds-first via dependsOn, fda8882e), LinstorCluster + satellite configs (thinks diskful, zfsPool tank/linstor/pool0, LB_HOW=deps_only), SCs 2r/1r/tmp with diskless TieBreaker + al-extents via property.linstor.csi.linbit.com namespace (06327ef0, quorum value lowercase 3e93cefa), VolumeSnapshotClass + snapshot-controller CRDs (7d188654).

Pi tier and the §5.7 reversal

  • Pi started storageless (fc 43282fc7, e3c49b47), then the restriction was reversed: DRBD loaded on kernel-pi (eda283a, cross-build fix 3196ad5) after the kernel 6.18.60 bump (1207344, KCFLAGS waiver 603eca0). Pis now attach diskless DRBD, so the "RWO taint keeping pods off Pis" item is moot — Pis run RWO.
  • Satellite hostNetwork move vs k3s#6185 stale-flannel wedge (9da44a97, container-name fix 892bec29), firewall prerequisite 84198c7, RWX-only-2r ValidatingAdmissionPolicy.

Gate tests / verification matrix (raw receipts in fc docs/storage-architecture.md + docs/storage-debugging.md, 8359f3b3)

  • RWO provision/attach/mount/IO on think-01: PASS, RG landed al-extents=32767.
  • RWX on pi-01 via NFS-Ganesha nfs4.2: PASS incl. delete lifecycle.
  • Snapshots/expand: online snap <=5s, cross-node restore 13s, online expand ~34s.
  • Fleet state at close: 7/7 linstor nodes Online, DRBD layer healthy everywhere, 3/3 csi-node, snapshot API live. Post-ticket: SC benchmark annotations (fc cfc83bfb), kured + reboot-marker (mc afddd0e).

§11 doc questions were closed against sources, not memory (comment 1).

## Closing — delivered, commit trail All checklist items landed live or were mooted by better outcomes. mc = machine-configs, fc = lab/clusters (flux-clusters). **Host prep + flux-root** - flux-root on disk (`0e5aa43`, ADR-0004 `cd365d6`): flux self-bootstraps from rendered Cilium/flux manifests (`9d1330a`). - Converge retirement is a marker file, not systemctl mask — mask can't work on NixOS store symlinks (`a150249`, quoting fix `ebaa523`). Flux bundle NetworkPolicies stripped: cilium classifies kubelet host-origin probes as world and crash-looped the controllers (`a150249`). rpfilter dropped Cilium bpf host replies (`5404beb`). - vm:check green on bded8c7 (node Ready, 7/7 flux deployments Available, podinfo HelmReady) -> main push -> fleet adoption, as planned. **Data disks + pools** - think-0{1,2,3} LINSTOR data disks pinned by real by-id paths (`99d9363`), stale ceph labels wiped. - Boot-time tank import fixed (`82e147d`: NixOS never auto-imports non-root pools) then superseded by native `boot.zfs.extraPools` (`564a274`). think-01 unattended-reboot proof: zfs-import-tank success, tank ONLINE. - `tank/linstor/pool0` created and Ok on all 3 thinks; thin tier `tank/linstor/thin0` added post-ticket (`1ab3607`, fc `c7c71137`). **DRBD host fix (bug found during rollout)** - nixpkgs registers the out-of-tree module as `drbd`, not `drbd9`; fleet ran DRBD-less silently. Fixed `584a118`, transport_tcp added, fleet-wide verified. **Operator + CRs (fc)** - Storage leg `2b3dc784`: piraeus-operator chart 2.12.1 (crds-first via dependsOn, `fda8882e`), LinstorCluster + satellite configs (thinks diskful, zfsPool tank/linstor/pool0, LB_HOW=deps_only), SCs 2r/1r/tmp with diskless TieBreaker + al-extents via `property.linstor.csi.linbit.com` namespace (`06327ef0`, quorum value lowercase `3e93cefa`), VolumeSnapshotClass + snapshot-controller CRDs (`7d188654`). **Pi tier and the §5.7 reversal** - Pi started storageless (fc `43282fc7`, `e3c49b47`), then the restriction was reversed: DRBD loaded on kernel-pi (`eda283a`, cross-build fix `3196ad5`) after the kernel 6.18.60 bump (`1207344`, KCFLAGS waiver `603eca0`). Pis now attach diskless DRBD, so the "RWO taint keeping pods off Pis" item is moot — Pis run RWO. - Satellite hostNetwork move vs k3s#6185 stale-flannel wedge (`9da44a97`, container-name fix `892bec29`), firewall prerequisite `84198c7`, RWX-only-2r ValidatingAdmissionPolicy. **Gate tests / verification matrix** (raw receipts in fc docs/storage-architecture.md + docs/storage-debugging.md, `8359f3b3`) - RWO provision/attach/mount/IO on think-01: PASS, RG landed al-extents=32767. - RWX on pi-01 via NFS-Ganesha nfs4.2: PASS incl. delete lifecycle. - Snapshots/expand: online snap <=5s, cross-node restore 13s, online expand ~34s. - Fleet state at close: 7/7 linstor nodes Online, DRBD layer healthy everywhere, 3/3 csi-node, snapshot API live. Post-ticket: SC benchmark annotations (fc `cfc83bfb`), kured + reboot-marker (mc `afddd0e`). §11 doc questions were closed against sources, not memory (comment 1).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/machine-configs#5
No description provided.