查看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

相關文章
相關標籤/搜索