按照官方文档搭建ceph集群碰到如下问题:
执行ceph-deploy mon create-initial 创建监控节点。
错误1:
[ceph-node4][INFO ] Running command: sudo initctl emit ceph-mon cluster=ceph id=ceph-node4
[ceph-node4][ERROR ] Traceback (most recent call last):
[ceph-node4][ERROR ] File "/usr/lib/python2.7/dist-packages/ceph_deploy/lib/vendor/remoto/process.py", line 94, in run
[ceph-node4][ERROR ] reporting(conn, result, timeout)
[ceph-node4][ERROR ] File "/usr/lib/python2.7/dist-packages/ceph_deploy/lib/vendor/remoto/log.py", line 13, in reporting
[ceph-node4][ERROR ] received = result.receive(timeout)
[ceph-node4][ERROR ] File "/usr/lib/python2.7/dist-packages/ceph_deploy/lib/vendor/remoto/lib/vendor/execnet/gateway_base.py", line 704, in receive
[ceph-node4][ERROR ] raise self._getremoteerror() or EOFError()
[ceph-node4][ERROR ] RemoteError: Traceback (most recent call last):
[ceph-node4][ERROR ] File "<string>", line 1036, in executetask
[ceph-node4][ERROR ] File "<remote exec>", line 12, in _remote_run
[ceph-node4][ERROR ] File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
[ceph-node4][ERROR ] errread, errwrite)
[ceph-node4][ERROR ] File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
[ceph-node4][ERROR ] raise child_exception
[ceph-node4][ERROR ] OSError: [Errno 2] No such file or directory
[ceph-node4][ERROR ]
[ceph-node4][ERROR ]
[ceph_deploy.mon][ERROR ] Failed to execute command: initctl emit ceph-mon cluster=ceph id=ceph-node4
[ceph_deploy][ERROR ] GenericError: Failed to create 1 monitors
原因是ceph-node4节点没有安装initial,通过apt-get install upstart即可安装解决。如果依然出现
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
需要执行:
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
#后面部署OSD同理。
错误2:
[ceph-node4][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph-node4.asok mon_status
[ceph-node4][ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
原因:如果额外增加就不要用这个命令添加监控节点;如果是部署的第一台监控节点,需要检查节点上的ceph服务是否启动。