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>
23 lines
993 B
Bash
23 lines
993 B
Bash
#!/usr/bin/env bash
|
|
set -Eeuo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
compose=(docker compose -p cephmig-million -f dev/compose.yaml -f dev/compose.million.yaml)
|
|
# Each sparse OSD can grow to 24 GiB. Leave another 20 GiB for the host.
|
|
if ! docker volume inspect cephmig-million_source-state >/dev/null 2>&1; then
|
|
python3 - <<'PY'
|
|
import os
|
|
s = os.statvfs('.')
|
|
available = s.f_bavail * s.f_frsize
|
|
if available < 68 * 1024**3:
|
|
raise SystemExit('Need 68 GiB free for two 24 GiB OSDs and a 20 GiB host reserve')
|
|
print(f'Host free: {available / 1024**3:.1f} GiB')
|
|
PY
|
|
fi
|
|
mkdir -p .dev/million
|
|
"${compose[@]}" config --quiet
|
|
"${compose[@]}" up -d --wait --wait-timeout 600 source target
|
|
"${compose[@]}" up -d benchmark
|
|
docker inspect cephmig-million-benchmark-1 --format '{{.Image}}' > .dev/million/native-image.txt
|
|
echo 'Persistent test started. Status: .dev/million/main/status.json'
|
|
echo 'Logs: docker compose -p cephmig-million -f dev/compose.yaml -f dev/compose.million.yaml logs -f benchmark'
|