Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5.8 KiB
Local lab
This page describes the Docker Compose environment under dev/ with two
independent Ceph clusters. Introduction and overview: README.
Layout and services
The service native runs without privileged mode, without /dev/fuse and
without CephFS mounts. The separate privileged client serves as an
independent application client and for the rsync comparison test.
make dev-smallfiles-test checks 10,000 files of 128 bytes each by default,
plus hardlinks and symlinks. Half of the files are in one large directory,
the other half spread over 50 subdirectories. The test measures the initial
transfer, the catch-up round and the final round including verification. A
separate application client then compares all contents, metadata and
snapshot states. Reports are written to /tmp/cephmig-smallfiles-report;
test data and snapshots of a successful run are removed. The number of files
can be limited, for example with FILES=2000 make dev-smallfiles-test.
A documented local run including before/after counters of MDS requests is in
docs/smallfiles-local.md.
The separate test with one million files and four snapshot states is started
with make dev-million-start; disk requirements, status and cleanup are
described in docs/million-local.md.
VCS stamping is disabled in the build, so that a source directory without
usable Git metadata can also be built.
The smoke test creates a subvolume snapshot, then changes the source and
copies the unchanged snapshot to the target. It checks contents, file modes,
POSIX ACLs, a user xattr, hardlinks, symlinks, quota operations and the
isolation of the two clusters. make dev-restart-check restarts the lab and
checks that the FSIDs and the data of both subvolumes are preserved. The
sparse test file is checked for its content; physical space usage is not
asserted by this test.
source and target are independent Ceph clusters with different FSIDs and
keys. Each contains a MON, MGR, OSD and MDS as well as the file system
cephfs, the subvolume group migration and the subvolume demo. The
client mounts these subvolumes at /mnt/source and /mnt/target. For the
snapshot paths returned by the Ceph API, the source file system is also
mounted at /mnt/source-fs and the target at /mnt/target-fs; subvolume
snapshots live outside the current data UUID directory.
No host devices are formatted and no ports are published on the host. The
OSD data lives in Docker volumes. The replication factor 1 and the
administrator keys in the test client are for the local lab only. The client
extends the pinned Ceph base image with a pinned rsync package version. The
journal can be stored permanently under /state in a dedicated Docker
volume.
# Status and logs
docker compose -f dev/compose.yaml logs --tail 100 source target client
# Ceph CLI against the source cluster
docker compose -f dev/compose.yaml exec source ceph fs subvolume info cephfs demo --group_name migration
# Stop; the data is kept for the next start
make dev-down
For a completely fresh test run,
docker compose -f dev/compose.yaml down --volumes deletes all lab data.
The base image can be changed with CEPH_IMAGE=quay.io/ceph/ceph:<version>.
The Dockerfiles contain package and SDK pins for Ceph 21.2.0 / EL10; they
must be adjusted when the version changes. The Go toolchain of the native
image comes from a pinned golang image.
The baseline is Ceph Umbrella 21.2.0 according to the
official release overview,
checked on 2026-11-05.
The published container image internally carries the version suffix dev;
for reproducibility, the image digest is pinned as well.
The bootstrap creates the pools with explicit PG counts, because the default
command fs volume create failed with EINVAL in this image.
ceph health detail can report POOL_NO_REDUNDANCY (one OSD) and
MON_DISK_LOW (less than 30 % free space in the host file system) in the
lab. These messages are not suppressed. Container health checks verify that
the subvolume is usable; they do not replace production health checks.
Target size and limits
Target size: up to 200 TB and more than 200 million files, including existing snapshots, POSIX ACLs, xattrs and quotas. Each node has two 25 Gbit/s links; effective throughput and a fixed upper bound for the write stop will be determined later. The local environment verifies functionality but does not reproduce this amount of data. The native copier uses bounded workers and buffers, a persistent index on local disk and optional bandwidth limiting. Intermediate rounds skip unchanged subtrees; the final round still scans all metadata. Evidence for memory, index size, runtime and the final write stop is missing.
- Check source, target, permissions, capacity and required metadata.
- Create a consistent source snapshot and make the initial copy while the application keeps running.
- Catch up with changes through further snapshots and rounds.
- Stop all writing applications, complete pending writes, transfer the last snapshot and verify data and metadata.
- Remount the clients on the target and release the applications.
- Remove the migration snapshots with
cephmig cleanup.
A file system snapshot alone does not make databases application-consistent. The final write stop must cover all clients. Moving a mount does not carry over file descriptors that are already open. After the first writes to the target, switching back requires another round. The data transfer implemented so far can be verified in lab mode; a production cutover and load tests at the target size are still open.
The environment follows the manual Ceph bootstrap. The assessment of a direct RADOS object import and the limits of the native implementation are in docs/raw-transfer.md.