




















A stale PG is one where the monitor has not received a status update from the primary OSD within the expected time window. It indicates the primary OSD may be down or unreachable, and the PG's current state is unknown.
The monitor tracks PG states via heartbeat reports from primary OSDs. If a primary OSD stops reporting, the monitor marks its PGs as stale after mon_osd_report_timeout seconds (default 900 seconds). Stale PGs may be:
ceph status
# HEALTH_WARN: X pgs stale
ceph pg stat | grep stale
# List stale PGs with their primary OSD
ceph pg dump | grep staleFor detailed info about a stale PG:
ceph pg <pg-id> queryPrimary causes:
Identify which OSDs host the stale PGs:
ceph pg dump --format json | jq '.pg_stats[] | select(.state | contains("stale")) | {pgid, acting}'Then check those OSD states:
ceph osd tree | grep "down\|out"Start the OSD and it will re-report, removing the stale state:
systemctl start ceph-osd@<id>.service
watch ceph pg statMark the OSD out and let Ceph elect a new primary from the remaining replicas:
ceph osd out osd.<id>
ceph osd down osd.<id>Ceph will remap the PG to the remaining healthy OSDs and clear the stale state.
# Check how long PG has been stale
ceph pg <pg-id> query | jq '.info.stats.last_active'
# Check the OSD's last seen time
ceph osd stat
# Check OSD log
journalctl -u ceph-osd@<id> --since "1 hour ago"| State | I/O status | Meaning |
|---|---|---|
| stale | Unknown | Primary OSD not reporting |
| inactive | Blocked | PG cannot peer - no quorum |
| active+clean | Normal | Fully healthy |
# Reduce stale timeout (not recommended for busy clusters)
ceph config set mon mon_osd_report_timeout 600
# Ensure OSDs have stable network connectivity
ping -c 10 osd-node1Stale PGs indicate that the primary OSD has stopped reporting status to the monitors. They are usually caused by OSD or node failures and resolve automatically when the OSD restarts or when Ceph elects a new primary from the remaining replicas. Stale PGs are a warning, not necessarily a failure, but they require prompt investigation to prevent further degradation.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。