Pcornel
Storage · Ceph

CRUSH

Cheat sheet · https://pcornel.dk/topic.php?topic=402

Back to the Topic

Answer

CRUSH is how Ceph decides which OSDs hold each placement group. It uses a map of the physical layout — disks in hosts, hosts in racks — and rules that spread copies over different failure domains.

Remember

The failure domain in the rule (host by default) decides what you can lose. With fewer failure domains than copies, placement groups stay undersized. Any change to weights, hierarchy or rules moves data. Placement is calculated, not looked up.

First checks

  • ceph osd crush tree --show-shadow — hierarchy with device classes
  • ceph osd crush rule dump — rules
  • ceph osd pool get <pool> crush_rule — rule per pool

Commands

ceph osd crush tree
CRUSH hierarchy and weights.
ceph osd map <pool> <object>
ceph osd df

Verify in this order

PG id → CRUSH rule → buckets (root/rack/host) → OSDs

Where it usually breaks

First mismatch in member media → metadata/layout → allocation/placement → redundancy/recovery → logical object → consumer; preserve identity/pre-state before mutation.

Ceph → CRUSH Ceph map

Ceph boundaryWhat to verifyProof limit
Control / placementMON/map/auth, pool, PG and CRUSH context for the exact workloadCluster visibility or one healthy daemon does not prove the data path
Data / redundancyActing OSD set, device/network state, capacity and replica/EC availabilityUp/in or active state alone does not prove clean redundancy or integrity
Failure boundaryA valid CRUSH map proves configured placement intent; it does not prove topology accuracy, current OSD availability or sufficient spare capacity for recovery.Correlate Ceph, host, device and network evidence in the same time window
AcceptanceHealthy evidence: CRUSH rule matches pool intent, hierarchy matches real topology and PG replicas/shards distribute across intended failure domains.Close only after original client operation plus redundancy/read-back verification

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=402

Confirmation

Confirm action

Continue?