docs: translate README and documentation to English
Also document the snapshot cleanup: older round snapshots are removed during sync, and `cephmig cleanup` removes the rest after the cutover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
907d400765
commit
b7d2a0687e
6 files changed
+655
-628
No files matched your search
@@ -1,99 +1,106 @@
|
|||||||
# CephMig: CephFS-Subvolumes zwischen Ceph-Clustern migrieren
|
# CephMig: migrate CephFS subvolumes between Ceph clusters
|
||||||
|
|
||||||
Ein Go-Werkzeug, das ein CephFS-Subvolume samt Snapshots, POSIX-ACLs, xattrs,
|
A Go tool that copies a CephFS subvolume, including its snapshots, POSIX ACLs,
|
||||||
Quotas und Zeitstempeln von einem Ceph-Cluster in einen anderen kopiert,
|
xattrs, quotas and timestamps, from one Ceph cluster to another while the
|
||||||
während die Anwendung weiterläuft.
|
application keeps running.
|
||||||
|
|
||||||
## Beschreibung
|
## Description
|
||||||
|
|
||||||
**Warum?** Ein Subvolume soll mit kurzem Schreibstopp in einen neuen Cluster
|
**Why?** A subvolume has to move to a new cluster with only a short write
|
||||||
umziehen. Die Zielgröße liegt bei bis zu 200 TB und mehr als 200 Millionen
|
stop. The target size is up to 200 TB and more than 200 million files. A
|
||||||
Dateien. Ein einfaches Kopieren reicht dafür nicht: Snapshots, Hardlinks und
|
plain copy is not enough: snapshots, hardlinks and Ceph metadata must be
|
||||||
Ceph-Metadaten müssen erhalten bleiben, und ein abgebrochener Lauf muss sich
|
preserved, and an interrupted run must be resumable.
|
||||||
fortsetzen lassen.
|
|
||||||
|
|
||||||
**Wie?** CephMig arbeitet in Runden. Jede Runde überträgt einen konsistenten
|
**How?** CephMig works in rounds. Each round transfers a consistent source
|
||||||
Quellsnapshot, prüft das Ziel und legt dort einen gleichnamigen Snapshot an.
|
snapshot, verifies the target and creates a snapshot of the same name there.
|
||||||
Ein Journal auf lokalem Datenträger hält jeden Schritt fest. Für den letzten
|
A journal on local disk records every step. For the last round, all writers
|
||||||
Abgleich werden alle Schreiber kurz angehalten.
|
are stopped briefly.
|
||||||
|
|
||||||
Es gibt zwei Backends:
|
There are two backends:
|
||||||
|
|
||||||
- **native** (empfohlen): Der Kopierer spricht direkt über libcephfs mit
|
- **native** (recommended): the copier talks to both clusters directly
|
||||||
beiden Clustern. Er braucht weder rsync noch einen Kernel- oder FUSE-Mount.
|
through libcephfs. It needs neither rsync nor a kernel or FUSE mount.
|
||||||
Nach der Erstübertragung nutzt er Snapdiff und, wo möglich, Blockdiff.
|
After the initial transfer it uses snapdiff and, where possible, blockdiff.
|
||||||
- **rsync**: Er kopiert zwischen zwei gemounteten CephFS-Dateisystemen.
|
- **rsync**: copies between two mounted CephFS file systems.
|
||||||
|
|
||||||
**Status:** Prototyp. Die Funktionen sind im lokalen Labor geprüft.
|
**Status:** prototype. The features are verified in the local lab. Load
|
||||||
Lastnachweise für die Zielgröße und die produktive Umschaltung fehlen noch.
|
tests at the target size and a production cutover are still missing.
|
||||||
|
|
||||||
> **Dokumentierte Abweichungen:** Native Snapshot-IDs und Snapshot-Erstellungszeiten
|
> **Documented deviations:** native snapshot IDs and snapshot creation times
|
||||||
> werden am Ziel neu vergeben. mtime, atime, ctime und Erstellungszeit (btime)
|
> are assigned anew at the target. The native backend takes mtime, atime,
|
||||||
> der Dateien übernimmt das native Backend von der Quelle; die ctime nie
|
> ctime and birth time (btime) of every file from the source; the ctime is
|
||||||
> kleiner als die mtime. Die ursprünglichen Snapshot-Erstellungszeiten stehen
|
> never lower than the mtime. The original snapshot creation times are kept
|
||||||
> im Journal.
|
> in the journal.
|
||||||
> Details: [docs/migration.md](docs/migration.md).
|
> Details: [docs/migration.md](docs/migration.md).
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Voraussetzungen:
|
Requirements:
|
||||||
|
|
||||||
- Linux, Go ab 1.25 und GNU Make
|
- Linux, Go 1.25 or later and GNU Make
|
||||||
- für das native Backend und die Laborumgebung: Docker Engine mit Docker
|
- for the native backend and the lab: Docker Engine with Docker Compose and
|
||||||
Compose sowie `/dev/fuse` auf dem Docker-Host
|
`/dev/fuse` on the Docker host
|
||||||
- für die Laborumgebung: bis zu 12 GiB RAM für Container und etwa 8 GiB
|
- for the lab: up to 12 GiB RAM for the containers and about 8 GiB of disk
|
||||||
Speicherplatz für die zwei OSDs, dazu Platz für die Images
|
space for the two OSDs, plus space for the images
|
||||||
|
|
||||||
Quellcode holen und bauen:
|
Get the source and build it:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone ssh://git@git.zb-server.de:30022/Sebi/CephfsMig.git
|
git clone ssh://git@git.zb-server.de:30022/Sebi/CephfsMig.git
|
||||||
cd CephfsMig
|
cd CephfsMig
|
||||||
make doctor # prüft Go, Docker und Docker Compose
|
make doctor # checks Go, Docker and Docker Compose
|
||||||
make build # erzeugt bin/cephmig (nur rsync-Backend)
|
make build # builds bin/cephmig (rsync backend only)
|
||||||
make check # go vet, Go-Tests und Syntaxprüfung der Testskripte
|
make check # go vet, Go tests and a syntax check of the test scripts
|
||||||
```
|
```
|
||||||
|
|
||||||
Das native Backend braucht CGO und die libcephfs-Header. Es wird deshalb in
|
The native backend needs CGO and the libcephfs headers, so it is built in a
|
||||||
einem Container gebaut. Dabei laufen auch die Go-Tests mit Race Detector:
|
container. The build also runs the Go tests with the race detector:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make dev-native-build # erzeugt das Image cephmig-native:dev
|
make dev-native-build # builds the image cephmig-native:dev
|
||||||
```
|
```
|
||||||
|
|
||||||
## Verwendung
|
## Usage
|
||||||
|
|
||||||
```text
|
```text
|
||||||
cephmig doctor
|
cephmig doctor
|
||||||
cephmig inspect --config FILE
|
cephmig inspect --config FILE
|
||||||
cephmig sync --config FILE --state FILE
|
cephmig sync --config FILE --state FILE
|
||||||
cephmig finalize --config FILE --state FILE --writers-stopped
|
cephmig finalize --config FILE --state FILE --writers-stopped
|
||||||
|
cephmig cleanup --config FILE --state FILE
|
||||||
cephmig status --state FILE
|
cephmig status --state FILE
|
||||||
```
|
```
|
||||||
|
|
||||||
| Kommando | Wirkung |
|
| Command | Effect |
|
||||||
|------------|-------------------------------------------------------------------------|
|
|------------|----------------------------------------------------------------------|
|
||||||
| `inspect` | prüft Quelle und Ziel, ohne etwas zu ändern |
|
| `inspect` | checks source and target without changing anything |
|
||||||
| `sync` | überträgt den aktuellen Stand; beliebig oft wiederholbar |
|
| `sync` | transfers the current state; can be repeated any number of times |
|
||||||
| `finalize` | letzter Abgleich nach dem Schreibstopp, danach bereit zur Umschaltung |
|
| `finalize` | last round after the write stop, then ready for cutover |
|
||||||
| `status` | gibt das Journal aus |
|
| `cleanup` | deletes the snapshots cephmig created, at source and target |
|
||||||
|
| `status` | prints the journal |
|
||||||
|
|
||||||
Alle Ergebnisse erscheinen als JSON auf der Standardausgabe. Die State-Datei
|
All results are written to standard output as JSON. The state file must be
|
||||||
muss außerhalb der CephFS-Mounts liegen.
|
outside the CephFS mounts.
|
||||||
|
|
||||||
Ablauf einer Migration:
|
Steps of a migration:
|
||||||
|
|
||||||
1. Mit `inspect` Quelle, Ziel, Berechtigungen und Kapazität prüfen.
|
1. Check source, target, permissions and capacity with `inspect`.
|
||||||
2. Mit `sync` bei laufender Anwendung initial kopieren.
|
2. Make the initial copy with `sync` while the application keeps running.
|
||||||
3. `sync` wiederholen, um Änderungen nachzuziehen.
|
3. Repeat `sync` to catch up with changes.
|
||||||
4. Alle schreibenden Anwendungen anhalten, dann `finalize --writers-stopped`.
|
4. Stop all writing applications, then run `finalize --writers-stopped`.
|
||||||
5. Clients auf das Ziel umstellen und Anwendungen freigeben.
|
5. Switch the clients to the target and release the applications.
|
||||||
|
6. Once the cutover is checked, remove the migration snapshots with `cleanup`.
|
||||||
|
|
||||||
Ein Dateisystemsnapshot macht eine Datenbank nicht anwendungskonsistent.
|
A file system snapshot does not make a database application-consistent. The
|
||||||
Der Schreibstopp muss alle Clients umfassen.
|
write stop must cover all clients.
|
||||||
|
|
||||||
Die Konfiguration ist eine JSON-Datei, hier
|
Each round creates a snapshot `cephmig-<job>-<round>` at source and target;
|
||||||
[dev/migration.example.json](dev/migration.example.json) aus dem Labor:
|
`sync` deletes the older ones as soon as a newer round is complete. Users of
|
||||||
|
the subvolume therefore see at most one such snapshot during the migration,
|
||||||
|
and none after `cleanup`. Application snapshots are never deleted.
|
||||||
|
|
||||||
|
The configuration is a JSON file, here
|
||||||
|
[dev/migration.example.json](dev/migration.example.json) from the lab:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -118,75 +125,75 @@ Die Konfiguration ist eine JSON-Datei, hier
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Optional sind außerdem `user` (Ceph-Client-Identität, z. B. `client.migration`)
|
Optional fields are `user` (Ceph client identity, e.g. `client.migration`)
|
||||||
und `workers` (0 bis 64; 0 wählt den Standard). `mount` ist nur für das
|
and `workers` (0 to 64; 0 selects the default). `mount` is only needed for
|
||||||
rsync-Backend nötig: dort der Mount des Dateisystem-Wurzelverzeichnisses.
|
the rsync backend: the mount of the file system root.
|
||||||
|
|
||||||
## Beispiele
|
## Examples
|
||||||
|
|
||||||
Die Laborumgebung startet zwei unabhängige Ceph-Cluster (Ceph 21.2.0) in
|
The lab starts two independent Ceph clusters (Ceph 21.2.0) in Docker and runs
|
||||||
Docker und führt die Migration darin aus:
|
the migration between them:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make dev-up # Cluster starten
|
make dev-up # start the clusters
|
||||||
make dev-status # Zustand beider Cluster
|
make dev-status # state of both clusters
|
||||||
make dev-smoke # Smoke-Test: Snapshot, ACLs, xattrs, Hardlinks, Quotas
|
make dev-smoke # smoke test: snapshot, ACLs, xattrs, hardlinks, quotas
|
||||||
make dev-native-test # nativer Funktionstest
|
make dev-native-test # native functional test
|
||||||
docker compose -f dev/compose.yaml exec native cephmig-native inspect \
|
docker compose -f dev/compose.yaml exec native cephmig-native inspect \
|
||||||
--config /lab/migration.example.json
|
--config /lab/migration.example.json
|
||||||
make dev-down # stoppen; die Daten bleiben erhalten
|
make dev-down # stop; the data is kept
|
||||||
```
|
```
|
||||||
|
|
||||||
Weitere Tests:
|
More tests:
|
||||||
|
|
||||||
| Ziel | Inhalt |
|
| Target | Content |
|
||||||
|----------------------------|--------------------------------------------------------------|
|
|----------------------------|-----------------------------------------------------------|
|
||||||
| `make dev-migration-test` | Migration mit dem rsync-Backend |
|
| `make dev-migration-test` | migration with the rsync backend |
|
||||||
| `make dev-smallfiles-test` | 10.000 kleine Dateien (`FILES=2000` begrenzt die Anzahl) |
|
| `make dev-smallfiles-test` | 10,000 small files (`FILES=2000` limits the number) |
|
||||||
| `make dev-million-start` | eine Million Dateien mit vier Snapshot-Ständen |
|
| `make dev-million-start` | one million files with four snapshot states |
|
||||||
| `make dev-restart-check` | Neustart des Labors; FSIDs und Daten bleiben erhalten |
|
| `make dev-restart-check` | restart of the lab; FSIDs and data are preserved |
|
||||||
|
|
||||||
Ergebnisse dokumentierter Läufe: [docs/smallfiles-local.md](docs/smallfiles-local.md)
|
Results of documented runs: [docs/smallfiles-local.md](docs/smallfiles-local.md)
|
||||||
und [docs/million-local.md](docs/million-local.md).
|
and [docs/million-local.md](docs/million-local.md).
|
||||||
|
|
||||||
## Projektstruktur
|
## Project structure
|
||||||
|
|
||||||
```text
|
```text
|
||||||
.
|
.
|
||||||
├── cmd/
|
├── cmd/
|
||||||
│ ├── cephmig/ Kommandozeilenprogramm
|
│ ├── cephmig/ command-line program
|
||||||
│ └── nativeprobe/ Diagnosewerkzeug für die libcephfs-Anbindung
|
│ └── nativeprobe/ diagnostic tool for the libcephfs binding
|
||||||
├── internal/
|
├── internal/
|
||||||
│ ├── migration/ Migrationsablauf, Journal, rsync- und native Übertragung
|
│ ├── migration/ migration workflow, journal, rsync and native transfer
|
||||||
│ ├── storage/ Dateisystem-Schnittstelle des nativen Kopierers
|
│ ├── storage/ file system interface of the native copier
|
||||||
│ └── cephfsnative/ CGO-Anbindung an libcephfs (Build-Tag ceph)
|
│ └── cephfsnative/ CGO binding to libcephfs (build tag ceph)
|
||||||
├── dev/ Laborumgebung: Compose-Dateien, Dockerfiles, Testskripte
|
├── dev/ lab: Compose files, Dockerfiles, test scripts
|
||||||
├── docs/ Ausführliche Dokumentation und Messergebnisse
|
├── docs/ detailed documentation and measurements
|
||||||
└── Makefile Build-, Prüf- und Laborziele
|
└── Makefile build, check and lab targets
|
||||||
```
|
```
|
||||||
|
|
||||||
## Dokumentation
|
## Documentation
|
||||||
|
|
||||||
- [docs/migration.md](docs/migration.md): Kommandos, Grenzen und Nachweise
|
- [docs/migration.md](docs/migration.md): commands, limits and evidence
|
||||||
- [docs/lab.md](docs/lab.md): Laborumgebung im Detail, Ceph-Version, bekannte Warnungen
|
- [docs/lab.md](docs/lab.md): the lab in detail, Ceph version, known warnings
|
||||||
- [docs/raw-transfer.md](docs/raw-transfer.md): direkter RADOS-Import und Grenzen der nativen Implementierung
|
- [docs/raw-transfer.md](docs/raw-transfer.md): direct RADOS import and limits of the native implementation
|
||||||
- API-Dokumentation der Go-Pakete: `go doc -all ./internal/migration`
|
- API documentation of the Go packages: `go doc -all ./internal/migration`
|
||||||
|
|
||||||
## Mitwirken
|
## Contributing
|
||||||
|
|
||||||
- Go-Code folgt [Effective Go](https://go.dev/doc/effective_go) und ist mit
|
- Go code follows [Effective Go](https://go.dev/doc/effective_go) and is
|
||||||
`gofmt` formatiert. Exportierte Bezeichner haben Doc-Kommentare.
|
formatted with `gofmt`. Exported identifiers have doc comments.
|
||||||
- Vor jedem Commit `make check` ausführen.
|
- Run `make check` before every commit.
|
||||||
- Commit-Nachrichten folgen [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/),
|
- Commit messages follow [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/),
|
||||||
zum Beispiel `feat(migration): add bandwidth limit` oder
|
for example `feat(migration): add bandwidth limit` or
|
||||||
`fix(native): retry on EEXIST`. Inkompatible Änderungen werden mit `!`
|
`fix(native): retry on EEXIST`. Breaking changes are marked with `!` and a
|
||||||
und einem `BREAKING CHANGE:`-Footer gekennzeichnet.
|
`BREAKING CHANGE:` footer.
|
||||||
|
|
||||||
## Lizenz
|
## License
|
||||||
|
|
||||||
Bisher ist keine Lizenz festgelegt. Ohne Lizenz gilt: alle Rechte vorbehalten.
|
No license has been chosen yet. Without a license, all rights are reserved.
|
||||||
|
|
||||||
## Kontakt
|
## Contact
|
||||||
|
|
||||||
Sebastian Unterschütz. Fragen und Fehlermeldungen bitte als Issue im
|
Sebastian Unterschütz. Please report questions and bugs as issues in the
|
||||||
Repository [Sebi/CephfsMig](https://git.zb-server.de/Sebi/CephfsMig).
|
repository [Sebi/CephfsMig](https://git.zb-server.de/Sebi/CephfsMig).
|
||||||
+89
-87
@@ -1,108 +1,110 @@
|
|||||||
# Lokale Laborumgebung
|
# Local lab
|
||||||
|
|
||||||
Diese Seite beschreibt die Docker-Compose-Umgebung unter `dev/` mit zwei
|
This page describes the Docker Compose environment under `dev/` with two
|
||||||
unabhängigen Ceph-Clustern. Einstieg und Kurzüberblick: [README](../README.md).
|
independent Ceph clusters. Introduction and overview: [README](../README.md).
|
||||||
|
|
||||||
## Aufbau und Dienste
|
## Layout and services
|
||||||
|
|
||||||
Der Dienst `native` läuft ohne privilegierten Modus, ohne `/dev/fuse` und ohne
|
The service `native` runs without privileged mode, without `/dev/fuse` and
|
||||||
CephFS-Mounts. Der separate privilegierte `client` dient als unabhängiger
|
without CephFS mounts. The separate privileged `client` serves as an
|
||||||
Anwendungsclient und für den rsync-Vergleichstest.
|
independent application client and for the rsync comparison test.
|
||||||
|
|
||||||
`make dev-smallfiles-test` prüft standardmäßig 10.000 Dateien mit jeweils
|
`make dev-smallfiles-test` checks 10,000 files of 128 bytes each by default,
|
||||||
128 Byte Inhalt, zusätzlich Hardlinks und Symlinks. Die Hälfte der Dateien
|
plus hardlinks and symlinks. Half of the files are in one large directory,
|
||||||
liegt in einem großen Verzeichnis, die andere verteilt auf 50 Unterverzeichnisse.
|
the other half spread over 50 subdirectories. The test measures the initial
|
||||||
Der Test misst Erstübertragung, Änderungsabgleich und finalen Abgleich einschließlich
|
transfer, the catch-up round and the final round including verification. A
|
||||||
Prüfung. Ein separater Anwendungsclient vergleicht danach alle Inhalte, Metadaten
|
separate application client then compares all contents, metadata and
|
||||||
und Snapshot-Stände. Berichte liegen unter `/tmp/cephmig-smallfiles-report`;
|
snapshot states. Reports are written to `/tmp/cephmig-smallfiles-report`;
|
||||||
erfolgreiche Testdaten und Snapshots werden entfernt. Die Dateianzahl lässt sich
|
test data and snapshots of a successful run are removed. The number of files
|
||||||
beispielsweise mit `FILES=2000 make dev-smallfiles-test` begrenzen.
|
can be limited, for example with `FILES=2000 make dev-smallfiles-test`.
|
||||||
Ein dokumentierter lokaler Lauf einschließlich Vorher-/Nachher-Zählern für
|
A documented local run including before/after counters of MDS requests is in
|
||||||
MDS-Anfragen steht in [docs/smallfiles-local.md](smallfiles-local.md).
|
[docs/smallfiles-local.md](smallfiles-local.md).
|
||||||
Der getrennte Test mit einer Million Dateien und vier Snapshot-Ständen wird
|
The separate test with one million files and four snapshot states is started
|
||||||
mit `make dev-million-start` gestartet; Speicherbedarf, Status und Bereinigung
|
with `make dev-million-start`; disk requirements, status and cleanup are
|
||||||
stehen in [docs/million-local.md](million-local.md).
|
described in [docs/million-local.md](million-local.md).
|
||||||
VCS-Stamping ist im Build deaktiviert, damit auch ein
|
VCS stamping is disabled in the build, so that a source directory without
|
||||||
Quellverzeichnis ohne nutzbare Git-Metadaten gebaut werden kann.
|
usable Git metadata can also be built.
|
||||||
|
|
||||||
Der Smoke-Test erstellt einen Subvolume-Snapshot, verändert danach die Quelle
|
The smoke test creates a subvolume snapshot, then changes the source and
|
||||||
und kopiert den unveränderten Snapshot zum Ziel. Er prüft Inhalte, Dateirechte,
|
copies the unchanged snapshot to the target. It checks contents, file modes,
|
||||||
POSIX-ACLs, ein Benutzer-xattr, Hardlinks, Symlinks, Quota-Operationen und die
|
POSIX ACLs, a user xattr, hardlinks, symlinks, quota operations and the
|
||||||
Isolation der beiden Cluster. `make dev-restart-check` startet das Labor neu
|
isolation of the two clusters. `make dev-restart-check` restarts the lab and
|
||||||
und prüft, dass FSIDs und Daten beider Subvolumes erhalten bleiben.
|
checks that the FSIDs and the data of both subvolumes are preserved. The
|
||||||
Die Sparse-Testdatei wird auf ihren Inhalt geprüft; die physische Platzbelegung
|
sparse test file is checked for its content; physical space usage is not
|
||||||
ist keine Zusicherung dieses Tests.
|
asserted by this test.
|
||||||
|
|
||||||
`source` und `target` sind unabhängige Ceph-Cluster mit unterschiedlichen FSIDs
|
`source` and `target` are independent Ceph clusters with different FSIDs and
|
||||||
und Schlüsseln. Jeder enthält MON, MGR, OSD und MDS sowie das Dateisystem
|
keys. Each contains a MON, MGR, OSD and MDS as well as the file system
|
||||||
`cephfs`, die Subvolume-Gruppe `migration` und das Subvolume `demo`.
|
`cephfs`, the subvolume group `migration` and the subvolume `demo`. The
|
||||||
Der Client mountet diese Subvolumes unter `/mnt/source` und `/mnt/target`.
|
client mounts these subvolumes at `/mnt/source` and `/mnt/target`. For the
|
||||||
Für die von der Ceph-API gelieferten Snapshotpfade ist das Quelldateisystem
|
snapshot paths returned by the Ceph API, the source file system is also
|
||||||
zusätzlich unter `/mnt/source-fs` und das Ziel unter `/mnt/target-fs` gemountet;
|
mounted at `/mnt/source-fs` and the target at `/mnt/target-fs`; subvolume
|
||||||
Subvolume-Snapshots liegen außerhalb
|
snapshots live outside the current data UUID directory.
|
||||||
des aktuellen Daten-UUID-Verzeichnisses.
|
No host devices are formatted and no ports are published on the host. The
|
||||||
Es werden keine Host-Geräte formatiert und keine Ports am Host veröffentlicht.
|
OSD data lives in Docker volumes. The replication factor 1 and the
|
||||||
Die OSD-Daten liegen in Docker-Volumes. Die Replikationszahl 1 und die
|
administrator keys in the test client are for the local lab only. The client
|
||||||
Administratorschlüssel im Testclient dienen ausschließlich dem lokalen Labor.
|
extends the pinned Ceph base image with a pinned rsync package version. The
|
||||||
Der Client ergänzt das feste Ceph-Basisimage um die festgeschriebene
|
journal can be stored permanently under `/state` in a dedicated Docker
|
||||||
rsync-Paketversion. Das Journal kann unter `/state` in einem eigenen
|
volume.
|
||||||
Docker-Volume dauerhaft gespeichert werden.
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Status und Logs
|
# Status and logs
|
||||||
docker compose -f dev/compose.yaml logs --tail 100 source target client
|
docker compose -f dev/compose.yaml logs --tail 100 source target client
|
||||||
|
|
||||||
# Ceph CLI gegen den Quellcluster
|
# Ceph CLI against the source cluster
|
||||||
docker compose -f dev/compose.yaml exec source ceph fs subvolume info cephfs demo --group_name migration
|
docker compose -f dev/compose.yaml exec source ceph fs subvolume info cephfs demo --group_name migration
|
||||||
|
|
||||||
# Stoppen; die Daten bleiben für den nächsten Start erhalten
|
# Stop; the data is kept for the next start
|
||||||
make dev-down
|
make dev-down
|
||||||
```
|
```
|
||||||
|
|
||||||
Für einen vollständig frischen Testlauf löscht
|
For a completely fresh test run,
|
||||||
`docker compose -f dev/compose.yaml down --volumes` **alle Labordaten**.
|
`docker compose -f dev/compose.yaml down --volumes` deletes **all lab data**.
|
||||||
Das Basisimage lässt sich mit `CEPH_IMAGE=quay.io/ceph/ceph:<version>` ändern.
|
The base image can be changed with `CEPH_IMAGE=quay.io/ceph/ceph:<version>`.
|
||||||
Die Dockerfiles enthalten Paket- und SDK-Pins für Ceph 21.2.0 / EL10; bei einem
|
The Dockerfiles contain package and SDK pins for Ceph 21.2.0 / EL10; they
|
||||||
Versionswechsel müssen diese passend angepasst werden.
|
must be adjusted when the version changes. The Go toolchain of the native
|
||||||
Die Baseline ist Ceph Umbrella 21.2.0 gemäß der
|
image comes from a pinned `golang` image.
|
||||||
[offiziellen Releaseübersicht](https://docs.ceph.com/en/latest/releases/),
|
The baseline is Ceph Umbrella 21.2.0 according to the
|
||||||
geprüft am 05.11.2026.
|
[official release overview](https://docs.ceph.com/en/latest/releases/),
|
||||||
Das veröffentlichte Containerimage trägt intern den Versionszusatz `dev`;
|
checked on 2026-11-05.
|
||||||
für die Reproduzierbarkeit ist zusätzlich der Image-Digest festgeschrieben.
|
The published container image internally carries the version suffix `dev`;
|
||||||
Der Bootstrap legt die Pools mit expliziten PG-Zahlen an, da das Standardkommando
|
for reproducibility, the image digest is pinned as well.
|
||||||
`fs volume create` in diesem Image mit `EINVAL` scheiterte.
|
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` kann im Labor `POOL_NO_REDUNDANCY` (ein OSD) und
|
`ceph health detail` can report `POOL_NO_REDUNDANCY` (one OSD) and
|
||||||
`MON_DISK_LOW` (weniger als 30 % freier Platz im Host-Dateisystem) melden.
|
`MON_DISK_LOW` (less than 30 % free space in the host file system) in the
|
||||||
Diese Meldungen werden nicht unterdrückt. Container-Healthchecks prüfen die
|
lab. These messages are not suppressed. Container health checks verify that
|
||||||
Nutzbarkeit des Subvolumes; sie ersetzen keine Produktions-Healthchecks.
|
the subvolume is usable; they do not replace production health checks.
|
||||||
|
|
||||||
## Zielgröße und Grenzen
|
## Target size and limits
|
||||||
|
|
||||||
Zielgröße: bis zu 200 TB und mehr als 200 Millionen Dateien, einschließlich
|
Target size: up to 200 TB and more than 200 million files, including existing
|
||||||
vorhandener Snapshots, POSIX-ACLs, xattrs und Quotas. Pro Node stehen zwei
|
snapshots, POSIX ACLs, xattrs and quotas. Each node has two 25 Gbit/s links;
|
||||||
25-Gbit/s-Verbindungen zur Verfügung; effektiver Durchsatz und eine feste
|
effective throughput and a fixed upper bound for the write stop will be
|
||||||
Obergrenze für den Schreibstopp werden später bestimmt. Die lokale Umgebung prüft
|
determined later. The local environment verifies functionality but does not
|
||||||
Funktionen, bildet diese Datenmenge jedoch nicht ab. Der native Kopierer verwendet
|
reproduce this amount of data. The native copier uses bounded workers and
|
||||||
begrenzte Worker und Puffer, einen dauerhaften Index auf lokalem Datenträger und
|
buffers, a persistent index on local disk and optional bandwidth limiting.
|
||||||
optionale Bandbreitendrosselung. Vollständige Metadatenscans bleiben erforderlich.
|
Full metadata scans remain necessary. Evidence for memory, index size,
|
||||||
Ein Nachweis für Speicher, Indexgröße, Laufzeit und finalen Schreibstopp fehlt.
|
runtime and the final write stop is missing.
|
||||||
|
|
||||||
1. Quelle, Ziel, Berechtigungen, Kapazität und benötigte Metadaten prüfen.
|
1. Check source, target, permissions, capacity and required metadata.
|
||||||
2. Konsistenten Quellsnapshot erstellen und initial bei laufender Anwendung kopieren.
|
2. Create a consistent source snapshot and make the initial copy while the
|
||||||
3. Änderungen mit weiteren Snapshots und Abgleichen nachziehen.
|
application keeps running.
|
||||||
4. Alle schreibenden Anwendungen anhalten, offene Schreibvorgänge abschließen,
|
3. Catch up with changes through further snapshots and rounds.
|
||||||
letzten Snapshot übertragen und Daten sowie Metadaten verifizieren.
|
4. Stop all writing applications, complete pending writes, transfer the last
|
||||||
5. Clients auf das Ziel ummounten und Anwendungen freigeben.
|
snapshot and verify data and metadata.
|
||||||
|
5. Remount the clients on the target and release the applications.
|
||||||
|
6. Remove the migration snapshots with `cephmig cleanup`.
|
||||||
|
|
||||||
Ein Dateisystemsnapshot allein stellt keine Anwendungskonsistenz für Datenbanken
|
A file system snapshot alone does not make databases application-consistent.
|
||||||
her. Der finale Schreibstopp muss alle Clients umfassen. Ein Umhängen eines
|
The final write stop must cover all clients. Moving a mount does not carry
|
||||||
Mounts übernimmt keine bereits offenen Dateideskriptoren. Nach ersten
|
over file descriptors that are already open. After the first writes to the
|
||||||
Schreibzugriffen am Ziel benötigt ein Rückwechsel einen erneuten Abgleich.
|
target, switching back requires another round.
|
||||||
Die derzeit implementierte Datenübertragung ist im Labormodus prüfbar;
|
The data transfer implemented so far can be verified in lab mode; a
|
||||||
produktive Umschaltung und Lastnachweise für die Zielgröße sind noch offen.
|
production cutover and load tests at the target size are still open.
|
||||||
|
|
||||||
Die Umgebung folgt dem
|
The environment follows the
|
||||||
[manuellen Ceph-Bootstrap](https://docs.ceph.com/en/latest/install/manual-deployment/).
|
[manual Ceph bootstrap](https://docs.ceph.com/en/latest/install/manual-deployment/).
|
||||||
Die Einordnung des direkten RADOS-Objektimports und die Grenzen der nativen
|
The assessment of a direct RADOS object import and the limits of the native
|
||||||
Implementierung stehen in [docs/raw-transfer.md](raw-transfer.md).
|
implementation are in [docs/raw-transfer.md](raw-transfer.md).
|
||||||
+263
-248
@@ -1,58 +1,57 @@
|
|||||||
# Migrationsprototyp
|
# Migration prototype
|
||||||
|
|
||||||
Die Prüfung eines direkten RADOS-Objekttransfers und die native Alternative
|
The evaluation of a direct RADOS object transfer and the native alternative
|
||||||
über libcephfs sind in [raw-transfer.md](raw-transfer.md) dokumentiert.
|
through libcephfs are documented in [raw-transfer.md](raw-transfer.md).
|
||||||
|
|
||||||
## Snapshot-Identität: dokumentierte Abweichung
|
## Snapshot identity: documented deviation
|
||||||
|
|
||||||
Native Snapshot-IDs und Ceph-Geburtszeitpunkte werden am Ziel neu vergeben.
|
Native snapshot IDs and Ceph birth times are assigned anew at the target. As
|
||||||
Wie vereinbart blockiert diese Abweichung die Migration nicht. `inspect`,
|
agreed, this deviation does not block the migration. `inspect`, the transfer
|
||||||
die Übertragungsausgabe und das persistente Journal enthalten einen Hinweis;
|
output and the persistent journal contain a note; the original and the new
|
||||||
ursprüngliche und neue Erstellungszeiten stehen bei jedem übertragenen Snapshot.
|
creation times are recorded for every transferred snapshot. An application
|
||||||
Eine Anwendung, die native IDs direkt speichert, muss die neuen Werte beachten.
|
that stores native IDs directly must account for the new values.
|
||||||
|
|
||||||
Die unterstützte `ceph_mksnap`-Schnittstelle nimmt Namen, Modus und
|
The supported `ceph_mksnap` interface accepts a name, a mode and custom
|
||||||
benutzerdefinierte Metadaten entgegen, aber keine gewünschte native ID oder
|
metadata, but no desired native ID or birth time. `ceph.snap.btime` is
|
||||||
Geburtszeit. `ceph.snap.btime` ist im Client ausdrücklich schreibgeschützt.
|
explicitly read-only in the client. CephFS mirroring also creates a new
|
||||||
Auch CephFS-Mirroring erzeugt im Ziel einen neuen Snapshot und hält die
|
snapshot at the target and records the source ID as separate metadata.
|
||||||
Quell-ID als separate Metadaten fest.
|
|
||||||
|
|
||||||
Quellen:
|
Sources:
|
||||||
|
|
||||||
- [libcephfs-Schnittstelle](https://github.com/ceph/ceph/blob/main/src/include/cephfs/libcephfs.h)
|
- [libcephfs interface](https://github.com/ceph/ceph/blob/main/src/include/cephfs/libcephfs.h)
|
||||||
- [Client: virtuelle Snapshot-Attribute](https://github.com/ceph/ceph/blob/main/src/client/Client.cc)
|
- [Client: virtual snapshot attributes](https://github.com/ceph/ceph/blob/main/src/client/Client.cc)
|
||||||
- [Mirror: Anlegen eines Zielsnapshots](https://github.com/ceph/ceph/blob/main/src/tools/cephfs_mirror/PeerReplayer.cc)
|
- [Mirror: creating a target snapshot](https://github.com/ceph/ceph/blob/main/src/tools/cephfs_mirror/PeerReplayer.cc)
|
||||||
|
|
||||||
Im lokalen Ceph-21.2.0-Labor wurden bei einem gleichnamigen Snapshot
|
In the local Ceph 21.2.0 lab, a snapshot of the same name had source ID 6 and
|
||||||
Quell-ID 6 und Ziel-ID 2 sowie unterschiedliche Geburtszeiten gemessen.
|
target ID 2 and different birth times. An attempt to write the existing value
|
||||||
Ein Schreibversuch mit dem bereits vorhandenen Wert von `ceph.snap.btime`
|
of `ceph.snap.btime` on our own test snapshot was rejected with `EROFS`.
|
||||||
am eigenen Testsnapshot wurde mit `EROFS` abgewiesen.
|
|
||||||
|
|
||||||
Mit den geprüften Schnittstellen lässt sich die native Snapshot-Identität nicht
|
The examined interfaces do not allow the native snapshot identity to be set.
|
||||||
vorgeben. Diese Einschränkung ist akzeptiert; sie wird ausdrücklich vermerkt.
|
This limitation is accepted and explicitly recorded. Load tests and an
|
||||||
Lastnachweise und eine automatisierte produktive Client-Umschaltung fehlen noch.
|
automated production client cutover are still missing.
|
||||||
|
|
||||||
## Kommandos
|
## Commands
|
||||||
|
|
||||||
Das native Backend benötigt Linux, Ceph CLI, libcephfs und einen mit CGO und
|
The native backend needs Linux, the Ceph CLI, libcephfs and a copier built
|
||||||
`-tags ceph` gebauten Kopierer. Es benötigt keine Betriebssystem-Mounts und
|
with CGO and `-tags ceph`. It needs no operating system mounts and no
|
||||||
keinen privilegierten Container. Zum Erhalten fremder UID/GID und geschützter
|
privileged container. Preserving foreign UID/GID and protected xattrs requires
|
||||||
xattrs sind entsprechende Client-/Prozessrechte nötig; das Labor verwendet root.
|
the corresponding client and process privileges; the lab uses root. The
|
||||||
Der optionale Referenzpfad `backend: rsync` benötigt zusätzlich rsync und am
|
optional reference path `backend: rsync` additionally needs rsync and source
|
||||||
Dateisystem-Root gemountete Quell-/Zieldateisysteme.
|
and target file systems mounted at the file system root.
|
||||||
Die Subvolumes müssen schon existieren. Für einen neuen Job müssen Datenbaum,
|
The subvolumes must already exist. For a new job, the data tree, snapshots and
|
||||||
Snapshots und benutzerdefinierte Metadaten des Ziels leer sein.
|
custom metadata of the target must be empty. No application may write to the
|
||||||
Keine Anwendung darf ins Ziel schreiben.
|
target.
|
||||||
|
|
||||||
Die Konfiguration in `dev/migration.example.json` wählt `backend: native` und
|
The configuration in `dev/migration.example.json` selects `backend: native`
|
||||||
gilt im Labordienst `native`. `mount` wird dort nicht verwendet und kann fehlen.
|
and applies to the lab service `native`. `mount` is not used there and may be
|
||||||
`workers` begrenzt gleichzeitige Dateikopien (Standard 8, maximal 64),
|
omitted. `workers` limits concurrent file copies (default 8, at most 64),
|
||||||
`bandwidth_kib` begrenzt die Summe geschriebener Nutzdatenbytes pro Sekunde.
|
`bandwidth_kib` limits the total payload bytes written per second. Both values
|
||||||
Beide Werte dürfen bei Wiederaufnahme geändert werden.
|
may be changed when resuming.
|
||||||
Die nativen `transfer`-Statistiken im Journal nennen Modus, Basis-Snapshot,
|
The native `transfer` statistics in the journal report the mode, the base
|
||||||
besuchte/kopierte Dateien sowie geschriebene und zur Prüfung gelesene Bytes.
|
snapshot, visited and copied files, and bytes written and read for
|
||||||
`bytes_copied` zählt Nutzdaten-Schreibzugriffe ohne ausgesparte Nullbereiche;
|
verification. `bytes_copied` counts payload writes without skipped zero
|
||||||
es misst nicht das gesamte Netzwerkaufkommen einschließlich Protokoll und Prüfung.
|
ranges; it does not measure the total network traffic including protocol and
|
||||||
|
verification.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make dev-native-build
|
make dev-native-build
|
||||||
@@ -61,194 +60,212 @@ docker compose -f dev/compose.yaml exec native \
|
|||||||
cephmig-native inspect --config /lab/migration.example.json
|
cephmig-native inspect --config /lab/migration.example.json
|
||||||
```
|
```
|
||||||
|
|
||||||
Der lesende Preflight vergleicht CLI-FSID und die über den Client gelesene
|
The read-only preflight compares the FSID from the CLI with the
|
||||||
`ceph.cluster_fsid`, prüft Pfade und Subvolume-Status und meldet die aktuelle
|
`ceph.cluster_fsid` read through the client, checks paths and subvolume state
|
||||||
Datenmenge sowie Snapshotnamen. Die Datenmenge ist **keine** Kapazitätsprognose
|
and reports the current data size and snapshot names. The data size is **not**
|
||||||
für alle historischen Snapshots.
|
a capacity forecast for all historical snapshots.
|
||||||
|
|
||||||
Das Backend hat folgende Übertragungskommandos:
|
The backend has the following transfer commands:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cephmig sync --config /absolute/config.json --state /local-state/job.json
|
cephmig sync --config /absolute/config.json --state /local-state/job.json
|
||||||
cephmig status --state /local-state/job.json
|
cephmig status --state /local-state/job.json
|
||||||
# Alle Quellwriter einschließlich weiterer Clients stoppen und flushen.
|
# Stop and flush all source writers, including other clients.
|
||||||
cephmig finalize --config /absolute/config.json \
|
cephmig finalize --config /absolute/config.json \
|
||||||
--state /local-state/job.json --writers-stopped
|
--state /local-state/job.json --writers-stopped
|
||||||
|
# After the cutover has been checked:
|
||||||
|
cephmig cleanup --config /absolute/config.json --state /local-state/job.json
|
||||||
```
|
```
|
||||||
|
|
||||||
`sync` verarbeitet bekannte, noch nicht abgeschlossene Stände, neu entdeckte
|
`sync` processes known, unfinished states, newly discovered application
|
||||||
Anwendungssnapshots und danach einen neuen Quellsnapshot. Weitere Änderungen
|
snapshots and then a new source snapshot. Further changes are caught up by
|
||||||
werden durch erneutes `sync` nachgezogen. Das native Backend verwendet Snapdiff
|
running `sync` again. The native backend uses snapdiff and the Ceph inode
|
||||||
und die Ceph-Inode-Version; dadurch werden auch Datenänderungen gleicher Größe
|
version, so it also detects data changes with the same size and mtime. The
|
||||||
und gleicher mtime erkannt. Der rsync-Pfad verwendet Prüfsummen.
|
rsync path uses checksums.
|
||||||
|
|
||||||
`finalize` bestätigt den Schreibstopp ausschließlich über die ausdrückliche
|
`finalize` relies solely on the operator's explicit confirmation of the write
|
||||||
Operatorangabe; es stoppt oder sperrt selbst keine Anwendung. Alle Writer
|
stop; it does not stop or lock any application itself. All writers must stay
|
||||||
müssen bis zur abgeschlossenen Umschaltung gestoppt bleiben. Der Job endet
|
stopped until the cutover is complete. The job ends in `ready-for-cutover`.
|
||||||
bei `ready-for-cutover`. Remounts, Neustarts der Anwendungen und eine
|
Remounts, application restarts and a migration back after writes to the
|
||||||
Rückmigration nach Schreibzugriffen am Ziel sind nicht automatisiert.
|
target are not automated.
|
||||||
|
|
||||||
## Übertragene Daten
|
### Migration snapshots
|
||||||
|
|
||||||
- Snapshotnamen und Inhalte; bestehende Snapshots werden chronologisch übertragen.
|
Each round creates a snapshot `cephmig-<job>-<round>` at source and target.
|
||||||
- Numerische UID/GID, Modus, POSIX-ACLs einschließlich Default-ACLs.
|
Only the newest one is needed, as base for the next round. As soon as a round
|
||||||
- Zeitstempel je Datei, Verzeichnis und Symlink:
|
is complete, `sync` deletes the older round snapshots on both sides. Users of
|
||||||
|
the subvolume therefore see at most one migration snapshot at a time.
|
||||||
|
|
||||||
| Zeitstempel | native | rsync |
|
`cleanup` deletes the remaining round snapshot, including the final one,
|
||||||
|
after the job is `ready-for-cutover`. Afterwards the subvolumes hold only the
|
||||||
|
snapshots of the application. Since the final snapshot is the immutable
|
||||||
|
reference of the last round, run `cleanup` only after the cutover has been
|
||||||
|
checked. `cleanup` is idempotent.
|
||||||
|
|
||||||
|
Application snapshots are never deleted. The journal marks a snapshot as
|
||||||
|
`removed` before deleting it, so an interrupted run completes the deletion
|
||||||
|
next time.
|
||||||
|
|
||||||
|
## Transferred data
|
||||||
|
|
||||||
|
- Snapshot names and contents; existing snapshots are transferred in
|
||||||
|
chronological order.
|
||||||
|
- Numeric UID/GID, mode, POSIX ACLs including default ACLs.
|
||||||
|
- Timestamps of every file, directory and symlink:
|
||||||
|
|
||||||
|
| Timestamp | native | rsync |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| mtime (letzte Änderung) | ja | ja |
|
| mtime (last modification) | yes | yes |
|
||||||
| btime (Erstellung) | ja | nein |
|
| btime (creation) | yes | no |
|
||||||
| atime (letzter Zugriff) | ja | nein |
|
| atime (last access) | yes | no |
|
||||||
| ctime (letzte Statusänderung) | ja¹ | nein |
|
| ctime (last status change) | yes¹ | no |
|
||||||
|
|
||||||
¹ Nanosekundengenau, aber nie kleiner als die mtime: Ist an der Quelle die
|
¹ To the nanosecond, but never lower than the mtime: if the source mtime is
|
||||||
mtime neuer als die ctime (mtime in die Zukunft gesetzt), erhält das Ziel
|
newer than its ctime (mtime set into the future), the target gets
|
||||||
ctime = mtime.
|
ctime = mtime.
|
||||||
|
|
||||||
Keine Dateisystemschnittstelle setzt die ctime direkt; Ceph 21.2.0 ignoriert
|
No file system interface sets the ctime directly; Ceph 21.2.0 ignores
|
||||||
`CEPH_SETATTR_CTIME`. Der MDS übernimmt als ctime aber den Zeitstempel, den
|
`CEPH_SETATTR_CTIME`. The MDS does, however, take the ctime from the time
|
||||||
der Client mit jeder Anfrage schickt, und libcephfs liest ihn aus
|
stamp the client sends with each request, and libcephfs reads that stamp
|
||||||
`clock_gettime(CLOCK_REALTIME)`. Das native Backend ersetzt `clock_gettime`
|
from `clock_gettime(CLOCK_REALTIME)`. The native backend replaces
|
||||||
im eigenen Prozess (Symbol-Interposition, nur im aufrufenden Thread und nur
|
`clock_gettime` in its own process (symbol interposition, only in the
|
||||||
für die Dauer eines libcephfs-Aufrufs; die Go-Laufzeit liest die Uhr über
|
calling thread and only for the duration of one libcephfs call; the Go
|
||||||
den vDSO und ist nicht betroffen):
|
runtime reads the clock through the vDSO and is not affected):
|
||||||
|
|
||||||
- Jeder ändernde Aufruf läuft mit dem Zeitstempel 1970-01-01T00:00:01Z.
|
- Every modifying call runs with the time stamp 1970-01-01T00:00:01Z.
|
||||||
- Als letzte Änderung eines Eintrags legt das Backend das xattr
|
- As the last change to an entry, the backend creates and removes the xattr
|
||||||
`user.cephmig.ctime` an und entfernt es wieder, mit der Quell-ctime als
|
`user.cephmig.ctime`, stamped with the source ctime. The MDS then sets
|
||||||
Zeitstempel. Der MDS setzt dabei ctime = max(Zeitstempel, mtime), auch
|
ctime = max(stamp, mtime), also backwards. Setattr and cap flushes, in
|
||||||
rückwärts. Setattr und Cap-Flushes bewegen die ctime dagegen nur vorwärts.
|
contrast, only move the ctime forward.
|
||||||
- Verzeichnisse werden nach allen Änderungen ihrer Kinder gestempelt,
|
- Directories are stamped after all changes to their children, hardlinks
|
||||||
Hardlinks nach dem Verlinken und nach dem Entfernen überzähliger Namen.
|
after linking and after removing surplus names.
|
||||||
- Der Client, der schreibt, cacht für Verzeichnisse teils eine abweichende
|
- The writing client sometimes caches a different ctime for directories.
|
||||||
ctime. Die Prüfung vor der Veröffentlichung liest das Ziel deshalb über
|
The verification before publication therefore reads the target through a
|
||||||
einen eigenen, frisch verbundenen Client.
|
separate, freshly connected client.
|
||||||
|
|
||||||
Das Verhalten ist im Labor gemessen, nicht von Ceph zugesichert; die
|
This behaviour was measured in the lab and is not guaranteed by Ceph; the
|
||||||
Prüfung meldet jede Abweichung. Die atime im Ziel ändert sich danach durch
|
verification reports every deviation. The atime at the target subsequently
|
||||||
normale Lesezugriffe der Anwendung. rsync kann unter Linux keine btime
|
changes through normal reads of the application. rsync cannot transfer the
|
||||||
übertragen; atime wird nicht übernommen, weil die Prüfsummenprüfung über
|
btime on Linux; the atime is not transferred because the checksum
|
||||||
den Mount die atime im Ziel verändern kann.
|
verification through the mount can change the target atime.
|
||||||
- Benutzer-xattrs und weitere portable xattrs; einschließlich leerer Werte und Löschungen.
|
- User xattrs and other portable xattrs, including empty values and removals.
|
||||||
- Hardlinks innerhalb des Subvolumes, Symlinks und FIFOs.
|
- Hardlinks within the subvolume, symlinks and FIFOs.
|
||||||
- Sparse-Dateiinhalte; der native Pfad überspringt Nullbereiche bzw. verwendet Hole-Punching.
|
- Sparse file contents; the native path skips zero ranges or punches holes.
|
||||||
Die physische Platzbelegung wird nicht zugesichert.
|
The physical space usage is not guaranteed.
|
||||||
- Verzeichnisquotas `ceph.quota.max_bytes` und `ceph.quota.max_files`, auch am Datenroot.
|
- Directory quotas `ceph.quota.max_bytes` and `ceph.quota.max_files`, also at
|
||||||
- Benutzerdefinierte Subvolume- und Snapshot-Metadaten über die Manager-API.
|
the data root.
|
||||||
- Ursprüngliche und neue Snapshot-Erstellungszeiten im Journal.
|
- Custom subvolume and snapshot metadata through the manager API.
|
||||||
|
- Original and new snapshot creation times in the journal.
|
||||||
|
|
||||||
Softlinks bleiben als Linktext erhalten, auch wenn das Ziel nicht existiert.
|
Symlinks are kept as link text, even if their target does not exist. The
|
||||||
Der native Pfad erhält auch Hardlinks auf Symlinks und FIFOs; bei Symlinks
|
native path also preserves hardlinks to symlinks and FIFOs; for symlinks it
|
||||||
verknüpft er die Inode über die öffentliche Low-Level-Schnittstelle, damit der
|
links the inode through the public low-level interface, so that the link
|
||||||
Link selbst und nicht sein Referent verknüpft wird.
|
itself and not its referent is linked.
|
||||||
Absolute Links werden nicht umgeschrieben; bei der Umschaltung muss der
|
Absolute links are not rewritten; at cutover, the application's mount path
|
||||||
Anwendungs-Mountpfad dazu passen. Hardlinks über die Grenze des übertragenen
|
must match them. Hardlinks across the boundary of the transferred subvolume
|
||||||
Subvolumes hinaus werden nicht als gemeinsame Verknüpfung migriert.
|
are not migrated as a shared link.
|
||||||
|
|
||||||
Clusterinterne Layout-, Pool- und andere `ceph.*`-Attribute werden nicht
|
Cluster-internal layout, pool and other `ceph.*` attributes are not copied
|
||||||
blind kopiert; Quotas werden gesondert übertragen. Pool-/Layout-Mappings,
|
blindly; quotas are transferred separately. Pool and layout mappings,
|
||||||
Subvolumegruppenquotas, Pinning, Authorisierungen, Snapshot-Zeitpläne, aktive
|
subvolume group quotas, pinning, authorizations, snapshot schedules, active
|
||||||
Clone-Jobs und weitere Ceph-Verwaltungszustände sind nicht implementiert.
|
clone jobs and other Ceph management state are not implemented.
|
||||||
Die Migration übernimmt die von der Subvolume-API aufgelisteten Snapshots mit
|
The migration transfers the snapshots listed by the subvolume API with their
|
||||||
ihrem gesamten Verzeichnisbaum. CephFS unterstützt allgemein Verzeichnissnapshots;
|
entire directory tree. CephFS supports directory snapshots in general, but
|
||||||
eigene Snapshots unterhalb eines verwalteten Subvolumes verweigert der MDS jedoch.
|
the MDS refuses separate snapshots below a managed subvolume. In the Ceph
|
||||||
Im Ceph-21.2.0-Labor war ein Snapshot eines normalen Verzeichnisses erfolgreich,
|
21.2.0 lab, a snapshot of a plain directory succeeded, while the same attempt
|
||||||
derselbe Versuch in einem Subvolume-Unterordner scheiterte mit `EPERM`.
|
in a subvolume subdirectory failed with `EPERM`. Inherited snapshot views
|
||||||
In Unterordnern sichtbare, geerbte Snapshot-Ansichten sind Bestandteil des
|
visible in subdirectories are part of the parent subvolume snapshot. The
|
||||||
übergeordneten Subvolume-Snapshots. Die frühere Warnung zu separaten
|
earlier warning about separate subdirectory snapshots was too broad for this
|
||||||
Unterverzeichnissnapshots war für dieses verwaltete Subvolume-Modell zu pauschal.
|
managed subvolume model.
|
||||||
Siehe [MDS-Prüfung der Subvolume-Grenze](https://github.com/ceph/ceph/blob/main/src/mds/Server.cc).
|
See [MDS check of the subvolume boundary](https://github.com/ceph/ceph/blob/main/src/mds/Server.cc).
|
||||||
Beim rsync-Backend bleiben ctime und atime nicht erhalten; bei beiden Backends
|
With the rsync backend, ctime and atime are not preserved; with both
|
||||||
werden originale Inode-Nummern und native Snapshot-IDs neu vergeben.
|
backends, original inode numbers and native snapshot IDs are assigned anew.
|
||||||
Verschlüsselte, normalisierte, nicht case-sensitive oder mit Earmark versehene
|
Encrypted, normalized, case-insensitive or earmarked subvolumes are rejected.
|
||||||
Subvolumes werden abgelehnt.
|
|
||||||
|
|
||||||
## Wiederaufnahme und Verifikation
|
## Resumption and verification
|
||||||
|
|
||||||
Der Job speichert ein atomar ersetztes, mit fsync gesichertes JSON-Journal
|
The job keeps a JSON journal with mode 0600 that is replaced atomically and
|
||||||
mit Modus 0600. Es enthält Konfiguration, Cluster-FSIDs, die konkreten
|
secured with fsync. It contains the configuration, the cluster FSIDs, the
|
||||||
Subvolume-Datenpfade und Snapshot-Intent-/Abschlussinformationen. Eine
|
concrete subvolume data paths and per-snapshot intent and completion records.
|
||||||
Neuanlage desselben Subvolumenamens mit anderer Daten-UUID wird abgewiesen.
|
Recreating the same subvolume name with a different data UUID is rejected.
|
||||||
|
|
||||||
Eine lokale flock-Sperre verhindert parallele Zugriffe auf dasselbe Journal.
|
A local flock lock prevents concurrent access to the same journal. A
|
||||||
Ein persistenter Claim unter `<target-filesystem>/.cephmig/claims/` mit
|
persistent claim under `<target-filesystem>/.cephmig/claims/` with an
|
||||||
exklusiver Datei-/CephFS-Sperre schützt das Ziel auch bei verschiedenen lokalen
|
exclusive file/CephFS lock protects the target even across different local
|
||||||
Journalpfaden. Ein fehlendes oder unvollständiges Journal wird nicht durch
|
journal paths. A missing or incomplete journal is never replaced by
|
||||||
automatische Übernahme vorhandener Zieldaten ersetzt.
|
automatically adopting existing target data.
|
||||||
|
|
||||||
Jeder Snapshotstand wird kopiert, einschließlich Quotas verifiziert und erst
|
Each snapshot state is copied, verified including quotas, and only then
|
||||||
danach am Ziel als Snapshot angelegt. Ein bereits angelegter, aber noch nicht
|
created as a snapshot at the target. A target snapshot that was created but
|
||||||
im Journal bestätigter Zielsnapshot wird bei Wiederaufnahme erneut gegen die
|
not yet confirmed in the journal is verified again against the immutable
|
||||||
unveränderliche Quelle geprüft. Ersatz oder Verlust bereits abgeschlossener
|
source on resumption. Replacement or loss of already completed snapshots is
|
||||||
Snapshots wird anhand der gespeicherten Identität erkannt.
|
detected from the stored identity; snapshots the journal marks as `removed`
|
||||||
|
are exempt.
|
||||||
|
|
||||||
Der native Datenpfad verwendet einen lokalen bbolt-Index mit Quell-Inode,
|
The native data path uses a local bbolt index with source inode, inode
|
||||||
Inode-Version, Größe und Ziel-Inode pro Pfad. Er enthält keine Dateiinhalte.
|
version, size and target inode per path. It contains no file contents. The
|
||||||
Die bestätigte Basis wird vor jeder Zieländerung im JSON-Journal ungültig
|
confirmed base is invalidated in the JSON journal before any change to the
|
||||||
gemacht und erst nach erfolgreicher Verifikation und einem fsync des Index
|
target and confirmed again only after successful verification and an fsync of
|
||||||
erneut bestätigt. Cluster, Daten-UUID-Pfade und Snapshotname müssen passen.
|
the index. Clusters, data UUID paths and snapshot name must match. After an
|
||||||
Nach einem Abbruch wird der offene Stand vollständig nativ rekonstruiert;
|
interruption, the open state is reconstructed fully and natively; a partially
|
||||||
ein nur teilweise ausgeführter Blockdiff darf nicht als Basis gelten.
|
applied blockdiff must not count as a base. An already published but
|
||||||
Ein bereits publizierter, unbestätigter Zielsnapshot wird erneut geprüft.
|
unconfirmed target snapshot is verified again. After SIGKILL, the release of
|
||||||
Nach SIGKILL kann die Freigabe alter Ceph-Clientsitzungen den Wiederanlauf verzögern.
|
old Ceph client sessions can delay the restart.
|
||||||
|
|
||||||
Der Index enthält außerdem das vollständige Pfadinventar des unveränderlichen
|
The index also contains the complete path inventory of the immutable source
|
||||||
Quellsnapshots: Dateien, Verzeichnisse, Hardlink-Aliase und Spezialdateien.
|
snapshot: files, directories, hardlink aliases and special files. It is
|
||||||
Erst nach vollständiger Erfassung wird es als vollständig markiert. Aufräumen
|
marked complete only after it has been fully recorded. Pruning and the check
|
||||||
und Überhangprüfung gleichen Zielpfade mit diesem lokalen Inventar ab und
|
for surplus target paths compare target paths with this local inventory and
|
||||||
vermeiden dadurch erneute `stat`-Abfragen für jeden Quellpfad. Unvollständige
|
thus avoid another `stat` call for every source path. Incomplete or damaged
|
||||||
oder beschädigte Inventare führen zum Abbruch. Bereits identische Inode-Zeilen
|
inventories abort the run. Identical inode rows are not written to the index
|
||||||
werden bei der Verifikation nicht erneut in den Index geschrieben.
|
again during verification.
|
||||||
|
|
||||||
Unveränderliche Pfade unter `.snap` werden bei `stat` und `readdirplus` mit
|
Immutable paths under `.snap` are read with `AT_STATX_DONT_SYNC` for `stat`
|
||||||
`AT_STATX_DONT_SYNC` gelesen, wie in Cephs eigenem Mirror. Dadurch werden
|
and `readdirplus`, as in Ceph's own mirror. This avoids requesting metadata
|
||||||
Metadatensperren nicht allein für eine erneute Synchronisation bereits
|
locks just to resynchronize snapshot inodes that cannot change anyway. Live
|
||||||
unveränderlicher Snapshot-Inodes angefordert. Live-Zielpfade behalten ihre
|
target paths keep their normal synchronization semantics. Details and
|
||||||
normale Synchronisationssemantik. Details und Messergebnisse stehen in
|
measurements are in [smallfiles-local.md](smallfiles-local.md).
|
||||||
[smallfiles-local.md](smallfiles-local.md).
|
|
||||||
|
|
||||||
Bei einer vollständigen Kopie vergleicht die native Prüfung alle Dateiinhalte.
|
For a full copy, the native verification compares all file contents. For
|
||||||
Bei Folgeständen prüft sie kopierte Dateien bzw. die von Blockdiff gemeldeten
|
later states, it checks copied files or the ranges reported by blockdiff.
|
||||||
Bereiche. Unveränderte Bytes stammen aus der zuvor verifizierten Basis. Daher
|
Unchanged bytes come from the previously verified base. The target tree must
|
||||||
muss der Zielbaum während des gesamten Jobs ausschließlich dem Kopierer gehören.
|
therefore belong exclusively to the copier for the entire job. Foreign
|
||||||
Fremde Änderungen unveränderter Dateibereiche werden damit nicht zuverlässig
|
changes to unchanged file ranges are not reliably detected this way.
|
||||||
gefunden. Metadaten, Quotas und Hardlink-Topologie werden in jedem Stand geprüft.
|
Metadata, quotas and hardlink topology are checked in every state. A target
|
||||||
Ein direkt nach der Prüfung angelegter Zielsnapshot wird auf Metadaten und
|
snapshot created right after the verification is checked for metadata and
|
||||||
Links geprüft; dieselben unveränderlichen Daten werden nicht erneut gelesen.
|
links; the same immutable data is not read again.
|
||||||
|
|
||||||
Die rsync-Prüfung liest Dateiinhalte per Checksumme und vergleicht zusätzlich
|
The rsync verification reads file contents by checksum and also compares the
|
||||||
die unterstützten Metadaten. Quotawerte werden separat geprüft. Wiederaufnahme
|
supported metadata. Quota values are checked separately. Resuming within a
|
||||||
innerhalb eines Standes nutzt die vorhandenen Teilkopien, muss den Baum aber
|
state reuses the existing partial copies, but has to scan the tree again;
|
||||||
erneut scannen; Checkpoints sind derzeit pro Snapshot, nicht pro Datei.
|
checkpoints currently exist per snapshot, not per file. For a hardlink
|
||||||
Bei einem im Labor reproduzierten Hardlink-`EEXIST` wird genau einmal
|
`EEXIST` reproduced in the lab, the transfer is retried exactly once,
|
||||||
idempotent wiederholt; andere Fehler werden sofort zurückgegeben.
|
idempotently; other errors are returned immediately.
|
||||||
|
|
||||||
Zusätzlich wird die Hardlink-Topologie in beide Richtungen geprüft: alle
|
In addition, the hardlink topology is verified in both directions: all source
|
||||||
Quellpfade derselben Inode müssen im Ziel zusammengehören; unabhängige
|
paths of the same inode must belong together at the target, and independent
|
||||||
Quelldateien dürfen im Ziel nicht versehentlich dieselbe Inode teilen.
|
source files must not accidentally share an inode at the target. This is
|
||||||
Das ist nötig, weil [rsync -H](https://download.samba.org/pub/rsync/rsync.1)
|
needed because [rsync -H](https://download.samba.org/pub/rsync/rsync.1) does
|
||||||
überzählige bestehende Zielverknüpfungen nicht in jedem Fall auflöst.
|
not resolve surplus existing target links in every case. Before copying, the
|
||||||
Im rsync-Pfad werden vor dem Kopieren solche überzähligen Verknüpfungen am
|
rsync path removes such surplus links in the exclusive target and rebuilds
|
||||||
exklusiven Ziel entfernt und aus dem Quellsnapshot neu aufgebaut. Der native
|
them from the source snapshot. The native path creates full copies
|
||||||
Pfad erzeugt vollständige Kopien atomar als neue Inodes und setzt anschließend
|
atomically as new inodes and then sets the hardlink aliases. Old target
|
||||||
die Hardlink-Aliase. Alte Zielsnapshots
|
snapshots stay unchanged. Symlinked directories are not followed.
|
||||||
bleiben unverändert. Symlink-Verzeichnisse werden dabei nicht verfolgt.
|
|
||||||
|
|
||||||
Die Prüfzuordnungen liegen in einem temporären bbolt-Index neben dem Journal;
|
The verification mappings live in a temporary bbolt index next to the
|
||||||
Schreibtransaktionen werden nach 4.096 Beobachtungen abgeschlossen. Der Index
|
journal; write transactions are committed after 4,096 observations. The index
|
||||||
wird nach jedem Prüf-/Reparaturlauf verworfen und bei Bedarf neu aufgebaut.
|
is discarded after every verification or repair run and rebuilt when needed.
|
||||||
Er ist kein Wiederaufnahmejournal. Der native Basisindex unter
|
It is not a resumption journal. The native base index under
|
||||||
`<journal>.native/base.bolt` bleibt dagegen erhalten. Dafür muss lokal ausreichend Platz
|
`<journal>.native/base.bolt`, in contrast, is kept. Sufficient local disk
|
||||||
vorhanden sein. Pfadtiefen über 128 Verzeichnisse werden derzeit abgewiesen.
|
space is required for it. Path depths beyond 128 directories are currently
|
||||||
Nach einem harten Prozessabbruch während eines Indexlaufs können temporäre
|
rejected. After a hard process abort during an index run, temporary index
|
||||||
Indexverzeichnisse übrig bleiben; sie werden nicht als Checkpoints verwendet.
|
directories can remain; they are never used as checkpoints.
|
||||||
|
|
||||||
Quell- und Zielsnapshots werden nicht automatisch gelöscht. Journal und Claim
|
Journal and claim must be kept for resumption. An incomplete claim after a
|
||||||
müssen für Wiederaufnahme erhalten bleiben. Ein unvollständiger Claim nach
|
crash during its very first creation is deliberately not repaired
|
||||||
einem Absturz während seiner allerersten Anlage wird absichtlich nicht
|
automatically; that requires checking the original job ID.
|
||||||
automatisch repariert; dafür ist eine Prüfung der ursprünglichen Job-ID nötig.
|
|
||||||
|
|
||||||
## Tests und Größenordnung
|
## Tests and scale
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make check
|
make check
|
||||||
@@ -257,64 +274,62 @@ make dev-migration-test
|
|||||||
make dev-native-test
|
make dev-native-test
|
||||||
```
|
```
|
||||||
|
|
||||||
Die Integrationstests erzeugen eigene Subvolumes und prüfen historische Stände,
|
The integration tests create their own subvolumes and check historical
|
||||||
Änderungsnachlauf, Metadaten, entfernte Dateien, Kopierfehler und einen
|
states, catching up with changes, metadata, removed files, copy errors and a
|
||||||
SIGKILL nach dem Anlegen eines Zielsnapshots, aber vor dem Journal-Commit.
|
SIGKILL after a target snapshot was created but before the journal commit.
|
||||||
Er prüft auch den gespeicherten Hinweis auf neue Snapshot-Identitäten und das
|
They also check the stored note about new snapshot identities, the
|
||||||
Auflösen zuvor vorhandener Hardlinks bei unveränderten Dateiinhalten.
|
resolution of previously existing hardlinks with unchanged file contents, the
|
||||||
Bei Erfolg entfernt er ausschließlich seine eigenen Fixtures; bei Fehlern
|
removal of older round snapshots during `sync` and the removal of all
|
||||||
bleiben die ausgegebenen Testpfade zur Diagnose erhalten.
|
migration snapshots by `cleanup`. On success they remove only their own
|
||||||
|
fixtures; on failure the reported test paths are kept for diagnosis.
|
||||||
|
|
||||||
Der native Test verwendet einen Kopierer ohne FUSE-Gerät, CephFS-Mounts und
|
The native test uses a copier without a FUSE device, CephFS mounts or rsync.
|
||||||
rsync. Ein separater FUSE-Anwendungsclient prüft unabhängig alle Dateiinhalte
|
A separate FUSE application client independently checks all file contents
|
||||||
mit SHA-256 sowie Metadaten, Links und Snapshots. Er prüft eine 4-KiB-Änderung
|
with SHA-256, as well as metadata, links and snapshots. It checks a 4 KiB
|
||||||
in einer 64-MiB-Datei bei gleicher mtime, Wachstum und Nullbereiche, Linkgruppen
|
change in a 64 MiB file with the same mtime, growth and zero ranges, link
|
||||||
mit Trennung/Wiedervereinigung sowie Wechsel zwischen Verzeichnis und Symlink.
|
groups that are split and rejoined, and changes between directory and
|
||||||
Hardlinks auf nicht auflösbare Symlinks und FIFOs werden ebenfalls unabhängig
|
symlink. Hardlinks to unresolvable symlinks and FIFOs are also compared
|
||||||
anhand der Inodes verglichen, einschließlich späterer Trennung einer FIFO-Gruppe.
|
independently by inode, including a later split of a FIFO group. Further
|
||||||
Weitere Prüfungen betreffen Abbruch während der Kopie, SIGKILL unmittelbar nach
|
checks cover cancellation during the copy, SIGKILL right after snapshot
|
||||||
Snapshot-Erzeugung, Wiederanlauf und idempotenten Abschluss. Währenddessen
|
creation, restart and idempotent completion. Meanwhile, an application keeps
|
||||||
schreibt eine Anwendung fortlaufend in ein anderes Quell-Subvolume.
|
writing to another source subvolume.
|
||||||
|
|
||||||
Laborergebnis vom 05.11.2026 mit Ceph 21.2.0: nativer Integrationstest und
|
Lab result of 2026-11-05 with Ceph 21.2.0: native integration test and rsync
|
||||||
rsync-Regression erfolgreich; Go-Tests einschließlich Race Detector und
|
regression passed; Go tests including the race detector and `go vet` for the
|
||||||
`go vet` für den Ceph-Build erfolgreich. Der native Test schloss fünf Stände
|
Ceph build passed. The native test completed five states with
|
||||||
mit `ready-for-cutover` ab und prüfte sie zusätzlich über den Anwendungsclient.
|
`ready-for-cutover` and additionally checked them through the application
|
||||||
Bei der Änderung von 4 KiB in der 64-MiB-Datei wurden für diese Datei 4 KiB,
|
client. For the 4 KiB change in the 64 MiB file, 4 KiB were written for this
|
||||||
für den gesamten zweiten Stand einschließlich weiterer geänderter Dateien
|
file and 4,128 payload bytes for the whole second state including other
|
||||||
4.128 Nutzdatenbytes geschrieben. Im unveränderten finalen Stand waren es
|
changed files. In the unchanged final state, 0 payload bytes were written.
|
||||||
0 Nutzdatenbytes. Das ist ein Funktionsnachweis, kein Durchsatzbenchmark.
|
This is a functional proof, not a throughput benchmark.
|
||||||
|
|
||||||
Der lesende Identitätsvergleich für bereits vorhandene Laborsnapshots lautet:
|
The read-only identity comparison for existing lab snapshots is:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
python3 /lab/snapshot-identity.py \
|
python3 /lab/snapshot-identity.py \
|
||||||
--config /absolute/lab-config.json --snapshot existing-snapshot
|
--config /absolute/lab-config.json --snapshot existing-snapshot
|
||||||
```
|
```
|
||||||
|
|
||||||
Go liest Verzeichnisquotas in Batches und hält keine Liste aller Dateien.
|
Go reads directory quotas in batches and keeps no list of all files. This
|
||||||
Das gilt **nicht** als Speicherobergrenze des externen rsync-Prozesses:
|
does **not** bound the memory of the external rsync process: large single
|
||||||
große Einzelverzeichnisse und Hardlinkgruppen können dort erheblichen
|
directories and hardlink groups can need considerable memory there. Every
|
||||||
Speicher benötigen. Jeder Stand verursacht vollständige Scans und
|
state causes full scans and checksum reads. Changed large files can need
|
||||||
Checksum-Lesevorgänge. Geänderte große Dateien können bei neuen Snapshots
|
considerable additional target space for new snapshots.
|
||||||
erheblichen zusätzlichen Zielplatz benötigen.
|
|
||||||
|
|
||||||
Im nativen Pfad sind Datei-Worker, Datenpuffer und Verzeichnisiteration begrenzt;
|
In the native path, file workers, data buffers and directory iteration are
|
||||||
Kopier- und Vergleichspuffer sind höchstens 4 MiB groß und werden für kleine
|
bounded; copy and compare buffers are at most 4 MiB and shrink for small
|
||||||
Dateien bzw. kurze Prüfbereiche entsprechend verkleinert. Identische Besitzer,
|
files and short verification ranges. Unchanged owner, mode and timestamps do
|
||||||
Rechte und mtime lösen keinen erneuten `setattr`-Aufruf aus; eine unmittelbar
|
not trigger another `setattr` call; a target stat read just before is reused
|
||||||
zuvor gelesene Zielstatistik wird bei der Metadatenprüfung wiederverwendet.
|
for the metadata check. Path and hardlink mappings live on local disk.
|
||||||
Pfad-/Hardlink-Zuordnungen liegen auf lokalem Datenträger. Snapdiff und Blockdiff
|
Snapdiff and blockdiff avoid repeated full transfers and full reads of
|
||||||
vermeiden wiederholte Vollübertragung und vollständiges Lesen unveränderter
|
unchanged file contents. The implementation still scans all metadata,
|
||||||
Dateiinhalte. Die Implementierung scannt aber weiterhin alle Metadaten,
|
including the full topology and quota check. Renamed files may be copied
|
||||||
einschließlich vollständiger Topologie- und Quotaprüfung. Umbenannte Dateien
|
again in full. Single transactions of the native index are not yet optimized
|
||||||
können erneut vollständig kopiert werden. Einzeltransaktionen des nativen
|
for 200 million paths.
|
||||||
Index sind noch nicht auf 200 Millionen Pfade optimiert.
|
|
||||||
|
|
||||||
200 TB und mehr als 200 Millionen Dateien sind damit noch nicht nachgewiesen.
|
|
||||||
Für diese Freigabe fehlen insbesondere Scans vermeidende Änderungsplanung,
|
|
||||||
belastbare Speicher-/Laufzeitmessungen, ein Kapazitätsmodell für historische
|
|
||||||
Versionen sowie ein automatisierter Client-Cutover. Eine feste maximale
|
|
||||||
Schreibstopplänge wird nicht zugesichert. Native API-Aufrufe sind blockierend;
|
|
||||||
Abbruch wird zwischen Aufrufen geprüft und wartet auf bereits laufende I/O.
|
|
||||||
|
|
||||||
|
200 TB and more than 200 million files are therefore not yet proven. What is
|
||||||
|
missing for that release in particular: change planning that avoids scans,
|
||||||
|
reliable memory and runtime measurements, a capacity model for historical
|
||||||
|
versions and an automated client cutover. A fixed maximum write-stop duration
|
||||||
|
is not guaranteed. Native API calls block; cancellation is checked between
|
||||||
|
calls and waits for I/O already in progress.
|
||||||
+73
-73
@@ -1,64 +1,64 @@
|
|||||||
# Lokaler Millionentest mit Snapshots
|
# Local one-million-file test with snapshots
|
||||||
|
|
||||||
## Ergebnis vom 06./07.11.2026
|
## Result of 2026-11-06/07
|
||||||
|
|
||||||
**PASS**, abgeschlossen am 07.11.2026 um 01:58:57 Uhr MEZ. Der Job erreichte
|
**PASS**, completed on 2026-11-07 at 01:58:57 CET. The job reached
|
||||||
`ready-for-cutover`. Die unabhängige Prüfung bestätigte den aktuellen Zielstand
|
`ready-for-cutover`. The independent check confirmed the current target state
|
||||||
und vier Snapshots: insgesamt **5.000.500 reguläre Dateipfade**, zusätzlich
|
and four snapshots: a total of **5,000,500 regular file paths**, plus
|
||||||
Symlinks, Verzeichnisse, Besitzer, Rechte, ACLs, xattrs, Quotas und Snapshot-
|
symlinks, directories, owners, modes, ACLs, xattrs, quotas and snapshot user
|
||||||
Benutzermetadaten. Ein anderes Subvolume blieb mit 14.640 bestätigten
|
metadata. Another subvolume stayed writable with 14,640 confirmed writes.
|
||||||
Schreibvorgängen beschreibbar.
|
|
||||||
|
|
||||||
| Phase einschließlich interner Prüfungen | Dauer | Geschriebene Nutzdaten | MDS-Anfragen, beide Cluster |
|
| Phase including internal checks | Duration | Payload written | MDS requests, both clusters |
|
||||||
|---|---:|---:|---:|
|
|---|---:|---:|---:|
|
||||||
| Erstabgleich, bestehender und neuer Snapshot | 5 h 01 min 11 s | 128.000.000 Byte | 40.451.000 |
|
| Initial round, existing and new snapshot | 5 h 01 min 11 s | 128,000,000 bytes | 40,451,000 |
|
||||||
| Änderungsabgleich | 1 h 12 min 13 s | 6.400.128 Byte | 16.875.108 |
|
| Catch-up round | 1 h 12 min 13 s | 6,400,128 bytes | 16,875,108 |
|
||||||
| Finalisierung, unveränderte Quelle | 1 h 20 min 24 s | 0 Byte | 19.259.091 |
|
| Finalization, unchanged source | 1 h 20 min 24 s | 0 bytes | 19,259,091 |
|
||||||
|
|
||||||
Die erste vollständige Kopie einschließlich abschließender Inventar- und
|
The first full copy including the final inventory and metadata work took
|
||||||
Metadatenarbeit dauerte rund 1 h 40 min; die erste vollständige Prüfung des
|
about 1 h 40 min; the first full verification of the live target afterwards
|
||||||
Live-Ziels danach etwa 1 h 21 min. Das gesamte Testszenario einschließlich
|
about 1 h 21 min. The whole test scenario including data generation, changes
|
||||||
Datenerzeugung, Änderungen und unabhängiger Prüfung dauerte 9 h 04 min 37 s.
|
and independent verification took 9 h 04 min 37 s. Maximum sampled RSS of
|
||||||
Maximal erfasster RSS des Go-Prozesses über die drei Phasen: 646,2 MiB.
|
the Go process across the three phases: 646.2 MiB. The raw measurements are
|
||||||
Die Rohmesswerte stehen in [million-local.json](million-local.json).
|
in [million-local.json](million-local.json).
|
||||||
|
|
||||||
Die vollständigen Metadatendurchläufe bleiben teuer: Selbst die Finalisierung
|
The full metadata passes remain expensive: even the finalization without any
|
||||||
ohne Nutzdatenänderungen verursachte rund 19,3 Millionen MDS-Anfragen. Der
|
payload changes caused about 19.3 million MDS requests. The verification
|
||||||
Prüfpfad ist derzeit seriell. Ceph meldete während des Laufs außerdem langsame
|
path is currently serial. During the run, Ceph also reported slow BlueStore
|
||||||
BlueStore-Operationen und einen hohen BlueFS-Anteil auf den kleinen Test-OSDs.
|
operations and a high BlueFS share on the small test OSDs. The exact shares
|
||||||
Die genauen Anteile von CPU und Datenträgerlatenz wurden nicht isoliert
|
of CPU and disk latency were not profiled separately. The production
|
||||||
profiliert. Es gab keine Prüfung der produktiven 2×25-Gbit-Verbindung.
|
2×25 Gbit link was not tested. The run proves data correctness in the lab;
|
||||||
Der Lauf belegt die geprüfte Datenkorrektheit im Labor; ein kurzer finaler
|
a short final write stop for 200 million files is not yet proven. The
|
||||||
Schreibstopp für 200 Millionen Dateien ist damit noch nicht nachgewiesen.
|
finalization time does not include an application restart or client
|
||||||
Die Finalisierungsdauer enthält keinen Anwendungsneustart oder Client-Remount.
|
remount.
|
||||||
|
|
||||||
Die automatische Bereinigung entfernte ausschließlich das Projekt
|
The automatic cleanup removed only the project `cephmig-million` and its
|
||||||
`cephmig-million` samt Testvolumes am 07.11.2026 gegen 02:03 Uhr MEZ.
|
test volumes on 2026-11-07 at about 02:03 CET. The reports were kept;
|
||||||
Die Berichte blieben erhalten; danach waren rund 84 GiB Hostspeicher frei.
|
afterwards about 84 GiB of host disk were free.
|
||||||
|
|
||||||
## Testaufbau
|
## Test setup
|
||||||
|
|
||||||
Der Test legt 1.000.000 Dateien mit je 128 Byte reproduzierbarem Inhalt an,
|
The test creates 1,000,000 files of 128 bytes of reproducible content each,
|
||||||
verteilt auf 1.000 Verzeichnisse. Dazu kommen 100 Hardlink-Namen und 100 Symlinks,
|
spread over 1,000 directories. In addition there are 100 hardlink names and
|
||||||
numerische Besitzer, POSIX-Zugriffs-/Default-ACLs, Benutzer-xattrs und Quotas.
|
100 symlinks, numeric owners, POSIX access and default ACLs, user xattrs and
|
||||||
|
quotas.
|
||||||
|
|
||||||
Ein vor der Migration angelegter Snapshot enthält den ursprünglichen Stand.
|
A snapshot taken before the migration holds the original state. After the
|
||||||
Nach dem Erstabgleich ändert der Anwendungsclient jeweils 1 % der Inhalte,
|
initial round, the application client changes 1 % each of the contents, file
|
||||||
Dateinamen, Rechte/xattrs, löscht 1 % der Dateien und legt 1 % neue Dateien an.
|
names and modes/xattrs, deletes 1 % of the files and creates 1 % new files.
|
||||||
Inhaltsänderungen behalten die ursprüngliche mtime. Danach folgen Änderungsabgleich
|
Content changes keep the original mtime. Then follow the catch-up round and
|
||||||
und Finalisierung mit gestopptem Testschreiber. Ein Schreiber in einem anderen
|
the finalization with the test writer stopped. Meanwhile, a writer in another
|
||||||
Subvolume läuft währenddessen weiter und bestätigt seine Schreibvorgänge mit fsync.
|
subvolume keeps running and confirms its writes with fsync.
|
||||||
|
|
||||||
Nach der Migration liest ein separater Python-libcephfs-Client den aktuellen
|
After the migration, a separate Python libcephfs client reads the current
|
||||||
Zielstand und vier Ziel-Snapshots vollständig. Erwartete Inhalte und Metadaten
|
target state and four target snapshots in full. Expected contents and
|
||||||
werden aus dem Testmodell berechnet. SQLite prüft auf Platte die bijektive
|
metadata are computed from the test model. SQLite checks on disk that inodes
|
||||||
Zuordnung der Inodes zu Hardlink-Gruppen. Insgesamt sind 5.000.500 reguläre
|
map bijectively to hardlink groups. In total, 5,000,500 regular file paths
|
||||||
Dateipfade sowie Symlinks, Verzeichnisse, ACLs, xattrs, Quotas und Snapshot-
|
as well as symlinks, directories, ACLs, xattrs, quotas and snapshot user
|
||||||
Benutzermetadaten zu prüfen. Die Go-Migration prüft zusätzlich intern.
|
metadata are checked. The Go migration additionally verifies internally.
|
||||||
Ceph-interne Snapshot-IDs und ursprüngliche Erstellungszeitpunkte werden nicht
|
Ceph-internal snapshot IDs and original creation times are not preserved;
|
||||||
erhalten; diese bekannte Einschränkung bleibt bestehen.
|
this known limitation remains.
|
||||||
|
|
||||||
## Start und Fortschritt
|
## Start and progress
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make dev-million-start
|
make dev-million-start
|
||||||
@@ -66,35 +66,35 @@ make dev-million-status
|
|||||||
docker compose -p cephmig-million -f dev/compose.yaml -f dev/compose.million.yaml logs -f benchmark
|
docker compose -p cephmig-million -f dev/compose.yaml -f dev/compose.million.yaml logs -f benchmark
|
||||||
```
|
```
|
||||||
|
|
||||||
Das getrennte Compose-Projekt verwendet zwei dünn belegte 24-GiB-OSDs und
|
The separate Compose project uses two thinly provisioned 24 GiB OSDs and at
|
||||||
höchstens 10 GiB Container-RAM. Für den ersten Start sind 68 GiB freier
|
most 10 GiB of container RAM. The first start requires 68 GiB of free host
|
||||||
Hostspeicher vorgesehen: maximal 48 GiB OSDs plus 20 GiB Reserve. Die laufende
|
disk: at most 48 GiB for the OSDs plus a 20 GiB reserve. The running check
|
||||||
Prüfung stoppt weitere Schreibvorgänge bei weniger als 20 GiB Hostreserve,
|
stops further writes when less than 20 GiB of host reserve, 3 GiB of free
|
||||||
3 GiB freiem Host-RAM oder 3 GiB freiem Ceph-Speicher je Cluster.
|
host RAM or 3 GiB of free Ceph capacity per cluster remain. Images, existing
|
||||||
Images, bestehende Testcluster und deren Speicher kommen hinzu. Es werden keine
|
test clusters and their storage come on top. No kernel or FUSE mounts are
|
||||||
Kernel- oder FUSE-Mounts benötigt. Die Daemons laufen mit einem MDS-Cachelimit
|
needed. The daemons run with an MDS cache limit of 768 MiB each. The runtime
|
||||||
von jeweils 768 MiB. Die Laufzeit hängt stark vom Datenträger und den anderen
|
depends heavily on the disk and the other processes on the host.
|
||||||
Prozessen auf dem Host ab.
|
|
||||||
|
|
||||||
Der Treiber läuft als eigener Container weiter. Status, Protokolle, MDS-Zähler,
|
The driver keeps running as a container of its own. Status, logs, MDS
|
||||||
Laufzeiten und abgetasteter maximaler RSS des Go-Prozesses liegen unter
|
counters, durations and the sampled maximum RSS of the Go process are written
|
||||||
`.dev/million/main/`. Nur `result: PASS` bestätigt die vollständige Prüfung.
|
to `.dev/million/main/`. Only `result: PASS` confirms the complete check.
|
||||||
Erzeugung und abgeschlossene Prüfansichten haben Checkpoints; ein unterbrochener
|
Generation and completed verification views have checkpoints; an interrupted
|
||||||
Go-Abgleich verwendet das bestehende Migrationsjournal. Eine unterbrochene
|
Go round uses the existing migration journal. An interrupted phase does not
|
||||||
Phase zählt nicht als verwertbare Laufzeitmessung. Die Testerzeugung läuft mit
|
count as a usable runtime measurement. Test generation runs with eight
|
||||||
acht Threads, der Kopierer mit acht Workern, die unabhängige Prüfung mit 16 Threads.
|
threads, the copier with eight workers, the independent check with 16
|
||||||
Queues und Datenpuffer sind begrenzt; Index und Inode-Zuordnung liegen auf Platte.
|
threads. Queues and data buffers are bounded; index and inode mapping live on
|
||||||
|
disk.
|
||||||
|
|
||||||
## Bereinigung
|
## Cleanup
|
||||||
|
|
||||||
Nach erfolgreicher Prüfung Messwerte nach `docs/million-local.json` sichern
|
After a successful check, save the measurements to `docs/million-local.json`
|
||||||
und ausschließlich dieses Testprojekt entfernen. Der Befehl verweigert die
|
and remove only this test project. The command refuses to clean up without
|
||||||
Bereinigung ohne `PASS` und erfolgreichen Container-Exit:
|
`PASS` and a successful container exit:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make dev-million-finish
|
make dev-million-finish
|
||||||
```
|
```
|
||||||
|
|
||||||
Die Berichte auf dem Host bleiben erhalten. Das Projekt `cephmig-dev` ist separat.
|
The reports on the host are kept. The project `cephmig-dev` is separate. A
|
||||||
Ein lokaler Lauf ist kein Leistungsnachweis für 200 TB oder 200 Millionen Dateien.
|
local run is no performance proof for 200 TB or 200 million files. MDS
|
||||||
MDS-Anfragen sind keine Messung physischer Datenträger-IOPS.
|
requests are not a measurement of physical disk IOPS.
|
||||||
+89
-86
@@ -1,107 +1,110 @@
|
|||||||
# Direkter RADOS-Transfer eines einzelnen Subvolumes
|
# Direct RADOS transfer of a single subvolume
|
||||||
|
|
||||||
Geprüft am 05.11.2026 für die Anforderung: genau ein CephFS-Subvolume zwischen
|
Evaluated on 2026-11-05 against the requirement: migrate exactly one CephFS
|
||||||
unabhängigen Clustern migrieren, während andere Subvolumes weiterlaufen.
|
subvolume between independent clusters while other subvolumes keep running.
|
||||||
Native Snapshot-IDs und Geburtszeitpunkte dürfen dabei abweichen.
|
Native snapshot IDs and birth times may differ.
|
||||||
|
|
||||||
## Ergebnis
|
## Result
|
||||||
|
|
||||||
Ein roher Import von RADOS-Daten- und Metadatenobjekten ist unter diesen
|
Under these conditions, a raw import of RADOS data and metadata objects is
|
||||||
Bedingungen kein geprüfter Ersatz für den vorhandenen Transport. Der aktuelle
|
not a verified replacement for the existing transport. The code was
|
||||||
Code wurde deshalb nicht auf einen solchen Import umgestellt.
|
therefore not switched to such an import.
|
||||||
|
|
||||||
RADOS kann Objektinhalt, xattrs und OMAP lesen und schreiben. Damit ist jedoch
|
RADOS can read and write object contents, xattrs and OMAP. That alone does
|
||||||
noch kein separat einhängbares CephFS-Subvolume übertragen:
|
not transfer a separately mountable CephFS subvolume:
|
||||||
|
|
||||||
- Der MDS-Metadatenpool enthält die Hierarchie und dateisystemweite Zustände,
|
- The MDS metadata pool holds the hierarchy and file-system-wide state, such
|
||||||
etwa Journale, Inode-/Snapshot-Verwaltung und Clientsitzungen.
|
as journals, inode and snapshot management and client sessions.
|
||||||
- Ein Subvolume hat keinen unabhängigen MDS-Metadatenpool. Ein separater
|
- A subvolume has no metadata pool of its own. A separate data namespace
|
||||||
Daten-Namespace würde nur bei der Zuordnung von Datenobjekten helfen.
|
would only help to map data objects.
|
||||||
- Dateilayouts und Metadaten beziehen sich auf Inodes, Pools und Snapshots der
|
- File layouts and metadata refer to the inodes, pools and snapshots of the
|
||||||
Quelle. Sie dürfen nicht unverändert in ein laufendes, anders aufgebautes
|
source. They must not be imported unchanged into a running target file
|
||||||
Ziel-Dateisystem importiert werden.
|
system with a different structure.
|
||||||
- Der untersuchte RADOS-Pool-Export schreibt ausdrücklich nur HEAD-Objekte.
|
- The examined RADOS pool export explicitly writes only HEAD objects.
|
||||||
Historische RADOS-Snapshot-Versionen sind damit nicht als vollständige
|
Historical RADOS snapshot versions are therefore not migrated as a complete
|
||||||
CephFS-Snapshot-Historie migriert.
|
CephFS snapshot history.
|
||||||
- Die dokumentierte Pool-Migration beschreibt Migration zwischen Pools
|
- The documented pool migration covers migration between pools within the
|
||||||
innerhalb desselben Clusters. Sie ist keine Subvolume-Replikation zwischen
|
same cluster. It is not subvolume replication between independent
|
||||||
unabhängigen Clustern.
|
clusters.
|
||||||
|
|
||||||
Die Schlussfolgerung folgt aus diesen Verwaltungs- und Konsistenzabhängigkeiten:
|
The conclusion follows from these management and consistency dependencies:
|
||||||
Ein eigener Raw-Kopierer müsste zusätzlich eine konsistente Teilmenge der
|
a raw copier of its own would additionally have to export a consistent
|
||||||
CephFS-Metadaten exportieren, auf die Zielidentitäten abbilden und mit dessen
|
subset of the CephFS metadata, map it to the target identities and
|
||||||
laufendem MDS koordinieren. Ein gewöhnlicher Objektkopierer leistet das nicht.
|
coordinate with the target's running MDS. An ordinary object copier does not
|
||||||
Auch ein Objekttransfer muss die erforderlichen Nutzdaten zum Ziel bewegen.
|
do that. An object transfer, too, has to move the required payload to the
|
||||||
|
target.
|
||||||
|
|
||||||
## Geprüfte native Alternative
|
## Verified native alternative
|
||||||
|
|
||||||
Der Go-Transport `backend: native` verwendet libcephfs ohne rsync und ohne
|
The Go transport `backend: native` uses libcephfs without rsync and without a
|
||||||
Kernel-/FUSE-Mount. Metadatenoperationen erfolgen über den Ziel-MDS;
|
kernel or FUSE mount. Metadata operations go through the target MDS; data
|
||||||
Daten-I/O übernimmt der native Ceph-Client direkt gegen RADOS. Ein roher Import
|
I/O is handled by the native Ceph client directly against RADOS. A raw import
|
||||||
des gemeinsamen MDS-Metadatenpools ist weiterhin nicht Bestandteil der Migration.
|
of the shared MDS metadata pool remains outside the migration.
|
||||||
|
|
||||||
In der tatsächlich laufenden Bibliothek des Labors wurden folgende Symbole
|
The following symbols were checked in the library actually running in the
|
||||||
geprüft:
|
lab:
|
||||||
|
|
||||||
| Schnittstelle | Vorhanden |
|
| Interface | Present |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| ceph_open_snapdiff | ja |
|
| ceph_open_snapdiff | yes |
|
||||||
| ceph_open_snapdiff2 | nein |
|
| ceph_open_snapdiff2 | no |
|
||||||
| ceph_readdir_snapdiff2 | nein |
|
| ceph_readdir_snapdiff2 | no |
|
||||||
| ceph_file_blockdiff_init | ja |
|
| ceph_file_blockdiff_init | yes |
|
||||||
| ceph_file_blockdiff | ja |
|
| ceph_file_blockdiff | yes |
|
||||||
| ceph_file_blockdiff_finish | ja |
|
| ceph_file_blockdiff_finish | yes |
|
||||||
|
|
||||||
Die installierte Ceph-21.2.0-Konfiguration kennt
|
The installed Ceph 21.2.0 configuration knows
|
||||||
`cephfs_mirror_blockdiff_min_file_size` mit Standardwert 16 MiB.
|
`cephfs_mirror_blockdiff_min_file_size` with a default of 16 MiB.
|
||||||
|
|
||||||
Implementierter Ablauf:
|
Implemented workflow:
|
||||||
|
|
||||||
1. Initialer nativer Transfer des Snapshotstands.
|
1. Initial native transfer of the snapshot state.
|
||||||
2. Snapdiff zum Ermitteln geänderter Verzeichniseinträge.
|
2. Snapdiff to find changed directory entries.
|
||||||
3. Blockdiff für geeignete geänderte Dateien; notwendige Datenbereiche übertragen.
|
3. Blockdiff for suitable changed files; transfer of the required data
|
||||||
4. Hardlink-Zuordnungen, ACLs, xattrs, Quotas und Journal weiterhin explizit verwalten.
|
ranges.
|
||||||
5. Gezielte Verifikation der Änderungen und ein finaler Abgleich beim Schreibstopp.
|
4. Hardlink mappings, ACLs, xattrs, quotas and the journal are still managed
|
||||||
|
explicitly.
|
||||||
|
5. Targeted verification of the changes and a final round at the write stop.
|
||||||
|
|
||||||
Der Backendpfad liegt in `internal/migration/native_*.go`, die schmale CGO-Anbindung
|
The backend lives in `internal/migration/native_*.go`, the thin CGO binding
|
||||||
an öffentliche Ceph-Schnittstellen in `internal/cephfsnative`. Aktivierung:
|
to public Ceph interfaces in `internal/cephfsnative`. Activation:
|
||||||
`go build -tags ceph` mit CGO, C-Compiler und passenden libcephfs-Headern.
|
`go build -tags ceph` with CGO, a C compiler and matching libcephfs headers.
|
||||||
`make dev-native-test` baut diese Abhängigkeiten im Container und prüft den
|
`make dev-native-test` builds these dependencies in a container and checks
|
||||||
Transport zwischen den unabhängigen Laborclustern.
|
the transport between the independent lab clusters.
|
||||||
|
|
||||||
Snapdiff markiert geänderte Inodes; zusätzlich verhindert der Vergleich der
|
Snapdiff marks changed inodes; in addition, comparing the Ceph inode version
|
||||||
Ceph-Inode-Version, dass Datenänderungen mit gleicher Größe und mtime entgehen.
|
ensures that data changes with the same size and mtime are not missed.
|
||||||
Blockdiff wird ab 16 MiB verwendet, sofern eine bestätigte Basis mit passenden
|
Blockdiff is used from 16 MiB on, provided a confirmed base with matching
|
||||||
Quell-/Ziel-Inodes vorliegt. Bei nicht verfügbaren Diff-Schnittstellen wird
|
source and target inodes exists. If the diff interfaces are unavailable, the
|
||||||
nativ vollständig rekonstruiert. Es gibt keinen stillen rsync-Fallback.
|
state is reconstructed fully and natively. There is no silent rsync fallback.
|
||||||
|
|
||||||
Die Implementierung scannt derzeit trotzdem alle Metadaten und prüft die
|
The implementation nevertheless still scans all metadata and checks the full
|
||||||
Hardlink-Topologie jedes Standes vollständig. Snapdiff ersetzt diese Scans noch
|
hardlink topology of every state. Snapdiff does not yet replace these scans.
|
||||||
nicht. Datenprüfung liest beim ersten Stand alle Bytes, bei bestätigten
|
Data verification reads all bytes for the first state and only the copied
|
||||||
Folgeständen nur kopierte Bereiche. Unveränderte Bereiche werden aus der zuvor
|
ranges for confirmed later states. Unchanged ranges are taken from the
|
||||||
verifizierten Basis übernommen. Das Ziel muss exklusiv dem Migrationsjob gehören;
|
previously verified base. The target must belong exclusively to the
|
||||||
fremde Änderungen an unveränderten Bereichen werden damit nicht umfassend erkannt.
|
migration job; foreign changes to unchanged ranges are not fully detected
|
||||||
Ein Index auf lokalem Datenträger bindet die Basis an Cluster, Datenpfade und
|
this way.
|
||||||
Journal. Vor jeder Änderung wird ihre Gültigkeit im Journal entzogen. Ein Abbruch
|
An index on local disk binds the base to clusters, data paths and journal.
|
||||||
erzwingt im nächsten Prozess eine vollständige Rekonstruktion des offenen Standes.
|
Before every change its validity is withdrawn in the journal. An
|
||||||
|
interruption forces a full reconstruction of the open state in the next
|
||||||
|
process.
|
||||||
|
|
||||||
Ein Laufzeit- oder Durchsatznachweis für 200 TB / 200 Millionen Dateien fehlt.
|
Evidence of runtime or throughput for 200 TB / 200 million files is missing.
|
||||||
Auch nach einem Abbruch kann die vollständige Rekonstruktion entsprechend lange
|
After an interruption, too, the full reconstruction can take correspondingly
|
||||||
dauern. Die Zahl der durch die Anwendung geänderten Bytes ist keine feste
|
long. The number of bytes changed by the application is not a fixed upper
|
||||||
Obergrenze für die vom OSD gemeldeten geänderten Bereiche.
|
bound for the changed ranges reported by the OSD.
|
||||||
|
|
||||||
Das fertige cephfs-mirror verwendet native Replikation, unterstützt laut
|
The ready-made cephfs-mirror uses native replication but, according to its
|
||||||
Dokumentation aber keine Erhaltung gemeinsamer Hardlink-Inodes. Es würde
|
documentation, does not preserve shared hardlink inodes. It would synchronize
|
||||||
Hardlink-Dateien als getrennte Dateien synchronisieren. Deshalb wäre ein
|
hardlinked files as separate files. An unverified switch to cephfs-mirror
|
||||||
ungeprüfter Wechsel auf cephfs-mirror kein Ersatz für die vereinbarten
|
would therefore not satisfy the agreed link requirements.
|
||||||
Link-Anforderungen.
|
|
||||||
|
|
||||||
## Primärquellen
|
## Primary sources
|
||||||
|
|
||||||
- [MDS-Metadatenpool und Journale](https://docs.ceph.com/en/latest/cephfs/mds-journaling/)
|
|
||||||
- [CephFS-Architektur und direkter RADOS-Datenzugriff](https://docs.ceph.com/en/latest/cephfs/index.html)
|
|
||||||
- [PoolDump: Export nur des HEAD-Zustands](https://github.com/ceph/ceph/blob/main/src/tools/rados/PoolDump.cc)
|
|
||||||
- [Pool-Migration innerhalb desselben Clusters](https://docs.ceph.com/en/latest/dev/pool-migration-design/)
|
|
||||||
- [libcephfs: Snapdiff und Blockdiff](https://github.com/ceph/ceph/blob/main/src/include/cephfs/libcephfs.h)
|
|
||||||
- [CephFS-Mirroring: Blockdiff und Hardlink-Grenzen](https://docs.ceph.com/en/latest/cephfs/cephfs-mirroring/)
|
|
||||||
|
|
||||||
|
- [MDS metadata pool and journals](https://docs.ceph.com/en/latest/cephfs/mds-journaling/)
|
||||||
|
- [CephFS architecture and direct RADOS data access](https://docs.ceph.com/en/latest/cephfs/index.html)
|
||||||
|
- [PoolDump: export of the HEAD state only](https://github.com/ceph/ceph/blob/main/src/tools/rados/PoolDump.cc)
|
||||||
|
- [Pool migration within the same cluster](https://docs.ceph.com/en/latest/dev/pool-migration-design/)
|
||||||
|
- [libcephfs: snapdiff and blockdiff](https://github.com/ceph/ceph/blob/main/src/include/cephfs/libcephfs.h)
|
||||||
|
- [CephFS mirroring: blockdiff and hardlink limits](https://docs.ceph.com/en/latest/cephfs/cephfs-mirroring/)
|
||||||
+29
-29
@@ -1,53 +1,53 @@
|
|||||||
# Lokaler Test mit vielen kleinen Dateien
|
# Local test with many small files
|
||||||
|
|
||||||
Gemessen am 05./06.11.2026 mit Ceph 21.2.0. Zwei unabhängige Laborcluster, je ein MON/MGR/MDS und ein dateibasierter 4-GiB-BlueStore-OSD auf demselben Host; vier Kopier-Worker.
|
Measured on 2026-11-05/06 with Ceph 21.2.0. Two independent lab clusters, each with one MON/MGR/MDS and one file-backed 4 GiB BlueStore OSD on the same host; four copy workers.
|
||||||
|
|
||||||
Jede Datei enthält 128 Byte deterministische, nicht ausschließlich nullwertige Daten. Eine Hälfte liegt in einem großen Verzeichnis, die andere verteilt auf 50 Verzeichnisse. Zusätzlich: 100 Hardlink-Namen und 100 Symlinks. Änderungen: jeweils 1 % Inhalt, Löschungen, Umbenennungen, neue Dateien, Modus/xattr-Änderungen und xattr-Löschungen. Die 2.000-Dateien-Läufe enthalten außerdem numerische Besitzer und Zugriffs-/Default-ACLs.
|
Each file contains 128 bytes of deterministic data that is not all zeros. Half of the files are in one large directory, the other half spread over 50 directories. In addition: 100 hardlink names and 100 symlinks. Changes: 1 % each of contents, deletions, renames, new files, mode/xattr changes and xattr removals. The 2,000-file runs also contain numeric owners and access/default ACLs.
|
||||||
|
|
||||||
## Vergleich mit 2.000 Dateien
|
## Comparison with 2,000 files
|
||||||
|
|
||||||
| Phase | Vorher | Nachher | MDS-Anfragen vorher | MDS-Anfragen nachher |
|
| Phase | Before | After | MDS requests before | MDS requests after |
|
||||||
|---|---:|---:|---:|---:|
|
|---|---:|---:|---:|---:|
|
||||||
| Erstlauf, zwei Stände | 490.2 s | 55.2 s | 115.132 | 87.437 |
|
| Initial run, two states | 490.2 s | 55.2 s | 115,132 | 87,437 |
|
||||||
| Änderungsabgleich | 52.2 s | 21.2 s | 52.677 | 38.911 |
|
| Catch-up round | 52.2 s | 21.2 s | 52,677 | 38,911 |
|
||||||
| Finaler Abgleich | 30.1 s | 24.1 s | 59.350 | 41.074 |
|
| Final round | 30.1 s | 24.1 s | 59,350 | 41,074 |
|
||||||
|
|
||||||
Im finalen Lauf: 30.8 % weniger MDS-Anfragen, 20.0 % kürzere Laufzeit. In beiden Varianten wurden dabei 0 Nutzdatenbytes geschrieben. Der Änderungsabgleich schrieb in beiden Varianten 12.928 Byte für 101 Dateien.
|
In the final run: 30.8 % fewer MDS requests, 20.0 % shorter runtime. Both variants wrote 0 payload bytes there. The catch-up round wrote 12,928 bytes for 101 files in both variants.
|
||||||
|
|
||||||
Gemessener maximaler Prozess-RSS über die Phasen: vorher 93.7 MiB, nachher 76.4 MiB. Ceph-Daemons, CLI-Kinder und Anwendungsclient sind darin nicht enthalten.
|
Measured maximum process RSS across the phases: 93.7 MiB before, 76.4 MiB after. Ceph daemons, CLI children and the application client are not included.
|
||||||
|
|
||||||
Die alte Version zeigte beim Erstlauf MDS-Lesesperren-Wartezeiten. Andere Vorläufe lagen dort bei etwa 99 s. Die große Differenz des Erstlaufs ist deshalb kein allgemeines Beschleunigungsversprechen. Der über Nacht unterbrochene Vergleich sowie dessen Wiederanlauf sind nicht als Vergleichsmessung enthalten.
|
The old version showed MDS read lock waits in the initial run. Other earlier runs took about 99 s there. The large difference in the initial run is therefore no general promise of a speedup. The comparison interrupted overnight and its restart are not included as a comparison measurement.
|
||||||
|
|
||||||
## Abgeschlossener Test mit 10.000 Dateien, vor Optimierung
|
## Completed test with 10,000 files, before optimization
|
||||||
|
|
||||||
| Phase | Dauer | Geschriebene Nutzdaten |
|
| Phase | Duration | Payload written |
|
||||||
|---|---:|---:|
|
|---|---:|---:|
|
||||||
| Erstlauf, zwei Stände | 554.4 s | 1.280.000 Byte |
|
| Initial run, two states | 554.4 s | 1,280,000 bytes |
|
||||||
| Änderungsabgleich | 459.3 s | 64.128 Byte |
|
| Catch-up round | 459.3 s | 64,128 bytes |
|
||||||
| Finaler Abgleich | 84.1 s | 0 Byte |
|
| Final round | 84.1 s | 0 bytes |
|
||||||
|
|
||||||
Der unabhängige Anwendungsclient verglich live und in vier historischen Ständen insgesamt 50.500 reguläre Dateipfade einschließlich Hardlinks, zusätzlich Symlinks und Metadaten. Alle Prüfungen waren erfolgreich. Diese zusätzliche Testprüfung dauert 600,7 s und gehört nicht zur gemessenen Dauer von `finalize`. Remount und Anwendungsneustart sind ebenfalls nicht enthalten.
|
The independent application client compared a total of 50,500 regular file paths including hardlinks, live and in four historical states, plus symlinks and metadata. All checks passed. This additional test check takes 600.7 s and is not part of the measured duration of `finalize`. Remount and application restart are not included either.
|
||||||
|
|
||||||
Der Kopierer erreichte 135.4 MiB Prozess-RSS. Journal und Index belegten am Ende 1.59 MiB. Ceph meldete vor der Bereinigung etwa 271.2 MiB zusätzliche Rohbelegung an der Quelle und 726.6 MiB am Ziel. Diese Werte enthalten auch internen Verwaltungsaufwand, Journal- und BlueFS/RocksDB-Wachstum.
|
The copier reached 135.4 MiB process RSS. Journal and index took 1.59 MiB at the end. Before the cleanup, Ceph reported about 271.2 MiB of additional raw usage at the source and 726.6 MiB at the target. These values also include internal overhead and journal and BlueFS/RocksDB growth.
|
||||||
|
|
||||||
## Umgesetzte Änderungen
|
## Implemented changes
|
||||||
|
|
||||||
- Vollständiges lokales Pfadinventar des unveränderlichen Quellsnapshots für Aufräumen und Überhangprüfung; erneute Quell-`stat`-Abfragen je Zielpfad entfallen. Unvollständige Inventare verhindern das Aufräumen.
|
- A complete local path inventory of the immutable source snapshot for pruning and the check for surplus paths; repeated source `stat` calls per target path are gone. Incomplete inventories prevent pruning.
|
||||||
- Keine erneuten Index-Schreibtransaktionen für identische Inode-Zeilen.
|
- No repeated index write transactions for identical inode rows.
|
||||||
- Keine erneuten `setattr`-Aufrufe für bereits gleiche Besitzer, Rechte und mtime; Zielstatistik wird bei der Prüfung wiederverwendet.
|
- No repeated `setattr` calls for already identical owner, mode and mtime; the target stat is reused during verification.
|
||||||
- Datenpuffer passend zur Dateigröße bzw. Prüflänge, höchstens 4 MiB je Puffer.
|
- Data buffers sized to the file size or verification length, at most 4 MiB per buffer.
|
||||||
- `AT_STATX_DONT_SYNC` nur für unveränderliche Snapshotpfade; Live-Zielpfade behalten normale Synchronisationssemantik. Cephs eigener [Mirror verwendet denselben Snapshot-Zugriff](https://github.com/ceph/ceph/blob/main/src/tools/cephfs_mirror/PeerReplayer.cc).
|
- `AT_STATX_DONT_SYNC` only for immutable snapshot paths; live target paths keep normal synchronization semantics. Ceph's own [mirror uses the same snapshot access](https://github.com/ceph/ceph/blob/main/src/tools/cephfs_mirror/PeerReplayer.cc).
|
||||||
|
|
||||||
## Grenzen und Reproduktion
|
## Limits and reproduction
|
||||||
|
|
||||||
MDS-Anfragen sind keine physisch gemessenen Datenträger-IOPS. Die Läufe sind einzelne Messungen auf einem gemeinsam genutzten Host, ohne zugesicherte Cache-Bedingungen. Es bleiben vollständige Metadatendurchläufe; für 200 Millionen Dateien ist weiterhin ein Änderungsplan nötig, der unveränderte Teilbäume überspringt. Die Ergebnisse sind keine Freigabe für diese Größenordnung.
|
MDS requests are not physically measured disk IOPS. The runs are single measurements on a shared host, without guaranteed cache conditions. Full metadata passes remain; 200 million files still need change planning that skips unchanged subtrees. The results are no release for that scale.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make dev-smallfiles-test
|
make dev-smallfiles-test
|
||||||
# kleinerer Test mit MDS-Zählern:
|
# smaller test with MDS counters:
|
||||||
FILES=2000 REPORT_DIR=/tmp/cephmig-smallfiles-report make dev-smallfiles-test
|
FILES=2000 REPORT_DIR=/tmp/cephmig-smallfiles-report make dev-smallfiles-test
|
||||||
```
|
```
|
||||||
|
|
||||||
Die Testprogramme bereinigen bei Erfolg ihre eigenen Subvolumes, Snapshots, Claims und lokalen Zustandsdateien. Ceph kann freigewordenen Platz verzögert zurückmelden. Rohdaten, Binär-Hashes und Details stehen in [smallfiles-local.json](smallfiles-local.json).
|
On success, the test programs remove their own subvolumes, snapshots, claims and local state files. Ceph may report freed space with a delay. Raw data, binary hashes and details are in [smallfiles-local.json](smallfiles-local.json).
|
||||||
|
|
||||||
Zusätzlich bestanden die Go-Tests mit Race Detector und `go vet` für den nativen Build sowie der vollständige native Funktionstest mit großen/Sparse-Dateien, Blockdiff, historischen Snapshots, ACLs, Quotas, Hardlinks auf Symlinks/FIFOs, Abbruch und SIGKILL-Wiederaufnahme. Die erfolgreichen Test-Fixtures wurden entfernt.
|
In addition, the Go tests with the race detector and `go vet` for the native build passed, as did the complete native functional test with large/sparse files, blockdiff, historical snapshots, ACLs, quotas, hardlinks to symlinks/FIFOs, cancellation and SIGKILL resume. The fixtures of the successful run were removed.
|
||||||
Reference in new issue
Block a user