ceph在扩展mon节点时,要注意的问题
我开始也是一步一步的按官方文档操作。
但后来还是遇到了问题。
当我要扩展mon节点时,死活出错。
(我就一共用了三个节点ceph-admin, ceph-node1, ceph-node2)
比如:
ceph-deploy mon add ceph-node2
出错如下:
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf [ceph_deploy.cli][INFO ] Invoked (): /usr/bin/ceph-deploy mon add ceph-node2 [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 : False [ceph_deploy.cli][INFO ] subcommand : add [ceph_deploy.cli][INFO ] quiet : False [ceph_deploy.cli][INFO ] cd_conf : <ceph_deploy.conf.cephdeploy.Conf instance at 0xa89fc8> [ceph_deploy.cli][INFO ] cluster : ceph [ceph_deploy.cli][INFO ] mon : ['ceph-node2'] [ceph_deploy.cli][INFO ] func : <function mon at 0xa826e0> [ceph_deploy.cli][INFO ] address : None [ceph_deploy.cli][INFO ] ceph_conf : None [ceph_deploy.cli][INFO ] default_release : False [ceph_deploy.mon][INFO ] ensuring configuration of new mon host: ceph-node2 [ceph_deploy.admin][DEBUG ] Pushing admin keys and conf to ceph-node2 [ceph-node2][DEBUG ] connected to host: ceph-node2 [ceph-node2][DEBUG ] detect platform information from remote host [ceph-node2][DEBUG ] detect machine type [ceph-node2][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf [ceph_deploy.mon][DEBUG ] Adding mon to cluster ceph, host ceph-node2 [ceph_deploy.mon][DEBUG ] using mon address by resolving host: 192.168.1.113 [ceph_deploy.mon][DEBUG ] detecting platform for host ceph-node2 ... [ceph-node2][DEBUG ] connected to host: ceph-node2 [ceph-node2][DEBUG ] detect platform information from remote host [ceph-node2][DEBUG ] detect machine type [ceph-node2][DEBUG ] find the location of an executable [ceph_deploy.mon][INFO ] distro Core [ceph-node2][DEBUG ] determining if provided host has same hostname in remote [ceph-node2][DEBUG ] get remote short hostname [ceph-node2][DEBUG ] adding mon to ceph-node2 [ceph-node2][DEBUG ] get remote short hostname [ceph-node2][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf [ceph-node2][DEBUG ] create the mon path if it does not exist [ceph-node2][DEBUG ] checking for done path: /var/lib/ceph/mon/ceph-ceph-node2/done [ceph-node2][DEBUG ] create a done file to avoid re-doing the mon deployment [ceph-node2][DEBUG ] create the init path if it does not exist [ceph-node2][INFO ] Running command: systemctl enable ceph.target [ceph-node2][INFO ] Running command: systemctl enable ceph-mon@ceph-node2 [ceph-node2][INFO ] Running command: systemctl start ceph-mon@ceph-node2 [ceph-node2][INFO ] Running command: ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph-node2.asok mon_status [ceph-node2][ERROR ] admin_socket: exception getting command descriptions: [Errno ] No such file or directory [ceph-node2][WARNIN] ceph-node2 is not defined in `mon initial members` [ceph-node2][WARNIN] monitor ceph-node2 does not exist in monmap [ceph-node2][WARNIN] neither `public_addr` nor `public_network` keys are defined for monitors [ceph-node2][WARNIN] monitors may not be able to form quorum [ceph-node2][INFO ] Running command: ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph-node2.asok mon_status [ceph-node2][ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or directory [ceph-node2][WARNIN] monitor: mon.ceph-node2, might not be running yet
后来,查找了几个方案,原来要在ceph.conf定义一下Public_network(还有其它几个解决方案,我选择了这个靠谱的)。
当我更新完ceph.conf时,运行同样的命令会再报错:
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf [ceph_deploy.cli][INFO ] Invoked (): /usr/bin/ceph-deploy mon add ceph-admin [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 : False [ceph_deploy.cli][INFO ] subcommand : add [ceph_deploy.cli][INFO ] quiet : False [ceph_deploy.cli][INFO ] cd_conf : <ceph_deploy.conf.cephdeploy.Conf instance at 0x2296fc8> [ceph_deploy.cli][INFO ] cluster : ceph [ceph_deploy.cli][INFO ] mon : ['ceph-admin'] [ceph_deploy.cli][INFO ] func : <function mon at 0x228f6e0> [ceph_deploy.cli][INFO ] address : None [ceph_deploy.cli][INFO ] ceph_conf : None [ceph_deploy.cli][INFO ] default_release : False [ceph_deploy.mon][INFO ] ensuring configuration of new mon host: ceph-admin [ceph_deploy.admin][DEBUG ] Pushing admin keys and conf to ceph-admin [ceph-admin][DEBUG ] connected to host: ceph-admin [ceph-admin][DEBUG ] detect platform information from remote host [ceph-admin][DEBUG ] detect machine type [ceph-admin][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf [ceph_deploy.admin][ERROR ] RuntimeError: config file /etc/ceph/ceph.conf exists with different content; use --overwrite-conf to overwrite [ceph_deploy][ERROR ] GenericError: Failed to configure 1 admin hosts
于是,网上又找方案,应该是conf不同步所致,几圈下来,--overwrite的使用各不相同,我自己用-h摸索出来的命令是:
ceph-deploy --overwrite-conf config push ceph-admin ceph-node1 ceph-node2 ---为保险,我再推了一次 ceph-deploy admin ceph-node1 ceph-node2
然后,再运行ceph-deploy mon add ceph-node2命令,成功输出如下:
[root@ceph-admin my-ceph-cluster]# ceph-deploy mon add ceph-node2 [ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf [ceph_deploy.cli][INFO ] Invoked (): /usr/bin/ceph-deploy mon add ceph-node2 [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 : False [ceph_deploy.cli][INFO ] subcommand : add [ceph_deploy.cli][INFO ] quiet : False [ceph_deploy.cli][INFO ] cd_conf : <ceph_deploy.conf.cephdeploy.Conf instance at 0x10c8fc8> [ceph_deploy.cli][INFO ] cluster : ceph [ceph_deploy.cli][INFO ] mon : ['ceph-node2'] [ceph_deploy.cli][INFO ] func : <function mon at 0x10c16e0> [ceph_deploy.cli][INFO ] address : None [ceph_deploy.cli][INFO ] ceph_conf : None [ceph_deploy.cli][INFO ] default_release : False [ceph_deploy.mon][INFO ] ensuring configuration of new mon host: ceph-node2 [ceph_deploy.admin][DEBUG ] Pushing admin keys and conf to ceph-node2 [ceph-node2][DEBUG ] connected to host: ceph-node2 [ceph-node2][DEBUG ] detect platform information from remote host [ceph-node2][DEBUG ] detect machine type [ceph-node2][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf [ceph_deploy.mon][DEBUG ] Adding mon to cluster ceph, host ceph-node2 [ceph_deploy.mon][DEBUG ] using mon address by resolving host: 192.168.1.113 [ceph_deploy.mon][DEBUG ] detecting platform for host ceph-node2 ... [ceph-node2][DEBUG ] connected to host: ceph-node2 [ceph-node2][DEBUG ] detect platform information from remote host [ceph-node2][DEBUG ] detect machine type [ceph-node2][DEBUG ] find the location of an executable [ceph_deploy.mon][INFO ] distro Core [ceph-node2][DEBUG ] determining if provided host has same hostname in remote [ceph-node2][DEBUG ] get remote short hostname [ceph-node2][DEBUG ] adding mon to ceph-node2 [ceph-node2][DEBUG ] get remote short hostname [ceph-node2][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf [ceph-node2][DEBUG ] create the mon path if it does not exist [ceph-node2][DEBUG ] checking for done path: /var/lib/ceph/mon/ceph-ceph-node2/done [ceph-node2][DEBUG ] create a done file to avoid re-doing the mon deployment [ceph-node2][DEBUG ] create the init path if it does not exist [ceph-node2][INFO ] Running command: systemctl enable ceph.target [ceph-node2][INFO ] Running command: systemctl enable ceph-mon@ceph-node2 [ceph-node2][INFO ] Running command: systemctl start ceph-mon@ceph-node2 [ceph-node2][INFO ] Running command: ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph-node2.asok mon_status [ceph-node2][WARNIN] ceph-node2 is not defined in `mon initial members` [ceph-node2][WARNIN] monitor ceph-node2 does not exist in monmap [ceph-node2][INFO ] Running command: ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph-node2.asok mon_status [ceph-node2][DEBUG ] ******************************************************************************** [ceph-node2][DEBUG ] status for monitor: mon.ceph-node2 [ceph-node2][DEBUG ] { [ceph-node2][DEBUG ] , [ceph-node2][DEBUG ] "extra_probe_peers": [], [ceph-node2][DEBUG ] "monmap": { [ceph-node2][DEBUG ] "created": "2017-08-12 08:25:17.590053", [ceph-node2][DEBUG ] , [ceph-node2][DEBUG ] "fsid": "798ed076-8094-429e-9e27-0ffccd60b56e", [ceph-node2][DEBUG ] "modified": "2017-08-12 20:40:03.171628", [ceph-node2][DEBUG ] "mons": [ [ceph-node2][DEBUG ] { [ceph-node2][DEBUG ] "addr": "192.168.1.111:6789/0", [ceph-node2][DEBUG ] "name": "ceph-admin", [ceph-node2][DEBUG ] [ceph-node2][DEBUG ] }, [ceph-node2][DEBUG ] { [ceph-node2][DEBUG ] "addr": "192.168.1.112:6789/0", [ceph-node2][DEBUG ] "name": "ceph-node1", [ceph-node2][DEBUG ] [ceph-node2][DEBUG ] } [ceph-node2][DEBUG ] ] [ceph-node2][DEBUG ] }, [ceph-node2][DEBUG ] "name": "ceph-node2", [ceph-node2][DEBUG ] "outside_quorum": [], [ceph-node2][DEBUG ] "quorum": [], [ceph-node2][DEBUG ] , [ceph-node2][DEBUG ] "state": "probing", [ceph-node2][DEBUG ] "sync_provider": [] [ceph-node2][DEBUG ] } [ceph-node2][DEBUG ] ******************************************************************************** [ceph-node2][INFO ] monitor: mon.ceph-node2 is currently at the state of probing
最后,查看用下面的命令检查法定人数状态:
ceph quorum_status --format json-pretty
ceph在扩展mon节点时,要注意的问题的更多相关文章
- day64:nginx模块之限制连接&状态监控&Location/用nginx+php跑项目/扩展应用节点
目录 1.nginx模块:限制连接 limit_conn 2.nginx模块:状态监控 stub_status 3.nginx模块:Location 4.用nginx+php跑wordpress项目 ...
- 警惕rapidxml的陷阱:添加节点时,请保证变量的生命周期
http://www.cnblogs.com/chutianyao/p/3246592.html 项目中要使用xml打包.解析协议,HQ指定了使用rapidxml--号称是最快的xml解析器. 功能很 ...
- Jstree 使用CheckBox插件 选中父节点时被禁用的子节点也会选中问题
问题描述: 最近用jstree遇到一个问题,使用CheckBox插件时,当父节点选中时,被禁用的子节点也会选中如下 解决方案: 1. 将jstree升级到最新的版本,v3.3.4及以上就可以 2. ...
- activiti官网实例项目activiti-explorer之扩展流程节点属性2
情景需求:需要查找activiti-explorer项目中获取流程id的方法,然后根据流程id获取相应字段在节点属性中添加内容. 大致流程:拿取整个流程id获取对应表单属性,在页面节点属性中展示对应表 ...
- jQuery之导航菜单(点击该父节点时子节点显示,同时子节点的同级隐藏,但是同级的父节点始终显示)
注:对于同一个对象不超过3个操作的,可直接写成一行,超 过3个操作的建议每行写一个操作.这样可读性较强,可提高代码的可读性和可维护性 核心代码: $(".has_children" ...
- 当SQL Server的实例位于集群的特定节点时,数据库无法远程访问
搭建好了一个集群环境,发现当SQL Server的实例位于集群的其中一个节点时,数据库无法远程访问,报如下错误.但在另一个 节点时,数据库访问正常. 标题: 连接到服务器 -------------- ...
- Spring Cloud Eureka集群 动态扩展新节点
场景描述: Eureka的集群节点有两个,互相注册形成集群,已经支持动态刷新(不知道怎么让Eureka支持动态刷新的可以参考http://www.cnblogs.com/flying607/p/845 ...
- Jenkins2.138配置slave节点时,启动方法只有两个选项
Jenkins2.138配置slave节点时,启动方法只有两个选项,并没有通过javaweb代理启动这个选项 解决办法 全局安全配置->代理->选择随机选取
- ztree获取选中节点时不能进入可视区域出现BUG如何解决
zTree 是一个依靠 jQuery 实现的多功能 “树插件”.优异的性能.灵活的配置.多种功能的组合是 zTree 最大优点. zTree 的特点编辑 ● zTree v3.0 将核心代码按照功能进 ...
随机推荐
- [技巧篇]06.关于防止SQL注入的方式,不使用预处理
在一期,二期阶段,有一些同学,对于SQL语句总是使用字符串的拼接,这是一个比较坏的毛病,这样非常影响我们的程序的安全性,所以一般情况下我们都推荐预处理模式,针对这种模式希望不了解的同学去努力学习,下面 ...
- [Luogu 2261] CQOI2007 余数求和
[Luogu 2261] CQOI2007 余数求和 这一定是我迄今为止见过最短小精悍的省选题了,核心代码 \(4\) 行,总代码 \(12\) 行,堪比小凯的疑惑啊. 这题一看暴力很好打,然而 \( ...
- 使用JMeter录制脚本并调试
仍然以禅道中添加bug为例进行录制 第一步:在JMeter中添加线程组,命名为AddBugByJMeter 第二步:在线程组下添加HTTP请求默认值 添加->配置元件->HTTP请求默认值 ...
- 【BZOJ4816】【SDOI2017】数字表格 [莫比乌斯反演]
数字表格 Time Limit: 50 Sec Memory Limit: 128 MB[Submit][Status][Discuss] Description Doris刚刚学习了fibonac ...
- 【STSRM10】数学上来先打表
[算法]DP+数学计数 [题意]给出n个点(不同点之间有区别),求出满足下列条件的连边(双向边)方案(对1004535809取模): 1.每条边连接两个不同的点,每两个点之间至多有一条边. 2.不存在 ...
- 表单元素(form、文本、按钮、选择)
表单元素 一.form form代表表单,功能:用于申明表单,定义采集数据的范围,也就是<form>和</form>里面包含的数据将被提交到服务器或者电子邮件里.<for ...
- Spring 事务管理(山东数漫江湖)
最新又重新学习了一遍Spring的事务,这里做点总结,不做如何一步步配置的流水账. 1. 关键类 public interface PlatformTransactionManager { Trans ...
- Problem L. Visual Cube(杭电多校2018年第三场+模拟)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6330 题目: 题意:给你长宽高,让你画出一个正方体. 思路:模拟即可,湘潭邀请赛热身赛原题,不过比那个 ...
- java servlet jsp 导入boostrap css js
1.在导入boostrap.css的时候注意了 一定要注意路径,你知道把js和css包放在servlet服务器的静态路径下面就是 lib 文件夹路径下,直接使用 lib/js/boostrap.css ...
- MSSQL DBcheck
--1.创建数据库. --create database MyDatabase; --删除数据库 --drop database MyDatabase; ----------------------- ...