feat(rustfs): grow the erasure set to 4 x 110Gi, deterministically #445
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/rustfs-resize"
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?
RustFS was provisioned at 4 x 55Gi -- about 110 GiB usable at 2+2 -- to match MinIO's per-drive size so the two were comparable. It has to hold the 144 GiB now on MinIO, and 136 GiB of that is the zot bucket alone, so at 55Gi the migration would have failed at its last and largest step. 4 x 110Gi is about 220 GiB usable.
This is Phase 0-B of the MinIO to RustFS migration. Phase 0-A (
98d8c77a) is live:persistentVolumeClaimRetentionPolicy.whenDeleted: Deleteplusforce: true, with ownerReferences confirmed present on all four claims.Why the claim template is renamed
databecomesdrive, and the rename is what makes the resize deterministic rather than a coin flip.volumeClaimTemplatesare immutable. Confirmed against the live API server:So this is a delete-and-recreate, performed by
force: true. Phase 0-A makes the delete garbage-collect the drives. That is necessary but not sufficient.A claim is named
<template>-<statefulset>-<ordinal>. Resizing alone keeps the namedata-rustfs-N, and then:kubernetes.io/pvc-protectionuntil their pods finish terminating — tens of secondsNothing errors. The store just stays small — the exact failure this line of work exists to prevent.
Renaming removes the race instead of hoping to win it. The new pods ask for
drive-rustfs-N, which cannot already exist, so they always get fresh claims at 110Gi. The old claims are owned by the deleted StatefulSet's UID and are collected on their own schedule; the ordering cannot change the outcome. Their PVs arereclaimPolicy: Delete, so the ZFS datasets go too.This is safe exactly once
RustFS holds 384K. The manifest records what to do instead next time:
zfs-nvme-128ksetsallowVolumeExpansion: trueand the CSI driver supports it, so a later resize expands the four PVCs in place and then brings the template up to match. Recreating this StatefulSet once it holds data is a data-loss event, not a resize.Pre-flight
tankfree on all five workers, against the ~72 GiB per drive the full migration needs:The 2+2 ratio is still an assumption and still unmeasured. It is called out in the manifest and must be measured (write 1 GiB, sum the four
/datadeltas) before the zot move relies on 220 GiB.Guard
tests/rustfs.shpins 110Gi and structurally couples the claim template name to the volumeMount that consumes it — a half-done rename produces a StatefulSet the API server accepts and pods that never mount a drive.It also anchors the two retention assertions to their YAML lines. They were plain
grep -F, and the comments added here quote both fields verbatim, so thewhenDeletedcontrol read NOT DETECTED until it was anchored — the third time this session a guard has matched its own explanation.bash tests/check.shexits 0.https://claude.ai/code/session_01KZoQin34jeyt6nDGqvJA76