ceph修复所有pg
修复所有pg
ceph health detail |awk '{print $2}'|grep -v xxx|xargs -i ceph pg repair {}
pg问题定位
[root@node-1 ~]# ceph health detail
HEALTH_ERR 33 scrub errors; Possible data damage: 6 pgs inconsistent
OSD_SCRUB_ERRORS 33 scrub errors
PG_DAMAGED Possible data damage: 6 pgs inconsistent
pg 2.22 is active+clean+inconsistent, acting [38,15]
pg 2.32 is active+clean+inconsistent, acting [6,38]
pg 2.33 is active+clean+inconsistent, acting [38,23]
pg 2.3f is active+clean+inconsistent, acting [38,6]
pg 2.95 is active+clean+inconsistent, acting [38,29]
pg 2.c9 is active+clean+inconsistent, acting [30,38]
# 找异常的 PG
ceph health detail
# 查询异常 PG 的异常
ceph pg 2.22 query
# 去对应节点上看 osd 的日志
zgrep ERR ceph-osd.8.log*
# 修复异常
ceph pg repair 2.22