Ceph architecture: MON, OSD, MGR and how CRUSH places data

  1. Introduction
  2. RADOS: the foundation of everything
  3. The main daemons
  4. MON (Monitor)
  5. OSD (Object Storage Daemon)
  6. MGR (Manager)
  7. MDS (Metadata Server)
  8. Pools and placement groups
  9. CRUSH: computing where data goes
  10. The CRUSH tree, buckets and failure domains
  11. Rules and device classes
  12. Example: writing an object
  13. Summary
  14. References

Introduction

Ceph is an open-source distributed storage system: many servers pool their disks into one shared store, and data is replicated or erasure-coded so that it survives the loss of a disk, or even a whole machine.

This article explains the main components and how Ceph decides "where does the data live".

If you are not yet comfortable with object-based storage, read Objects, buckets and keys in object storage: how they differ from files and folders first.

About versions: according to the release page of the Ceph documentation, as of November 2026 three releases are supported: Umbrella (21.2.0), Tentacle (20.2.5) and Squid (19.2.7, expected end of support on 2 December 2026).

The concepts in this article are stable across these releases, but detailed commands should be checked against the documentation for the exact release you run.

RADOS: the foundation of everything

The Ceph documentation calls RADOS the object store underneath every Ceph service. The three services you will hear about most all talk to RADOS through the librados library:

So understanding RADOS means understanding most of Ceph. The next article in the series goes deeper into these three doors.

The main daemons

A Ceph cluster is a set of processes (daemons) running on many machines:

MON (Monitor)

The MON keeps the "cluster map": the list of MONs, OSDs, pools, placement rules and the current state.

The MONs vote to agree on the map, so the cluster works only while a majority of MONs can talk to each other; that majority group is called the quorum.

Because a majority is needed, an odd number of MONs is usually run: with three MONs the cluster tolerates the loss of one; with two MONs, losing one loses the majority.

OSD (Object Storage Daemon)

Usually each data disk has one OSD in charge of it. The OSD stores objects, replicates them to other OSDs, sends heartbeats, and takes part in recovery and rebalancing when the cluster changes.

The Ceph documentation notes that a machine hosting OSDs needs enough CPU, RAM and network, because these background jobs cost resources and are not just "reading and writing disks".

MGR (Manager)

The MGR collects operational metrics and runs extension modules, for example the prometheus module that exports metrics to a monitoring system (see Alerting with Prometheus and Alertmanager: how metrics differ from logs).

Unlike the MON, the MGR does not decide where data goes; it is the observation and management layer.

MDS (Metadata Server)

Needed only for CephFS: the MDS manages the metadata of the directory tree (names, permissions, structure). RBD and RGW do not use an MDS.

Pools and placement groups

Data in RADOS is divided into pools, logical "compartments" with their own policy (number of copies, placement rule, the application that uses it).

Each pool is in turn divided into many placement groups (PGs).

According to the documentation, each object belongs to exactly one PG and each PG belongs to exactly one pool; Ceph manages data at the PG level rather than per object, which is why a cluster with millions of objects remains manageable.

The number of PGs of a pool (pg_num) can be set by an autoscaler based on actual usage. Each pool has a pg_autoscale_mode of off, on or warn.

For data safety, the documentation says that by default Ceph keeps three copies of the data in a replicated pool.

A pool can also use erasure coding with K data chunks and M coding chunks, which uses less capacity than replication but is more complex to operate.

CRUSH: computing where data goes

The key question of every distributed store: how do you know which machine an object is on? Many systems use a central lookup table, and that table easily becomes a bottleneck.

Ceph uses CRUSH, a computed algorithm. According to the documentation, the client calculates the object's location itself and talks to the OSDs directly, so no broker is needed in between.

Simplified flow: the object name is hashed to pick a PG; CRUSH takes that PG together with the cluster map and the rules, and returns the list of OSDs responsible for the PG.

Anyone with the same map computes the same result.

The CRUSH tree, buckets and failure domains

The CRUSH map describes the cluster as a tree: the leaves are OSDs (such as osd.0), the inner nodes are buckets with types such as host, rack, row, datacenter, and the top is the root (usually named default).

Each device has a weight that reflects its capacity, usually in TiB, and weights add up to the parent buckets: the bigger the disk, the more data it receives.

The failure domain decides how far apart the copies must be kept. With a host failure domain, three copies sit on three different machines; with rack, they sit in three different racks.

Choosing the failure domain sensibly is an important planning decision, especially for large clusters.

Rules and device classes

A CRUSH rule says "start from which root, separate by which failure domain, use only which kind of device".

OSDs set their device class (hdd, ssd, nvme) automatically at startup, so you can quickly create a pool that uses only SSDs:

# view the OSD tree and weights
ceph osd tree

# create a replicated rule: root default, failure domain host, class ssd only
ceph osd crush rule create-replicated fast-rule default host ssd

# assign the rule to a pool
ceph osd pool set mypool crush_rule fast-rule

Note: changing the crush_rule of a pool that already holds data makes Ceph move data, and disk and network load rise noticeably while it does.

Do it outside peak hours and follow progress with ceph -s.

Example: writing an object

  1. The client asks a MON for the cluster map (once, then updates when the map changes).

  2. The client hashes the object name to a PG and uses CRUSH to find the primary OSD and the secondary OSDs.

  3. The client sends the data straight to the primary OSD.

  1. The primary OSD forwards copies to the secondary OSDs, then acknowledges once the pool's requirements are met.

Because clients can compute locations, adding an OSD or a machine does not create a huge lookup table that must be updated; Ceph only needs to rebalance the affected PGs.

Summary

This article only explains concepts; for a real deployment, check the documentation for the exact Ceph release you use.

References

Ceph architecture: MON, OSD, MGR and how CRUSH places data