You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CSI ControllerExpandVolume previously dead-ended: the REST PUT
updated the VolumeDefinition spec but no reconcile path actually
grew the underlying block device or notified DRBD.
Added:
- storage.Provider gained ResizeVolume(ctx, vol). Implementations:
* lvm-thin: lvextend --size <MiB>MiB
* zfs: zfs set volsize=<MiB>M
* file: truncate -s <bytes> (works for both thick and thin)
* loopfile: truncate + losetup --set-capacity so the kernel
notices the new size on the loop device
- pkg/drbd.Adm.Resize: drbdadm resize --assume-clean <rd>
(--assume-clean skips the resync of the new bytes since they
were just allocated zero, otherwise growing 3 replicas would
serialise on each resync)
- pkg/luks.Resize: cryptsetup resize <dmName> --key-file - so the
dm-crypt target picks up the new lower-disk size; satellite-side
wiring lands when the per-resource encrypted flag flows through
ApplyResources.
- satellite reconciler applyStorage detects desired > usable on a
pre-existing volume, runs ResizeVolume, signals back through a
new return value; applyDRBD then runs drbdadm resize after Adjust.
Tests:
- pkg/storage/{lvm,zfs}_test.go pin the per-provider command shape
- pkg/satellite TestApplyTriggersResizeOnGrow asserts the full
lvextend → drbdadm resize sequence
- TestApplyNoResizeOnFreshCreate locks in "no resize when first
creating" so a fresh PVC doesn't get a spurious resize
End-to-end PVC-resize-with-checksum-verify lives on the 8.8 e2e
checklist; the building blocks are all in place.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Copy file name to clipboardExpand all lines: PLAN.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -403,7 +403,7 @@ The phases above closed the MVP slice and the csi-sanity REST contract. A deep a
403
403
404
404
### 8.2 Storage correctness
405
405
406
-
-[]**Volume resize**with and without LUKS. No endpoint today (`PUT /v1/resource-definitions/{rd}/volume-definitions/{vn}`doesn't grow the device). Path: VD update → reconciler sees new size → provider grow (`lvextend`/`zfs set`) → `cryptsetup resize` if LUKS layered → `drbdadm resize`. Pin via e2e: 1G PVC → write checksum → resize to 2G → verify checksum + new size on both replicas.
406
+
-[x]**Volume resize**plumbing (2026-05-09): `PUT /v1/resource-definitions/{rd}/volume-definitions/{vn}`already updated the spec; the satellite reconciler now picks up the size delta. Provider interface gained `ResizeVolume` (lvm-thin → `lvextend`, zfs → `zfs set volsize`, file/loopfile → `truncate` + `losetup -c`). On growth the reconciler runs the provider's resize, then `drbdadm resize --assume-clean <rd>` so the kernel re-reads the lower disk. `pkg/luks.Resize` adds the cryptsetup hook for the LUKS layer; satellite-side wiring of LUKS resize lands when the per-resource `encrypted` flag flows through ApplyResources (Phase 6 follow-up). Tests: `TestApplyTriggersResizeOnGrow`, `TestApplyNoResizeOnFreshCreate` for the satellite path; per-provider tests for the resize commands. **End-to-end with a real PVC + checksum verify is still on the e2e harness checklist** (8.8).
407
407
-[ ]**Backing-device failure under DRBD**. When the storage layer drops out, the satellite must detach the failed replica (don't oscillate it diskful↔diskless). Today nothing watches `/proc/drbd` for `disk:Failed`. Add an event hook in `Reconciler` that flips the replica to a Diskless attach via `drbdsetup detach` and surfaces a Status condition. e2e: pull the LV out from under DRBD, observe peer stays Primary, no I/O loss.
408
408
-[ ]**DRBD options hierarchy** controller → resource-group → resource-definition → resource. Today props are flat on each level; the rendered `.res` doesn't honour the upstream override order. Build a resolver in `pkg/drbd` that walks the inheritance chain and pin via a contract test that checks each level can override its parent.
409
409
-[ ]**`allow-two-primaries` + live migration** path. Ganesha-based RWX and KubeVirt VM live-migration both depend on a small window where two nodes are Primary. Today we set `auto-primary` on the lex-lowest replica only; multiple-primary is unsupported. Add the flag plumbing through DesiredResource and the corresponding fence/dual-primary safety on the satellite.
0 commit comments