ceph-deploy add mon失败

问题描述:

现有集群只有一个mon,需要通过ceph-deploy mon add添加两个mon。在admin(node1)节点执行命令:

ceph-deploy mon add node2

提示如下error:

[node2][ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
[node2][WARNIN] node2 is not defined in mon initial members
[node2][WARNIN] monitor node2 does not exist in monmap
[node2][WARNIN] neither public_addr nor public_network keys are defined for monitors
[node2][WARNIN] monitors may not be able to form quorum
[node2][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node2.asok mon_status

解决方法:

通过上面日志可知ceph.conf配置文件中缺少public network的配置,在admin节点中,/etc/ceph/目录下的ceph.conf的[global]下添加对应的网址(在[global]配置段里添加下面一句(直接放到最后一行)):

[default]
......
public network =10.0.0.0/24

之后通过执行下面的命令把修改推送至每个节点,否则提示error:

ceph-deploy --overwrite-conf config push node1 node2 node3

执行命令为cluster添加mon:

ceph-deploy mon add node2
ceph-deploy mon add node3

通过ceph -s查看集群状态:

cluster:
id: c05c1f28-ea78-41b7-b674-a069d90553ac
health: HEALTH_OK 健康状态为OK

services:
mon: 3 daemons, quorum node1,node2,node3 3个监控
mgr: no daemons active
osd: 0 osds: 0 up, 0 in

data:
pools: 0 pools, 0 pgs
objects: 0 objects, 0 B
usage: 0 B used, 0 B / 0 B avail
pgs:

可以看到成功添加了两个mon:node2 node3。

上一篇:后疫情时代,低代码开发平台迎来新机遇。


下一篇:Ceph RADOS汇总