mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
docs: restored-volume snapshots, release, and three operator rules
A restored volume takes no scheduled snapshot until its device has been read once; a manual one names the source's chunks and cannot be restored. ops chunk release is a repair step. The lifecycle rules name one blockmaster per cluster, no restore of its directory from an older copy, and that a deleted volume's name cannot be created again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3bc43a6879
commit
004fd30d35
2 files changed
+14
-5
No files matched your search
@@ -607,10 +607,13 @@ A restore makes a new volume from a snapshot. The new volume reads every chunk i
|
||||
4. **Reads fill v2.** A block in a chunk that v2 does not hold yet is read from the source's snapshot; the read waits for that chunk, which is then kept locally. There is no background copy: a chunk that is never read stays in the source's snapshot.
|
||||
- Progress is the volume's count of chunks still absent: `Chunk.Stats.AbsentChunks` in `GET http://STATUS_OF_V2/status/durable?volume=v2` (0 means every chunk is local).
|
||||
- To make every chunk local, read the whole device once (for example with `dd` to `/dev/null`).
|
||||
- While any chunk is absent, v2's scheduled snapshots are skipped and counted as `restoring`.
|
||||
- **A restored volume takes no scheduled snapshot until its whole device has been read once**: while any chunk is absent, each scheduled snapshot is skipped and counted as `restoring`.
|
||||
- A manual snapshot (`ops chunk snapshot`) is taken in that state too. It names the source's chunks for every chunk v2 has not made local, so, like any snapshot of v2, it cannot be restored (below).
|
||||
|
||||
#### Lifetime of a restore target
|
||||
|
||||
- **The source snapshot cannot be deleted** while v2 exists: `ops chunk snapshot-delete` is refused with `snapshot_has_dependents`. Delete v2 first (see [Delete a volume](volume-lifecycle.md#delete-a-volume)); the snapshot can be deleted after that.
|
||||
- **A snapshot of v2 cannot be restored:** it names the source's chunks, and the restore is refused with `restore_source_not_own`. Restore from the source's snapshot instead.
|
||||
- **v2's own writes stay in v2:** the source's snapshot never changes.
|
||||
- **Deleting v2 releases the source snapshot:** `ops chunk volume-delete` of v2 removes it from the snapshot's dependents.
|
||||
- **`ops chunk release` is a repair step, not part of this procedure.** `sw-block ops chunk release --master MASTER --source v1 --target v2 --chunk-filer FILER` removes a restore target from its source snapshot's dependents. It works only when the target no longer names the source's chunks (it was deleted), or when the target never got its first HEAD (an interrupted restore). In the second case it first tombstones the target's name, so that name can never be created. A live target is refused with `target_live`.
|
||||
@@ -161,10 +161,16 @@ These are rules for the operator. The product does not detect every breach.
|
||||
on a fresh one.
|
||||
- **Never revoke before the seal is confirmed** (see the hand-over steps): a revoke
|
||||
without an ACK cannot be undone on one node.
|
||||
- **Never restore blockmaster's `--authority-store` or `--lifecycle-store` from a copy.**
|
||||
They decide who may write each volume. An older copy hands out epochs the volumes have
|
||||
already passed, and every start is then refused. A lost store needs a recovery
|
||||
procedure, not a restore.
|
||||
- **Never restore blockmaster's directory from an older copy** (its `--authority-store`
|
||||
and `--lifecycle-store`). They decide who may write each volume. An older copy hands out
|
||||
epochs the volumes have already passed, and every start is then refused. A lost store
|
||||
needs a recovery procedure, not a restore.
|
||||
- **Run exactly one blockmaster per cluster.** It alone issues each volume's epochs and
|
||||
leases; there is no second or standby blockmaster in this release.
|
||||
- **A deleted volume's name cannot be created again.** Its record stays, deleted, and a
|
||||
create under that name is refused. To start over, create the new volume under another
|
||||
name. (A snapshot name is different: once its delete has finished, the name can be
|
||||
taken again.)
|
||||
|
||||
## Which procedures run end to end
|
||||
|
||||
|
||||
Reference in new issue
Block a user