Ceph 状态报警告 pool rbd has many more objects per pg than average (too few pgs?)
定位问题
1 2 3 4 5 6 7 8 9 10 11
[root@lab8106 ~]# ceph -s cluster fa7ec1a1-662a-4ba3-b478-7cb570482b62 health HEALTH_WARN pool rbd has many more objects per pg than average (too few pgs?) monmap e1: 1 mons at {lab8106=192.168.8.106:6789/0} election epoch 30, quorum 0 lab8106 osdmap e157: 2 osds: 2 up, 2 in flags sortbitwise pgmap v1023: 417 pgs, 13 pools, 18519 MB data, 15920 objects 18668 MB used, 538 GB / 556 GB avail 417 active+clean
集群出现了这个警告,pool rbd has many more objects per pg than average (too few pgs?) 这个警告在hammer版本里面的提示是 pool rbd has too few pgs
这个地方查看集群详细信息:
1 2 3
[root@lab8106 ~]# ceph health detail HEALTH_WARN pool rbd has many more objects per pg than average (too few pgs?); mon.lab8106 low disk space pool rbd objects per pg (1912) is more than 50.3158 times cluster average (38)
int average_objects_per_pg = pg_map.pg_sum.stats.sum.num_objects / pg_map.pg_stat.size(); if (average_objects_per_pg > 0 && pg_map.pg_sum.stats.sum.num_objects >= g_conf->mon_pg_warn_min_objects && p->second.stats.sum.num_objects >= g_conf->mon_pg_warn_min_pool_objects) { int objects_per_pg = p->second.stats.sum.num_objects / pi->get_pg_num(); float ratio = (float)objects_per_pg / (float)average_objects_per_pg; if (g_conf->mon_pg_warn_max_object_skew > 0 && ratio > g_conf->mon_pg_warn_max_object_skew) { ostringstream ss; ss << "pool " << name << " has many more objects per pg than average (too few pgs?)"; summary.push_back(make_pair(HEALTH_WARN, ss.str())); if (detail) { ostringstream ss; ss << "pool " << name << " objects per pg (" << objects_per_pg << ") is more than " << ratio << " times cluster average (" << average_objects_per_pg << ")"; detail->push_back(make_pair(HEALTH_WARN, ss.str())); }