























The undersized PG state indicates that the acting set for a PG has fewer OSDs than the pool's size setting, but the PG has NOT fallen below the min_size threshold. The PG continues to serve I/O but with reduced replication.
These two states are closely related but have distinct meanings:
| State | Meaning | I/O Status |
|---|---|---|
degraded | Some object replicas are missing | Active, data missing |
undersized | Acting set is smaller than pool size | Active, acting set reduced |
A PG can be undersized without being degraded if the acting set is smaller than size but all objects in the acting set are consistent. Conversely, a PG can be degraded without being undersized.
size is set higher than the available OSD count# Check pool size settings
ceph osd pool get mypool size
ceph osd pool get mypool min_size
# Check how many OSDs are up
ceph osd statceph status
# HEALTH_WARN: X/Y pgs undersized
ceph pg stat | grep undersized
# Detailed list
ceph pg dump | grep undersizedFor a specific PG:
ceph pg <pg-id> query | jq '{state: .state, acting: .acting, up: .up}'Undersized PGs have less protection than configured. For a size 3 pool:
# Count undersized PGs by acting set size
ceph pg dump --format json | jq '.pg_stats[] | select(.state | contains("undersized")) | .acting | length' | sort | uniq -cIf the pool size exceeds available OSD count, add more OSDs:
ceph osd tree # count available OSDs per host/rackIf the pool size is intentionally larger than available OSDs:
ceph osd pool set mypool size 2
ceph osd pool set mypool min_size 1If OSDs are down but recoverable:
systemctl start ceph-osd@<id>.service
watch ceph osd statDuring rolling maintenance, undersized is expected and temporary. Set noout before starting:
ceph osd set noout
# Perform maintenance - PGs become undersized temporarily
# Restart OSDs
ceph osd unset noout
# PGs recover to full sizeUndersized PGs have a smaller acting set than the configured pool size, which means reduced but not necessarily absent redundancy. The cluster continues serving I/O but with less fault tolerance. Resolve by adding OSDs, recovering downed ones, or adjusting the pool size to match the available hardware. During planned maintenance, this state is expected and transient.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。