Merge pull request #828 from seaweedfs/docs/restored-refetch

docs: a read-only restored volume fetches every chunk again after any restart
This commit is contained in:
Ping Qiu authored and GitHub committed 2026-11-30 06:45:52 -08:00
commit 9790c07bfd
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -134,8 +134,8 @@ limits and the rare holder crash listed in v1.0.0's Known limits.
restored volume first, then run the same delete again.
- A snapshot that meets a concurrent HEAD change answers `head_conflict`: retry it (and once more if the retry answers
`snapshot "NAME" of VOL is not in HEAD after its commit`).
- A restored volume records which chunks it has fetched only at its next checkpoint: after a crash, chunks fetched
since then are fetched again (no data is lost).
- A restored volume that has only been read fetches all of its chunks again after any restart; writing to it, or its
next checkpoint, records what it has fetched (no data is lost).
- A guest's NVMe/TCP connection waits about 181 s (holder stopped, host up) or about 464 s (holder's host powered off)
for a stopped target; see [host connect settings](../operator-guide.md#host-connect-settings).
- Every deleted volume leaves one small record in blockmaster's deletion store; the name cannot be reused.
+1 -1
View File
@@ -947,7 +947,7 @@ A restore makes a new volume from a snapshot. The new volume reads every chunk i
3. **Start v2's blockvolume** with the normal standalone command, its own volume id, endpoints and local root, the source's geometry (`--durable-blocks` and `--durable-blocksize`, for example `65536` and `4096`), and the same chunk settings as the source (`--chunk-filer`, `--chunk-path`, `--chunk-control-endpoint`). v2 serves at once. A start with other geometry flags is refused with `geometry_mismatch` and exits 78, creating no local store; the refusal names the record's values.
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).
- That progress is written to v2's local store at its next checkpoint. If v2's blockvolume is killed before then, the chunks it made local since are absent again after the restart and are fetched again from the source's snapshot on their next read. No data is lost: the source's snapshot still holds them.
- That progress is written to v2's local store when v2 is written to, or at its next checkpoint; a volume that has only been read takes none. After any restart of v2's blockvolume before then, clean or not, the chunks it made local are absent again and are fetched again from the source's snapshot on their next read. No data is lost: the source's snapshot still holds them.
- To make every chunk local, read the whole device once (for example with `dd` to `/dev/null`).
- **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).