最近公司有个Ceph集群出了点问题,于是也参与了修复的过程,过程中最让人头疼的就是一堆不明所以的状态了,所以看了看文档,也找了一些参考,
整理了一下Ceph PG的一些状态以及相关的概念说明,做了一个中英文的对照版本:
Placement Group States(PG状态)
当检查一个集群的状态时(执行ceph -w
或者ceph -s
),Ceph会汇报当前PG的状态,每个PG会有一个或多个状态,最优的PG状态是active + clean
。
下面是所有PG状态的具体解释:
creating
Ceph is still creating the placement group.
Ceph 仍在创建PG。
activating
The placement group is peered but not yet active.
PG已经互联,但是还没有active。
active
Ceph will process requests to the placement group.
Ceph 可处理到此PG的请求。
clean
Ceph replicated all objects in the placement group the correct
number of times.
PG内所有的对象都被正确的复制了对应的份数。
down
A replica with necessary data is down, so the placement group is
offline.
一个包含必备数据的副本离线,所以PG也离线了。
scrubbing
Ceph is checking the placement group metadata for inconsistencies.
Ceph 正在检查PG metadata的一致性。
deep
Ceph is checking the placement group data against stored checksums.
Ceph 正在检查PG数据和checksums的一致性。
degraded
Ceph has not replicated some objects in the placement group the
correct number of times yet.
PG中的一些对象还没有被复制到规定的份数。
inconsistent
Ceph detects inconsistencies in the one or more replicas of an
object in the placement group (e.g. objects are the wrong size,
objects are missing from one replica *after* recovery finished,
etc.).
Ceph检测到PG中对象的一份或多份数据不一致(比如对象大学不一直,或者恢复成功后对象依然没有等)
peering
The placement group is undergoing the peering process
PG正在互联过程中。