#!/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'