分布式存储ceph常见报错

错误一

执行ceph-deploy mon create-initial时报错的原因
忘记没有切换至my-cluster目录下 切换至my-cluster目录下重新执行就可以
ConfigError: Cannot load config: [Errno 2] No such file or directory: ‘ceph.conf’; has ceph-deploy new been run in this directory?
image.png

错误二

执行ceph-deploy osd create --data /dev/sdb node1是报错的原因没有添加空的磁盘
[ceph_deploy.osd][ERROR ] Failed to execute command: /usr/sbin/ceph-volume --cluster ceph lvm create --bluestore --data /dev/sdb
[ceph_deploy][ERROR ] GenericError: Failed to create 1 OSDs
image.png

错误三

[cephu@centos7u3_1 my-cluster]$ ceph-deploy new node1
Traceback (most recent call last):
File “/bin/ceph-deploy”, line 18, in
from ceph_deploy.cli import main
File “/usr/lib/python2.7/site-packages/ceph_deploy/cli.py”, line 1, in
import pkg_resources
ImportError: No module named pkg_resources
重新安装python的distribution:
下载 distribution : https://pypi.python.org/pypi/distribute
cd distribution-0.7.3/
sudo python setup.py install
distribution下载地址:
https://files.pythonhosted.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip

错误四

[ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or dir
cat /etc/ceph/ceph.conf
添加
public_network= 192.168.122.0/24
推送
ceph-deploy --overwrite-conf config push admin node1 node2 node3
https://www.cnblogs.com/aguncn/p/7352393.html
https://blog.csdn.net/zhydream77/article/details/81041767

错误五:

ceph-deploy osd create --data /dev/vdc node3
[node1][WARNIN] ceph-volume lvm create: error: GPT headers found, they must be removed on: /dev/vdb
[node1][ERROR ] RuntimeError: command returned non-zero exit status: 2
[ceph_deploy.osd][ERROR ] Failed to execute command: /usr/sbin/ceph-volume --cluster ceph lvm create --bluestore --data /dev/vdb
[ceph_deploy][ERROR ] GenericError: Failed to create 1 OSDs
千万不要分区,然后重新加磁盘,重新做
又文档说加上参数也可以但是
ceph-deploy osd create --data /dev/vdc --fs-type xfs node3 不行
[cephu@node1 ~]$ sudo ceph auth get-or-create mgr.node1 mon ‘allow profile mgr’ osd ‘allow *’ mds ‘allow *’
[mgr.node1]
key = AQD8HPdcmntqJRAAlZ3Aeialqq0nVcdcg+axqQ==

错误六

[ceph_deploy][ERROR ] RuntimeError: connecting to host: node1 resulted in errors: IOError cannot send (already closed?)
image.png
出现此错误是没有设置免密码如下设置
打开node的sudoers
vim /etc/sudoers
添加免密码
abc ALL = NOPASSWD: ALL

你可能感兴趣的:(分布式存储ceph常见报错)