mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 02:57:37 +01:00
docs: a replicated volume needs blockmaster's lifecycle loop
With replication_factor above 1 under --cluster-spec, blockmaster assigns the primary through its lifecycle loop, which runs only with --lifecycle-product-loop-interval (100ms, as the shipped chart sets); the default 0 leaves such a volume without a primary. The single-replica starts need no loop. The operator guide names the tests that run the replicated start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0d47002a04
commit
e80f046ba1
3 files changed
+20
No files matched your search
@@ -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 |
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user