admin管理员组文章数量:1590574
2019独角兽企业重金招聘Python工程师标准>>>
#1.添加Mon 当前ceph的状态 # ceph -s cluster f4833745-d220-407b-82ea-72eb6297d435 health HEALTH_OK monmap e3: 3 mons at {dlw1=172.16.40.11:6789/0,dlw2=172.16.40.12:6789/0,dlw3=172.16.40.13:6789/0} election epoch 14, quorum 0,1,2 dlw1,dlw2,dlw3 osdmap e26: 3 osds: 3 up, 3 in flags sortbitwise,require_jewel_osds pgmap v9695: 352 pgs, 6 pools, 45725 kB data, 20 objects 253 MB used, 584 GB / 584 GB avail 352 active+clean
当前已有三个mon,分别为dlw1,dlw2和dlw3,现在添加第四个mon dlw4
疑问:为什么要有四个mon,也不满足Paxos 算法,因为我添加了dlw4作为mon,再把dlw1的mon移除掉,这样就等同于mon迁移了...,这不是重点,重点是添加mon过程中的报错及解决办法,做个记录。
用最简单快速的方法来添加ceph-deploy
# ceph-deploy --overwrite-conf mon create dlw4
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (1.5.37): /usr/bin/ceph-deploy --overwrite-conf mon create dlw4
[ceph_deploy.cli][INFO ] ceph-deploy options:
[ceph_deploy.cli][INFO ] username : None
[ceph_deploy.cli][INFO ] verbose : False
[ceph_deploy.cli][INFO ] overwrite_conf : True
[ceph_deploy.cli][INFO ] subcommand : create
[ceph_deploy.cli][INFO ] quiet : False
[ceph_deploy.cli][INFO ] cd_conf : <ceph_deploy.conf.cephdeploy.Conf instance at 0x1dd2d88>
[ceph_deploy.cli][INFO ] cluster : ceph
[ceph_deploy.cli][INFO ] mon : ['dlw4']
[ceph_deploy.cli][INFO ] func : <function mon at 0x1c93de8>
[ceph_deploy.cli][INFO ] ceph_conf : None
[ceph_deploy.cli][INFO ] default_release : False
[ceph_deploy.cli][INFO ] keyrings : None
[ceph_deploy.mon][DEBUG ] Deploying mon, cluster ceph hosts dlw4
[ceph_deploy.mon][DEBUG ] detecting platform for host dlw4 ...
[dlw4][DEBUG ] connected to host: dlw4
[dlw4][DEBUG ] detect platform information from remote host
[dlw4][DEBUG ] detect machine type
[dlw4][DEBUG ] find the location of an executable
[ceph_deploy.mon][INFO ] distro info: CentOS Linux 7.2.1511 Core
[dlw4][DEBUG ] determining if provided host has same hostname in remote
[dlw4][DEBUG ] get remote short hostname
[dlw4][DEBUG ] deploying mon to dlw4
[dlw4][DEBUG ] get remote short hostname
[dlw4][DEBUG ] remote hostname: dlw4
[dlw4][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[dlw4][DEBUG ] create the mon path if it does not exist
[dlw4][DEBUG ] checking for done path: /var/lib/ceph/mon/ceph-dlw4/done
[dlw4][DEBUG ] create a done file to avoid re-doing the mon deployment
[dlw4][DEBUG ] create the init path if it does not exist
[dlw4][INFO ] Running command: systemctl enable ceph.target
[dlw4][INFO ] Running command: systemctl enable ceph-mon@dlw4
[dlw4][INFO ] Running command: systemctl start ceph-mon@dlw4
[dlw4][INFO ] Running command: ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.dlw4.asok mon_status
[dlw4][ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
[dlw4][WARNIN] monitor: mon.dlw4, might not be running yet
[dlw4][INFO ] Running command: ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.dlw4.asok mon_status
[dlw4][ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
[dlw4][WARNIN] dlw4 is not defined in `mon initial members`
[dlw4][WARNIN] monitor dlw4 does not exist in monmap
[dlw4][WARNIN] neither `public_addr` nor `public_network` keys are defined for monitors
[dlw4][WARNIN] monitors may not be able to form quorum
[root@dlw1 opt]# ceph-deploy --overwrite-conf mon add dlw4
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (1.5.37): /usr/bin/ceph-deploy --overwrite-conf mon add dlw4
[ceph_deploy.cli][INFO ] ceph-deploy options:
[ceph_deploy.cli][INFO ] username : None
[ceph_deploy.cli][INFO ] verbose : False
[ceph_deploy.cli][INFO ] overwrite_conf : True
[ceph_deploy.cli][INFO ] subcommand : add
[ceph_deploy.cli][INFO ] quiet : False
[ceph_deploy.cli][INFO ] cd_conf : <ceph_deploy.conf.cephdeploy.C
版权声明:本文标题:Ceph添加监视器Monitor失败 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1728084929a1144866.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论