Placement Groups
Cheat sheet · https://pcornel.dk/topic.php?topic=4042
Answer
An object hashes into one PG; CRUSH maps that PG to an acting set of OSDs. PG peering determines authoritative history and active state, while recovery/backfill restores intended redundancy when mappings or availability change.
Remember
- PG ≠ pool.
- PG count ≠ replica count.
- PG active ≠ PG clean.
- One PG state ≠ whole-cluster state.
First checks
ceph pg stat— PG summaryceph osd pool autoscale-status— recommended pg_numceph pg dump pgs_brief | head— PG to OSD mapping
Commands
ceph pg dump pgs_brief- Per-PG brief state/up/acting mapping.
ceph pg <pgid> query- Detailed state/history for one PG.
ceph pg stat- Compact placement-group state summary.
ceph osd dfceph -s
Verify in this order
object hash → PG → acting set
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 → Placement Groups 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 | PG state proves distributed state for that placement group at that time; it does not prove every object/application or unrelated PG is healthy. | Correlate Ceph, host, device and network evidence in the same time window |
| Acceptance | Healthy evidence: required PGs are active with intended clean/redundant state and acting sets align with CRUSH policy. | 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=4042