@dyj2017
2017-10-19T07:21:18.000000Z
字数 1319
阅读 8328
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-781c92fec20emon_initial_members = node1mon_host = 192.168.197.154auth_cluster_required = cephxauth_service_required = cephxauth_client_required = cephxpublic 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 -scluster:id: b8b4aa68-d825-43e9-a60a-781c92fec20ehealth: HEALTH_WARNclock skew detected on mon.node2, mon.node3services:mon: 3 daemons, quorum node1,node2,node3mgr: node1(active)osd: 6 osds: 6 up, 6 indata:pools: 0 pools, 0 pgsobjects: 0 objects, 0 bytesusage: 6346 MB used, 55093 MB / 61440 MB availpgs:
可以看到成功添加了两个mon:node2 node3。