惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
月光博客
月光博客
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
aimingoo的专栏
aimingoo的专栏
U
Unit 42
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MyScale Blog
MyScale Blog
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
B
Blog
博客园_首页
G
Google Developers Blog
Recent Announcements
Recent Announcements
博客园 - 【当耐特】
P
Proofpoint News Feed
博客园 - 司徒正美
Hugging Face - Blog
Hugging Face - Blog
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI

OneUptime Blog

How to Monitor Azure App Services (PaaS) with OpenTelemetry Grafana Stack vs OneUptime: DIY Observability or Unified Platform? Your AI Workloads Are About to Blow Up Your Observability Bill The Great Observability Consolidation Is Here How to Write Custom Object Classes for Ceph How to Write Custom Ceph Manager Modules How to Write a ceph.conf Configuration File How to Use Rook-Ceph with OpenShift How to Use Rook-Ceph with Longhorn for Comparison How to Configure Volume Snapshot Class for RBD in Rook How to Configure VolumeReplicationClass Scheduling Intervals in Rook How to Set Up Volume Replication with Rook-Ceph How to Create Volume Group Snapshots with Rook CSI How to Visualize Ceph Network Performance in Grafana How to Enable Virtual Host-Style Bucket Access in Rook How to View Runtime Configuration via Admin Socket How to View Quota Settings and Update Stats in Ceph RGW How to View PG Scaling Recommendations with autoscale-status How to View PG Distribution via Admin Socket How to View Performance Metrics in the Ceph Dashboard How to View OSD Performance Counters in Ceph How to View Connection Status via Admin Socket How to View Ceph Cluster Summary Dashboard via CLI How to Version Control Rook-Ceph Configuration How to Version Control Ceph Infrastructure with Terraform How to Verify Kubernetes Node Requirements for Rook-Ceph Deployment How to Verify Health Before and After Rook Upgrades How to Verify Data Integrity with Deep Scrubbing How to Verify Complete Rook-Ceph Cleanup How to Verify Backup Integrity from Ceph Snapshots
How to Understand the stale PG State in Ceph
Nawaz Dhandala · 2026-03-31 · via OneUptime Blog

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.

What stale Means

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:

  • Temporarily inaccessible (OSD is down)
  • Permanently lost (disk failure)
  • In a network partition

Checking Stale PGs

ceph status
# HEALTH_WARN: X pgs stale

ceph pg stat | grep stale

# List stale PGs with their primary OSD
ceph pg dump | grep stale

For detailed info about a stale PG:

ceph pg <pg-id> query

Why PGs Go Stale

Primary causes:

  1. The primary OSD crashed or was powered off
  2. Network partition isolates the primary from monitors
  3. An OSD process is alive but not responding to Ceph requests
  4. All OSDs in the acting set are down

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"

Recovering from Stale PGs

If the primary OSD is temporarily down

Start the OSD and it will re-report, removing the stale state:

systemctl start ceph-osd@<id>.service
watch ceph pg stat

If the primary OSD is permanently lost

Mark 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.

Debugging Stale PGs

# 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"

Stale PG vs Inactive PG

StateI/O statusMeaning
staleUnknownPrimary OSD not reporting
inactiveBlockedPG cannot peer - no quorum
active+cleanNormalFully healthy

Preventing Stale PGs

# 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-node1

Summary

Stale 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.