chore: import CephMig prototype
Initial import of the existing CephFS subvolume migration prototype, including the native libcephfs transport, rsync backend, local Ceph lab environment and integration tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
7705ed3eaf
58 files changed
+8769
No files matched your search
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
mkdir -p /mnt/source /mnt/target /mnt/source-fs /mnt/target-fs
|
||||
pids=()
|
||||
cleanup() {
|
||||
trap - EXIT TERM INT
|
||||
umount /mnt/source /mnt/target /mnt/source-fs /mnt/target-fs 2>/dev/null || true
|
||||
if ((${#pids[@]})); then
|
||||
kill "${pids[@]}" 2>/dev/null || true
|
||||
wait "${pids[@]}" 2>/dev/null || true
|
||||
fi
|
||||
}
|
||||
trap cleanup EXIT
|
||||
trap 'exit 0' TERM INT
|
||||
for cluster in source target; do
|
||||
ceph-fuse -f -c "/clusters/$cluster/ceph.conf" \
|
||||
-k "/clusters/$cluster/ceph.client.admin.keyring" \
|
||||
--client-fs cephfs -r "$(cat "/clusters/$cluster/subvolume-path")" \
|
||||
"/mnt/$cluster" &
|
||||
pids+=("$!")
|
||||
done
|
||||
# Administrative mount for snapshot getpath results (outside the data UUID).
|
||||
for cluster in source target; do
|
||||
ceph-fuse -f -c "/clusters/$cluster/ceph.conf" \
|
||||
-k "/clusters/$cluster/ceph.client.admin.keyring" --client-fs cephfs "/mnt/$cluster-fs" &
|
||||
pids+=("$!")
|
||||
done
|
||||
wait -n "${pids[@]}"
|
||||
exit 1
|
||||
Reference in new issue
Block a user