查看pg在osd上的分布

一、查看primary pg在osd上的分布
 code

ceph pg ls-by-primary <osd.id>

[root@ceph1 ~]# for i in `ceph osd ls`;do echo -n osd.$i:;ceph pg ls-by-primary $i|grep -v PG_STAT|wc -l ;done
osd.0:36
osd.1:34
osd.2:24
osd.3:24
osd.4:41
osd.5:36
osd.6:24
osd.7:37
osd.8:36
osd.9:40
osd.10:22
osd.11:36
osd.12:35
osd.13:41

查看pg在pool上分布状况和数目统计:
 grep

ceph pg ls-by-pool <poolstr>

ceph pg ls-by-pool rbd|grep -v PG_STAT|wc -l

查看某个osd上全部pg状态
ceph pg ls-by-osd <osd.id>im

相关文章
相关标签/搜索