sisimi的点点滴滴

你若盛开,清风自来

导航

ceph-deploy mon add 失败

ceph-deploy mon add 失败

标签(空格分隔): ceph-deploy 运维


问题描述:

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

# 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节点中,my-cluster目录下的ceph.conf的[global]下添加对应的网址:

[global]
fsid = b8b4aa68-d825-43e9-a60a-781c92fec20e
mon_initial_members = node1
mon_host = 192.168.197.154
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx

public network =192.168.197.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查看集群状态:

# ceph -s
 cluster:
    id:     b8b4aa68-d825-43e9-a60a-781c92fec20e
    health: HEALTH_WARN
            clock skew detected on mon.node2, mon.node3
 
  services:
    mon: 3 daemons, quorum node1,node2,node3
    mgr: node1(active)
    osd: 6 osds: 6 up, 6 in
 
  data:
    pools:   0 pools, 0 pgs
    objects: 0 objects, 0 bytes
    usage:   6346 MB used, 55093 MB / 61440 MB avail
    pgs:     

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

posted on 2017-10-19 16:13  sisimi_2017  阅读(1475)  评论(0编辑  收藏  举报