docs: describe subtree skipping and add sequence diagrams
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
83e15bccb2
commit
831f44dbe5
4 files changed
+157
-9
No files matched your search
@@ -94,6 +94,41 @@ Steps of a migration:
|
||||
A file system snapshot does not make a database application-consistent. The
|
||||
write stop must cover all clients.
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
actor Op as Operator
|
||||
participant M as cephmig
|
||||
participant S as Source cluster
|
||||
participant T as Target cluster
|
||||
|
||||
Op->>M: inspect
|
||||
M->>S: check subvolume
|
||||
M->>T: check subvolume
|
||||
loop sync, repeated while the application runs
|
||||
Op->>M: sync
|
||||
M->>S: create round snapshot
|
||||
M->>T: copy changes, verify
|
||||
M->>T: create round snapshot
|
||||
M->>S: remove previous round snapshot
|
||||
M->>T: remove previous round snapshot
|
||||
end
|
||||
Note over Op,S: stop all writers
|
||||
Op->>M: finalize --writers-stopped
|
||||
M->>S: create final snapshot
|
||||
M->>T: copy, full verification, create final snapshot
|
||||
M-->>Op: ready-for-cutover
|
||||
Note over Op,T: switch clients to the target
|
||||
Op->>M: cleanup
|
||||
M->>S: remove final snapshot
|
||||
M->>T: remove final snapshot
|
||||
```
|
||||
|
||||
The detailed sequence is in [docs/migration.md](docs/migration.md#workflow-in-detail).
|
||||
|
||||
Intermediate `sync` rounds skip subtrees whose recursive change time
|
||||
(`ceph.dir.rctime`) did not change, so a round reads only the changed parts.
|
||||
`finalize` always reads everything.
|
||||
|
||||
Each round creates a snapshot `cephmig-<job>-<round>` at source and target;
|
||||
`sync` deletes the older ones as soon as a newer round is complete. Users of
|
||||
the subvolume therefore see at most one such snapshot during the migration,
|
||||
@@ -125,8 +160,9 @@ The configuration is a JSON file, here
|
||||
}
|
||||
```
|
||||
|
||||
Optional fields are `user` (Ceph client identity, e.g. `client.migration`)
|
||||
and `workers` (0 to 64; 0 selects the default). `mount` is only needed for
|
||||
Optional fields are `user` (Ceph client identity, e.g. `client.migration`),
|
||||
`workers` (0 to 64; 0 selects the default) and `full_scan` (`true` makes
|
||||
every round read all metadata instead of skipping unchanged subtrees). `mount` is only needed for
|
||||
the rsync backend: the mount of the file system root.
|
||||
|
||||
## Examples
|
||||
|
||||
Reference in new issue
Block a user