ceph troubleshooting

1 输入ceph -s,出现如下内容


原因:ceph cluster中osd的数量较少,但是又创建了多个pool。

改正方法:

在ceph.conf文件中添加内容:mon_pg_warn_max_per_osd = 1000,然后重新mon服务,接着查看就会看到如下内容:


PS: 重启ceph mon服务的命令为:systemctl start(stop/status) [email protected],其中monnodename可以通过如下命令查看: systemctl list-units --type=service | grep ceph

上述fix 方法只适用于v12.x.x版本以前,v12版本以后配置参数mon_pg_warn_max_per_osd已经被取消了,官方内容为;

The maximum number of PGs per OSD before the monitor issues a warning has been reduced from 300 to 200 PGs. 200 is still twice the generally recommended target of 100 PGs per OSD. This limit can be adjusted via the mon_max_pg_per_osd option on the monitors. The older mon_pg_warn_max_per_osd option has been removed.

可以通过如下命令查看mon_max_pg_per_osd的大小:


可以通过修改 mon_max_pg_per_osd的值来消除warning。在/etc/ceph/ceph.conf 文件中加入mon_mon_pg_per_osd然后重启mgr进程就可以消除warning。

猜你喜欢

转载自blog.csdn.net/devops008/article/details/80940761