Skip to main content
RunBook Academy

CephCXX · Multi-Site ConceptsMulti-Site Concepts

What a replicated copy is consistent with

Advanced⏱ ~18 minrbdradosgw-admin

What you'll learn

  • Classify the consistency each mechanism delivers
  • Identify where a replica is safe to mount and where it is not
  • Recognise the multi-image consistency gap
  • Order writes so a partial replica remains usable

Prerequisites

None — start here.

Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18

Not yet marked complete on this device.

Why this matters in production

A replica that is behind is usable; a replica that is inconsistent is not, and the two are indistinguishable from a status command.

The four consistency levels

LevelMeaningRecoverable by
Application-consistentthe application flushed and quiesced firstnothing; just start it
Crash-consistentas if power was cut at one instantjournal replay or fsck
Snapshot-boundary consistentcrash-consistent only at completed snapshotsrolling back to the snapshot
Eventually consistenteach item arrives independently, unorderednothing — there is no instant to roll to

What each mechanism delivers

MechanismLevelThe instant it represents
RBD journal-basedcrash-consistent, continuouslyprimary state minus the unreplayed entries
RBD snapshot-basedsnapshot-boundarythe last completed mirror snapshot
CephFS snapshot mirroringsnapshot-boundary, per directory treethe last snapshot that finished syncing
RGW multi-siteeventual, per objectno single instant across objects
# journal mode replays in order, so the replica is always crash-consistent
rbd mirror image status rbd/vm-101-disk-0 | grep -E 'state|description'
# snapshot mode is consistent only at a completed mirror snapshot
rbd mirror image snapshot rbd/vm-204-disk-0
rbd snap ls rbd/vm-204-disk-0 --all
Promotion in snapshot mode rolls the non-primary image to the last
complete mirror snapshot. Data written after it is discarded, which is
what makes the promoted image mountable rather than half-written.

The multi-image gap

# a group gives one consistent instant across several images, locally
rbd group create rbd/db-cluster
rbd group image add rbd/db-cluster rbd/db-data
rbd group image add rbd/db-cluster rbd/db-log
rbd group snap create rbd/db-cluster@pre-change
rbd group snap ls rbd/db-cluster
Mirroring is configured per image and each image takes its own mirror
snapshots on its own schedule. Two images mirrored from the same cluster
can therefore be promoted to two different instants — a database whose
data and log volumes are separate images has no guaranteed common
recovery point at the peer.
LayoutCommon recovery point at the peer
One image per workloadyes, by construction
Data and log on separate imagesno
LVM spanning several mirrored imagesno — and the result is unmountable
Filesystem in RGW plus disks in RBDno

Ordering writes so a partial replica is usable

Write the referenced object before the reference. An index entry
pointing at missing content is a detectable error; content with no index
entry is merely orphaned.
radosgw-admin bucket sync status --bucket=acme-index
radosgw-admin bucket sync status --bucket=acme-content
# verify at the peer before trusting it: promote a clone, not the image
rbd snap create rbd/vm-204-disk-0@verify
rbd clone rbd/vm-204-disk-0@verify rbd/vm-204-verify

Quiz

Knowledge check · 4 questions

  1. Q1. Why is a promoted snapshot-based mirror image mountable rather than half-written?

  2. Q2. Two RBD images mirrored from the same cluster can be promoted to two different points in time.

  3. Q3. Assess whether a mirrored database can be brought up at the peer.

    A database VM has its data files on rbd/db-data and its write-ahead log on rbd/db-log. Both are mirrored in snapshot mode on a 15-minute schedule. The primary site has been lost.

  4. Q4. Why does an eventually consistent object replica have no point-in-time to roll back to?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Record what instant each replicated unit represents before promoting anything — a status of healthy says nothing about whether two images share a recovery point. Where a workload spans volumes, put it on one image or accept that the peer copy requires application-level repair, and decide which before the event rather than during it.

Cross-course references

  • Kubernetes: a restored PVC and a restored ConfigMap are not from the same instant either
  • Linux: crash consistency is a property of an ordered write stream, not of a healthy link