ceph-deploy 遇到的使用问题

目录

  • [问题一、RuntimeError: bootstrap-osd keyring not found; run 'gatherkeys'](#问题一、RuntimeError: bootstrap-osd keyring not found; run 'gatherkeys')
  • [问题二、 stderr: Error EEXIST: entity osd.0 exists but key does not match](#问题二、 stderr: Error EEXIST: entity osd.0 exists but key does not match)
  • [问题三:RuntimeError: command returned non-zero exit status: 1](#问题三:RuntimeError: command returned non-zero exit status: 1)

问题一、RuntimeError: bootstrap-osd keyring not found; run 'gatherkeys'

当执行ceph-deploy命令时,提示找不到keyring文件。

解决思路:首先前往部署文件夹/etc/ceph-cluster/,检查密钥文件是否存在,不存在的话执行gatherkeys命令收集

shell 复制代码
ceph-deploy gatherkeys <部署节点hostname>
#例
ceph-deploy gatherkeys node49

执行后的正确输出如下

shell 复制代码
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO  ] Invoked (2.0.1): /usr/bin/ceph-deploy gatherkeys node49
[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  ]  quiet                         : False
[ceph_deploy.cli][INFO  ]  cd_conf                       : <ceph_deploy.conf.cephdeploy.Conf instance at 0x7f4436b7d488>
[ceph_deploy.cli][INFO  ]  cluster                       : ceph
[ceph_deploy.cli][INFO  ]  mon                           : ['node49']
[ceph_deploy.cli][INFO  ]  func                          : <function gatherkeys at 0x7f4436dc49b0>
[ceph_deploy.cli][INFO  ]  ceph_conf                     : None
[ceph_deploy.cli][INFO  ]  default_release               : False
[ceph_deploy.gatherkeys][INFO  ] Storing keys in temp directory /tmp/tmpwck71_
[node49][DEBUG ] connected to host: node49 
[node49][DEBUG ] detect platform information from remote host
[node49][DEBUG ] detect machine type
[node49][DEBUG ] get remote short hostname
[node49][DEBUG ] fetch remote file
[node49][INFO  ] Running command: /usr/bin/ceph --connect-timeout=25 --cluster=ceph --admin-daemon=/var/run/ceph/ceph-mon.node49.asok mon_status
[node49][INFO  ] Running command: /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-node49/keyring auth get client.admin
[node49][INFO  ] Running command: /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-node49/keyring auth get client.bootstrap-mds
[node49][INFO  ] Running command: /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-node49/keyring auth get client.bootstrap-mgr
[node49][INFO  ] Running command: /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-node49/keyring auth get client.bootstrap-osd
[node49][INFO  ] Running command: /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-node49/keyring auth get client.bootstrap-rgw
[ceph_deploy.gatherkeys][INFO  ] keyring 'ceph.client.admin.keyring' already exists
[ceph_deploy.gatherkeys][INFO  ] Storing ceph.bootstrap-mds.keyring
[ceph_deploy.gatherkeys][INFO  ] Storing ceph.bootstrap-mgr.keyring
[ceph_deploy.gatherkeys][INFO  ] Storing ceph.mon.keyring
[ceph_deploy.gatherkeys][INFO  ] Storing ceph.bootstrap-osd.keyring
[ceph_deploy.gatherkeys][INFO  ] Storing ceph.bootstrap-rgw.keyring
[ceph_deploy.gatherkeys][INFO  ] Destroy temp directory /tmp/tmpwck71_
[root@node49 ceph-cluster]# ll
总用量 56
-rw------- 1 root root   113 12月 13 11:25 ceph.bootstrap-mds.keyring
-rw------- 1 root root   113 12月 13 11:25 ceph.bootstrap-mgr.keyring
-rw------- 1 root root   113 12月 13 11:25 ceph.bootstrap-osd.keyring
-rw------- 1 root root   113 12月 13 11:25 ceph.bootstrap-rgw.keyring
-rw------- 1 root root    63 12月 13 10:36 ceph.client.admin.keyring
-rw-r--r-- 1 root root   346 12月 13 10:34 ceph.conf
-rw-r--r-- 1 root root 24602 12月 13 11:25 ceph-deploy-ceph.log
-rw------- 1 root root    77 12月 13 11:25 ceph.mon.keyring

问题二、 stderr: Error EEXIST: entity osd.0 exists but key does not match

增加osd时提示存在osd的key信息

解决思路:直接删除遗漏的osd的key信息

shell 复制代码
ceph auth del osd.{osd-id}
#例
ceph auth del osd.0

问题三:RuntimeError: command returned non-zero exit status: 1

将原本作为osd存储介质的数据盘以新osd加入集群时提示

解决思路:格式化掉磁盘后再次执行增加操作

shell 复制代码
sgdisk -Z /dev/sd<x>
#例
sgdisk -Z /dev/sdb
相关推荐
颜如玉26 分钟前
🤲🏻🤲🏻🤲🏻临时重定向一定要能重定向🤲🏻🤲🏻🤲🏻
java·http·源码
2501_915918411 小时前
Web 前端可视化开发工具对比 低代码平台、可视化搭建工具、前端可视化编辑器与在线可视化开发环境的实战分析
前端·低代码·ios·小程序·uni-app·编辑器·iphone
程序员的世界你不懂2 小时前
【Flask】测试平台开发,新增说明书编写和展示功能 第二十三篇
java·前端·数据库
星空寻流年2 小时前
设计模式第一章(建造者模式)
java·设计模式·建造者模式
索迪迈科技2 小时前
网络请求库——Axios库深度解析
前端·网络·vue.js·北京百思可瑞教育·百思可瑞教育
gnip2 小时前
JavaScript二叉树相关概念
前端
gb42152873 小时前
java中将租户ID包装为JSQLParser的StringValue表达式对象,JSQLParser指的是?
java·开发语言·python
曾经的三心草3 小时前
Python2-工具安装使用-anaconda-jupyter-PyCharm-Matplotlib
android·java·服务器
Metaphor6923 小时前
Java 高效处理 Word 文档:查找并替换文本的全面指南
java·经验分享·word
attitude.x3 小时前
PyTorch 动态图的灵活性与实用技巧
前端·人工智能·深度学习