CRUSH
Cheat sheet · https://pcornel.dk/topic.php?topic=402
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 classesceph osd crush rule dump— rulesceph 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 boundary | What to verify | Proof limit |
|---|---|---|
| Control / placement | MON/map/auth, pool, PG and CRUSH context for the exact workload | Cluster visibility or one healthy daemon does not prove the data path |
| Data / redundancy | Acting OSD set, device/network state, capacity and replica/EC availability | Up/in or active state alone does not prove clean redundancy or integrity |
| Failure boundary | A 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 |
| Acceptance | Healthy 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