Use it when configuring, checking or troubleshooting Placement Groups in Ceph.
Placement Groups
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.
1. PGs group objects for placement and recovery.
2. Each PG maps to an acting set of OSDs.
3. Use the autoscaler for pg_num.
4. Roughly 100 PGs per OSD target.
5. Changing pg_num moves data.
object hash → PG → acting set
Context & applicabilityCommon mistakes · platform/version boundaries
PG state shows distributed state for that placement group at that time, but it does not show every object/application or unrelated PG is healthy.
Suspicious evidence: stuck peering/inactive, undersized/degraded, stale, inconsistent, remapped without progress or PG concentration on constrained OSDs.
Operational reference
Fast context before you go deeper.
ceph pg dump pgs_briefPrimary Commands
Configuration and operational commands for this Topic.
ceph pg dump pgs_briefVerifyPer-PG brief state/up/acting mapping.
Use when: Use after confirming the Ceph target and before changing state.
Quick note: Ceph / ZFS / LVM / Linux filesystems and backup systems. A healthy summary can hide a failed component, weak failure-domain placement, latent corruption or an untested recovery path.
Ceph · mixedceph pg <pgid> queryReferenceDetailed state/history for one PG.
Use when: Use after confirming the Ceph target and before changing state.
Quick note: Ceph / ZFS / LVM / Linux filesystems and backup systems. A healthy summary can hide a failed component, weak failure-domain placement, latent corruption or an untested recovery path.
Ceph · mixedceph pg statVerifyCompact placement-group state summary.
Use when: Use after confirming the Ceph target and before changing state.
Quick note: Ceph / ZFS / LVM / Linux filesystems and backup systems. A healthy summary can hide a failed component, weak failure-domain placement, latent corruption or an untested recovery path.
Ceph · mixedVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
object → pool → hash to PG → PG peering/acting set → CRUSH-selected OSDs → object shards/replicas
Healthy evidence: required PGs are active with intended clean/redundant state and acting sets align with CRUSH policy.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- PG ≠ pool.
- PG count ≠ replica count.
- PG active ≠ PG clean.
- One PG state ≠ whole-cluster state.
ceph pg stat— PG summaryceph osd pool autoscale-status— recommended pg_numceph pg dump pgs_brief | head— PG to OSD mapping
ReferenceWhat it is1 section · depth on demand
Core Ceph model
- PG ≠ pool.
- PG count ≠ replica count.
- PG active ≠ PG clean.
- One PG state ≠ whole-cluster state.
Operational checks for Placement Groups — Core Ceph model: Anchor stable filesystem/volume/LUN/share/device identities across host, path/fabric, controller/pool and media so retries or multipath do not hide the failed leg.
ReferenceImportant terms & boundaries3 sections · depth on demand
Placement and what the checks show
PG state shows distributed state for that placement group at that time, but it does not show every object/application or unrelated PG is healthy.
Placement Groups owns PG mapping/state mechanics; PG States owns state interpretation; Recovery/Backfill/Scrub own transition mechanisms.
In depth
PGs are the unit Ceph places, peers and recovers
Objects are hashed into placement groups (PGs). CRUSH maps each PG to a set of OSDs. Too few PGs spread data unevenly. Too many cost memory and peering work.
Let the autoscaler do the arithmetic
The Ceph placement-group documentation describes pg_autoscale_mode per pool (on, warn, off) and the status command:
# ceph osd pool autoscale-status
POOL SIZE TARGET SIZE RATE RAW CAPACITY RATIO TARGET RATIO BIAS PG_NUM NEW PG_NUM AUTOSCALE
rbd 12T 3.0 96T 0.3750 1.0 256 512 on
cephfs 1.2T 3.0 96T 0.0375 1.0 64 on
# ceph osd pool set rbd target_size_ratio 0.6
| Setting | Documented meaning |
|---|---|
target_size_ratio / target_size_bytes | Expected pool size, so PGs are created before the data arrives |
mon_target_pg_per_osd | Target PG replicas per OSD. The default is 100, and 200 is recommended for most deployments. Values above 500 cause excessive peering and RAM use |
pg_num | Should be a power of two per pool, because other values distribute data unevenly |
Common issues
| Symptom | Cause |
|---|---|
| Very uneven OSD usage | Too few PGs in a large pool; check ceph osd df variance |
autoscale-status prints nothing | A pool spans several CRUSH roots |
| PG count jumps after data growth | Autoscaler reacting late; set a target ratio up front |
| Health warning about overcommit | Target ratios or sizes larger than capacity |
PG splits and merges move data. Make large changes outside peak hours and watch ceph -s.
Illustrative example (not a system capture).
Worked example
Placement groups (PGs) are buckets that objects are hashed into; CRUSH maps each PG to a set of OSDs. PGs let Ceph track and recover data in units much smaller than whole pools.
Rule of thumb: aim for about 100 PGs per OSD in total across pools (counting replicas), rounded to a power of two per pool. Example: 30 OSDs, one main pool with size 3 → 30 × 100 ÷ 3 = 1000 → 1024 PGs.
ceph osd pool get vm-pool pg_num
ceph pg ls-by-pool vm-pool | head
ceph osd df # PGS column per OSD
Too few PGs cause uneven OSD usage; too many cost memory and CPU on OSDs. The autoscaler normally manages this.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Ceph → Placement Groups. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.ceph.com/en/latest/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Ceph → Placement Groups Ceph map
Fast control-plane, placement, data-path and proof boundaries for Ceph → Placement Groups.
| 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 |