feat: remove cephmig snapshots during sync and add cleanup command
Users of a subvolume should not see traces of the migration. Each sync round now deletes the older cephmig-* round snapshots at source and target and keeps only the newest one as base for the next round. The new command `cephmig cleanup` deletes the remaining one after the cutover. Application snapshots are never touched. The journal marks a snapshot as removed before deleting it, so an interrupted run finishes the deletion instead of reporting a vanished snapshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cc2dff46a0
commit
907d400765
9 files changed
+322
-19
No files matched your search
+5
-1
@@ -90,5 +90,9 @@ assert json.loads((p/"before.json").read_text()) == json.loads((p/"idempotent.js
|
||||
assert int((p/"busy-count").read_text()) > int((p/"busy-before-final").read_text()) > 20
|
||||
PY
|
||||
SH
|
||||
# Remove all cephmig snapshots; a second run must find nothing left to do.
|
||||
"${compose[@]}" exec -T native "$binary" cleanup --config "$config" --state "$state"
|
||||
"${compose[@]}" exec -T native "$binary" cleanup --config "$config" --state "$state"
|
||||
fixture cleaned "$name"
|
||||
completed=true
|
||||
echo 'PASS: native libcephfs without FUSE/rsync, blockdiff, snapshots, links, ACLs, xattrs, quotas, cancellation, SIGKILL resume, unrelated writers, finalization'
|
||||
echo 'PASS: native libcephfs without FUSE/rsync, blockdiff, snapshots, links, ACLs, xattrs, quotas, cancellation, SIGKILL resume, unrelated writers, finalization, snapshot cleanup'
|
||||
Reference in new issue
Block a user