diff --git a/seaweed-block/docs/operator-guide.md b/seaweed-block/docs/operator-guide.md index ac25bad178..28c014a2ad 100644 --- a/seaweed-block/docs/operator-guide.md +++ b/seaweed-block/docs/operator-guide.md @@ -275,6 +275,7 @@ Every command on the pages above, and the test that runs it. | Command | Test | Kind | |---|---|---| | `blockmaster ... --cluster-spec ... --lifecycle-store ... --workspace-rpc ...` | `TestStandalonePlannedHandoffToTheSameHost` (`cmd/blockvolume`) | binary | +| `blockmaster ... --cluster-spec ... --expected-slots-per-volume 3 --lifecycle-product-loop-interval ...` (a replicated volume) | `TestDoubleFailoverReadsBackEveryAckedWrite`, `TestFencingRoundHealContinuesThePrimary` (`cmd/blockvolume`, run with `200ms`) | binary | | `blockvolume ... --durable-impl walstore-chunk ... --workspace-lease ...` | same | binary | | `sw-block ops workspace show`, `revoke --sealed-gen`, `move --clean` | same | binary | | `sw-block ops chunk detach --plain`, `chunk show`, `chunk cut` | same; `TestProcedureForcedMoveWithTheOldHostReturning` | binary | diff --git a/seaweed-block/docs/standalone-deployment.md b/seaweed-block/docs/standalone-deployment.md index c8e3b34b57..b053a17e00 100644 --- a/seaweed-block/docs/standalone-deployment.md +++ b/seaweed-block/docs/standalone-deployment.md @@ -132,6 +132,20 @@ Do these steps before you start blockvolume: `SWB_MASTER_EXPECTED_SLOTS`. blockmaster reads the file only at start: after you change it, run `sudo systemctl restart sw-blockmaster`. + **A replicated volume** (`replication_factor` above 1, in a + `--cluster-spec`) gets its primary from blockmaster's lifecycle loop, + which runs only when `--lifecycle-product-loop-interval` is set. Use + `100ms`, the value the shipped chart sets. With the default `0` the loop + is off and a replicated volume never gets a primary. The single-replica + start above needs no loop. + + ```bash + blockmaster --authority-store /var/lib/sw-block-master/authority \ + --lifecycle-store /var/lib/sw-block-master/lifecycle \ + --cluster-spec /etc/sw-block/cluster-spec.yaml --expected-slots-per-volume 3 \ + --lifecycle-product-loop-interval 100ms --listen 127.0.0.1:9180 + ``` + 3. **Start blockvolume with the identity of one slot.** `--volume-id`, `--replica-id` and `--server-id` (`SWB_VOLUME_ID`, `SWB_REPLICA_ID`, `SWB_SERVER_ID`) must equal one slot of the file: `v1`, `r1`, `s1` here. diff --git a/seaweed-block/docs/volume-lifecycle.md b/seaweed-block/docs/volume-lifecycle.md index 6d5c6a70c8..1c7ae1f786 100644 --- a/seaweed-block/docs/volume-lifecycle.md +++ b/seaweed-block/docs/volume-lifecycle.md @@ -118,6 +118,11 @@ blockmaster --authority-store /var/lib/sw-block-master/authority \ --chunk-filer FILER_GRPC --chunk-path /swblock/chunks ``` +This page's volumes have one replica. A volume with `replication_factor` +above 1 also needs `--lifecycle-product-loop-interval 100ms` (the shipped +chart's value; the default `0` turns the loop off and such a volume never gets +a primary): see [the replicated start](standalone-deployment.md). + With the example units: `SWB_MASTER_TOPOLOGY=` (empty), `SWB_MASTER_EXPECTED_SLOTS=1`, `SWB_MASTER_WORKSPACE_RPC=true`, and `--lifecycle-store`, `--cluster-spec`, `--chunk-filer` and `--chunk-path` in `SWB_MASTER_EXTRA_ARGS`. blockmaster