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

推荐订阅源

人人都是产品经理
人人都是产品经理
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
月光博客
月光博客
T
Tailwind CSS Blog
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
罗磊的独立博客
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
量子位
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
美团技术团队
博客园 - 聂微东
V
V2EX

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 clean PG State in Ceph
Nawaz Dhandala · 2026-03-31 · via OneUptime Blog

The clean PG state indicates that all copies of a placement group's data are present and consistent across all acting OSDs. Together with active, it forms active+clean, which is the fully healthy state for a PG.

What clean Means Precisely

A PG is clean when:

  1. The current number of replicas equals the desired pool replica count
  2. All objects in the PG are fully replicated across all acting OSDs
  3. No recovery or backfill is in progress for this PG
  4. The acting set matches the up set (no remapping)

active+clean is the Goal

Every PG should eventually reach active+clean. When ceph status shows all PGs in this state, the cluster is fully healthy:

ceph status
# pgmap: 256 pgs: 256 active+clean; ...

Check the count:

ceph pg stat
# 256 pgs: 256 active+clean

# In JSON
ceph pg stat --format json | jq '.num_pgs_by_state[] | select(.state_name == "active+clean")'

clean vs Other States

StateMeaning
active+cleanFully healthy, all copies present
active+degradedSome copies missing
active+clean+scrubbingHealthy but currently being scrubbed
active+clean+snaptrimHealthy but trimming snapshots

Reaching clean After Degradation

After an OSD failure and recovery, PGs transition through several states before reaching clean:

active+degraded -> active+degraded+recovering -> active+clean

Watch the transition:

watch ceph pg stat

How Long Should It Take?

Recovery time depends on:

  • Amount of data to recover
  • OSD I/O capacity
  • osd_recovery_max_active setting

Estimate using the bytes to recover:

ceph status | grep "degraded\|recovering"
# degraded (x%) objects, x/y bytes

Per-PG Clean Check

Inspect a specific PG:

ceph pg <pg-id> query | jq '{state: .state, last_clean: .info.history.last_epoch_clean}'

Pool-Level Clean Status

Check how many PGs per pool are clean:

ceph pg ls-by-pool mypool | awk '{print $1, $16}' | grep -v "active+clean" | head -20

Triggering Scrub to Verify Clean

Even a clean PG might have silent data corruption. Verify by triggering a deep scrub:

ceph osd pool deep-scrub mypool
ceph health detail | grep -i "inconsistent\|error"

Summary

The clean PG state confirms that all desired replicas are present and fully synchronized. The target healthy state for every PG is active+clean. When any PG deviates from this state, Ceph immediately begins recovery. Monitor how many PGs are in active+clean to track cluster health after OSD failures or maintenance events.