mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 10:37:23 +01:00
docs(persisted-state): the files the sw-block commands write; the daemon-store claim; the restore tuple
The no-new-file claim is narrowed to the stores the daemons read. A fourth table lists the files the sw-block commands write on a host (the volume's settings file and mini's record). The volume records row says a restore target's record carries its source tuple, as in v1.0.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cff31f5ab2
commit
e4e3bb1816
1 file changed
+21
-5
@@ -2,13 +2,16 @@
|
||||
|
||||
**Use this when:** you upgrade in place, or you want to know what a process leaves on disk or in SeaweedFS.
|
||||
|
||||
Every state the product writes and reads back after a restart is listed here, in three groups: the volume's remote
|
||||
image in SeaweedFS, blockmaster's own stores, and the files a volume host keeps under `--durable-root`. Each row
|
||||
Every state the product writes and reads back after a restart is listed here: the volume's remote image in
|
||||
SeaweedFS, blockmaster's own stores, the files a volume host keeps under `--durable-root`, and the files the
|
||||
`sw-block` commands write on a host. Each row
|
||||
says where the state lives, which process writes and reads it, how it is encoded and what a reader does with a
|
||||
version it does not know, whether a test pins the v1.0.0 bytes, and whether v1.0.1 changed it.
|
||||
|
||||
**v1.0.1 adds no file, object kind, attribute or field to any of them.** A v1.0.1 process reads what v1.0.0 wrote,
|
||||
and writes the same encodings. Two existing kinds are written in more situations (see
|
||||
**v1.0.1 adds no file, object kind, attribute or field to any store the daemons (blockmaster and blockvolume)
|
||||
read.** A v1.0.1 daemon reads what v1.0.0 wrote, and writes the same encodings. The only new files are the ones the
|
||||
new `sw-block` commands write on a host ([below](#files-the-sw-block-commands-write)); no daemon of v1.0.0 reads
|
||||
them. Two existing kinds are written in more situations (see
|
||||
[What v1.0.1 writes differently](#what-v101-writes-differently)).
|
||||
|
||||
"Pinned" means a test checks that v1.0.1 writes, and reads, the exact bytes v1.0.0 wrote for that state (fixtures
|
||||
@@ -38,7 +41,7 @@ All under `<chunk-path>/<volume>-<id8>/`.
|
||||
| Lost ranges of forced moves | `<authority-store>/<volume>.lostrange.json` | blockmaster | JSON with version 1; unknown version or bad checksum: the file is skipped | yes, without the optional HEAD times | no |
|
||||
| Store attestations | `<authority-store>/store-attestations.json` | blockmaster | JSON, no version; unknown fields are ignored | yes, without the two optional flags | no |
|
||||
| Store lock | `<authority-store>/.sparrow-authority-lock` | blockmaster | lock file holding the PID, for diagnosis only | not needed | no |
|
||||
| Volume records | `<lifecycle-store>/volumes/<volume>.json` | blockmaster | JSON, no version; unknown fields are ignored; an invalid record stops blockmaster at start | yes | no; one more delete ([below](#what-v101-writes-differently)) |
|
||||
| Volume records | `<lifecycle-store>/volumes/<volume>.json` | blockmaster | JSON, no version; unknown fields are ignored; an invalid record stops blockmaster at start. A restore target's record carries its source volume, source layout id, source snapshot and request id, as in v1.0.0 | yes (a plain volume and a restore target) | no; one more delete ([below](#what-v101-writes-differently)) |
|
||||
| Node inventory | `<lifecycle-store>/nodes/<server>.json` | blockmaster | JSON, no version; unknown fields are ignored | yes | no |
|
||||
| Placements | `<lifecycle-store>/placements/<volume>.json` | blockmaster | JSON, no version; unknown fields are ignored | yes | no |
|
||||
| Workspace bindings | `<lifecycle-store>/workspace-bindings/bindings.json` | blockmaster | JSON, no version; unknown fields are ignored | yes | no |
|
||||
@@ -65,6 +68,19 @@ The experimental stores (`--durable-impl smartwal`, `parallel-walstore`) have th
|
||||
`<volume>.bin`, refuse other versions, and are not pinned. They are experimental; smartwal does not support the
|
||||
chunk layer.
|
||||
|
||||
## Files the sw-block commands write
|
||||
|
||||
New in v1.0.1, since the commands are. They are written by the `sw-block` command on the host, not by a daemon, and
|
||||
have no v1.0.0 bytes to pin.
|
||||
|
||||
| File | Written by | Read by | Format |
|
||||
|---|---|---|---|
|
||||
| `/etc/sw-block/volumes/<volume>.env` | `sudo sw-block volume start <volume>` (mode 0640; replaced only with `--replace`, and only while the unit is stopped) | the `sw-blockvolume@<volume>` unit, as its environment (`EnvironmentFile=`), and `volume start` itself on its next run | `KEY=value` lines, sorted, values with spaces or quotes quoted |
|
||||
| `<dir>/mini.json` | `sw-block mini --dir <dir>` (mode 0644) | `sw-block mini --reuse` | JSON: size, port shift, weed path, NQN, binary directory |
|
||||
|
||||
The unit template `sw-blockvolume@.service` is shipped in `deploy/systemd/` and installed by you; it is not written
|
||||
by a command.
|
||||
|
||||
## Not persisted
|
||||
|
||||
- **Rebuilt after a restart:** the holder's cut status, cleaning cursors and plans, snapshot schedule (a restart
|
||||
|
||||
Reference in new issue
Block a user