























The degraded PG state means one or more object replicas are missing. The PG is still serving I/O (when combined with active) but has reduced redundancy. Understanding this state is critical for assessing data durability during and after OSD failures.
A PG is degraded when its current replica count is below the pool's size setting. For a size 3 pool, degraded means the PG has 2 or fewer copies.
Degraded does NOT mean data loss - it means you have less protection than configured. If another OSD fails while a PG is degraded, you could lose data if the remaining replicas go down.
ceph status
# HEALTH_WARN: X/Y objects degraded
ceph pg stat
# active+degraded count
# List which PGs are degraded
ceph pg dump | grep degradedGet the number of degraded objects:
ceph status --format json | jq '.pgmap.degraded_objects'down or outCheck which OSDs are affected:
ceph osd tree | grep -E "down|out"
ceph health detail | grep "pg"| Replicas Present | Pool Size | Status |
|---|---|---|
| 3 | 3 | active+clean |
| 2 | 3 | active+degraded |
| 1 | 3 | active+degraded (high risk) |
| 0 | 3 | inactive (unavailable) |
With one replica missing (2/3), the cluster can tolerate zero additional OSD failures for affected PGs. With two replicas missing (1/3), any single additional OSD failure could make those PGs inactive.
# See degraded ratio
ceph status | grep "degraded"
# degraded (33.333%): 1024/3072 objects
# Calculate affected PGs
ceph pg dump | awk '{if ($16 ~ /degraded/) print $1}' | wc -lIf degradation is due to a recoverable OSD coming back:
# Check if OSD is recovering
ceph osd stat
# Increase recovery speed
ceph config set osd osd_recovery_max_active_hdd 10
ceph config set osd osd_recovery_op_priority 10If the OSD is permanently lost, mark it out to trigger remapping:
ceph osd out osd.3watch ceph status
# Look for transition from:
# active+degraded -> active+recovering+degraded -> active+cleanThe degraded PG state indicates reduced data redundancy due to missing replicas. Degraded PGs continue serving I/O but with lower fault tolerance. When you see active+degraded, act promptly by identifying the failed OSD, determining if it is recoverable or must be replaced, and ensuring the remaining replicas do not fail during recovery.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。