Skip to content

Commit 8fe810e

Browse files
kvapsclaude
andcommitted
docs(plan): add DRBD initial-sync-skip on replica-add
Adds Phase 8.1 follow-up item covering the upstream-LINSTOR shortcut that we don't currently implement: pre-seeding a new replica's DRBD metadata with the current GI from an existing UpToDate peer so DRBD-9's GI handshake skips the full initial-sync. Without it, every 2→3-replica transition resyncs the entire device — hours on multi-TiB volumes. The pieces span observer (read current-uuid from events2 device frames), Status (typed Resource.Status.Volumes[i].CurrentGi), controller (pick GI from peer Status, stamp on new replica's Spec.Volumes[i].SeedFromGi), satellite (drbdmeta new-current-uuid before drbdadm up), and a runtime e2e gate (tests/e2e/replica-add-no-resync.sh). Operationally critical for production rollouts: a stuck full-resync on every replica add saturates the cluster network and burns IO budget for hours on TiB-scale volumes. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
1 parent 5970875 commit 8fe810e

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

PLAN.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,16 @@ honest. Each item names the original Phase that ticked it.
506506

507507
- [ ] 100+ real golinstor traces captured against the Java oracle and replayed through `tests/contract` with zero diff (framework lands; trace corpus is empty, so the "contract diffs zero on MVP scope" exit-criterion is unverified).
508508

509-
### Phase 8.2 follow-up — Storage correctness
509+
### Phase 8.1 follow-up — DRBD invariants
510+
511+
- [ ] **Initial-sync skip on replica-add** (currently every 2→3-replica transition triggers a full resync of the whole volume — hours on multi-TiB devices). Upstream LINSTOR persists `DrbdCurrentGi` per (resource, volume) in PropsContainers and stamps a new replica's metadata with the existing peer's GI before `drbdadm up`; DRBD-9's GI handshake then sees the match and skips full sync. Pieces we need:
512+
- `pkg/satellite/observer.go` reads `current-uuid:` and `bitmap-uuid:` from drbdsetup events2 `device` frames (today only `disk:` is parsed → `DiskState`).
513+
- `Resource.Status.Volumes[i].CurrentGi` typed field (observed state, not Spec — written by satellite, read by controller).
514+
- When the controller adds a new replica (autoplacer / explicit place), it picks any existing UpToDate peer's `Status.Volumes[i].CurrentGi` and stamps the new `Resource.Spec.Volumes[i].SeedFromGi` (or one-shot `Spec.AssumeCleanFromPeer NodeName`).
515+
- Satellite reconciler reads `SeedFromGi`, runs `drbdmeta <minor> v09 <device> internal new-current-uuid --clear-bitmap` (or `drbdmeta set-gi`) **before** `drbdadm up` so the freshly-created metadata block carries the seed GI rather than zeros.
516+
- Pin via unit test (FakeExec captures the drbdmeta command line on first activation when SeedFromGi is set) + e2e (`tests/e2e/replica-add-no-resync.sh`: 2-replica RD → write known checksum → add 3rd replica → assert `drbd-overview` shows UpToDate within seconds, not hours).
517+
518+
510519

511520
- [ ] Volume resize end-to-end with a real PVC: write checksum, grow via REST, verify checksum + filesystem sees the new size. Currently only the satellite-side resize chain is unit-tested.
512521
- [ ] Backing-device failure e2e: pull the LV / disk out from under DRBD on a real-disk stand, assert peer stays Primary, source drops to Diskless. Satellite-side detach hook is unit-tested; real-stand exercise pending.

0 commit comments

Comments
 (0)