CephVI · Ceph ArchitectureCeph Architecture
Ceph architecture overview — the path a write takes
What you'll learn
- Trace a write from application to disk through every Ceph layer
- Identify which component is authoritative at each step
- Explain why there is no metadata server in the RADOS data path
- Use the write path to localise a performance or availability problem
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
Why this matters in production
Almost every Ceph troubleshooting question reduces to “which step in the write path is slow or broken?” Learning the path once makes the rest of the course — and most incidents — a matter of localisation rather than guesswork.
The path
flowchart TD
A[Application: fsync on a file] --> B[Guest filesystem]
B --> C[librbd: image → RADOS objects]
C --> D[librados: get cluster map from MON]
D --> E[CRUSH: object name → PG → acting set]
E --> F[Primary OSD]
F --> G[Replica OSDs]
F --> H[BlueStore: RocksDB metadata + raw block data]
G --> I[BlueStore on each replica]
I --> F
H --> F
F --> C
C --> A
Step by step:
- Application writes and calls fsync. The guest filesystem converts that into block writes at specific offsets.
- librbd maps the image to objects. An RBD image is a sequence of
RADOS objects, 4 MiB by default. A write at offset 9 MiB lands in
object
rbd_data.<id>.0000000000000002. - librados needs a cluster map. It fetches it from a monitor once and caches it, refreshing when an OSD tells it the epoch is stale.
- CRUSH computes placement. The object name is hashed to a PG id; CRUSH maps the PG to an ordered list of OSDs. First in the list is the primary.
- The client sends to the primary only. Never to replicas.
- The primary replicates and waits. It forwards to the other OSDs in the acting set and waits for them to commit.
- Each OSD commits through BlueStore, writing metadata to RocksDB and data to the raw block device.
- The primary acknowledges once the acting set has committed.
Which component is authoritative where
| Step | Authority | Failure symptom |
|---|---|---|
| cluster map | monitors | client cannot start, or hangs on connect |
| placement | CRUSH, deterministic | undersized or misplaced PGs |
| object data | primary OSD of the acting set | slow ops, blocked requests |
| durability | acting set commits | write blocks below min_size |
| on-disk layout | BlueStore | OSD crash, scrub errors |
Reading a symptom against this table is usually enough to decide where to look next.
Using the path to localise
A worked example. Writes to one RBD image are slow; others are fine.
- Which objects?
rbd infogives the image prefix. - Which PGs and OSDs?
ceph osd map <pool> <object>for several objects from the image. - Are those OSDs outliers?
ceph osd perf. - Is one of them on a device with problems?
smartctl,ceph device get-health-metrics.
Four commands, following the path downwards, each one narrowing the search. That method generalises to nearly every Ceph problem, and it is the reason this lesson comes before the troubleshooting parts rather than after them.
Quiz
Knowledge check · 4 questions
Q1. A Ceph client needs to write an object. Which component tells it which OSD to send the write to?
Q2. The primary OSD acknowledges a write once a majority of the acting set has committed.
Q3. One RBD image has poor write latency while every other image in the same pool is fine. Localise the fault using the write path.
Pool rbd-vms, size 3, 120 OSDs. One VM reports write latency of 40 ms where its peers see 3 ms. Cluster health is OK. Aggregate pool throughput is normal. The VM has not changed and its guest shows no unusual I/O pattern.
Q4. Trace the layers a 4 KiB application write passes through on its way to disk in a Ceph RBD cluster.
Passing score: 75%. Answers are checked in this browser.
Production discipline
Learn the path once and use it as the diagnostic spine: symptom, then
which layer owns that behaviour, then the command that inspects that
layer. ceph osd map is the entry point for any object-level question
precisely because placement is computed rather than recorded. And
remember that the primary waits for the entire acting set, so client
latency is set by its slowest member — which makes outlier hunting,
not aggregate throughput, the correct first measurement.
Cross-course references
- Ceph: Part VII (RADOS) for objects, pools, and placement in depth.
- Ceph: Part XII (BlueStore) for the bottom of the path.
- Ceph: Part LXVII (Performance Methodology) for the full localisation method.