安装ceph失败,出现“安装错误5 =输入/输出错误”

时间:2021-01-10 12:34:44

I have tried to create a ceph filesystem in a single host, for testing purposes, with the following conf file

我尝试在单个主机中创建一个ceph文件系统,用于测试目的,使用以下conf文件

[global]
        log file = /var/log/ceph/$name.log
        pid file = /var/run/ceph/$name.pid
[mon]
        mon data = /srv/ceph/mon/$name
[mon.mio]
host = penny
mon addr = 127.0.0.1:6789
[mds]
[mds.mio]
host = penny
[osd]
osd data = /srv/ceph/osd/$name
osd journal = /srv/ceph/osd/$name/journal
osd journal size = 1000 ; journal size, in megabytes
[osd.0]
host = penny
devs = /dev/loop1

/dev/loop1 is formatted with XFS and is actually a file with 500Mbs (although that shouldn't matter much) Everything works pretty much OK, and health shows:

/ dev / loop1使用XFS格式化,实际上是一个500Mbs的文件(虽然这不应该太重要)一切正常,健康显示:

 sudo ceph -s
2013-12-12 21:14:44.387240    pg v111: 198 pgs: 198 active+clean; 8730 bytes data, 79237 MB used, 20133 MB / 102 GB avail
2013-12-12 21:14:44.388542   mds e6: 1/1/1 up {0=mio=up:active}
2013-12-12 21:14:44.388605   osd e3: 1 osds: 1 up, 1 in
2013-12-12 21:14:44.388738   log 2013-12-12 21:14:32.739326 osd.0 127.0.0.1:6801/8834 181 : [INF] 2.30 scrub ok
2013-12-12 21:14:44.388922   mon e1: 1 mons at {mio=127.0.0.1:6789/0}

but when I try to mount the filesystem

但是当我尝试挂载文件系统时

sudo mount -t ceph penny:/ /mnt/ceph
mount error 5 = Input/output error

Usual answers point to ceph-mds not running, but it's actually working:

通常的答案指向ceph-mds没有运行,但它实际上正在工作:

root      8771  0.0  0.0 574092  4376 ?        Ssl  20:43   0:00 /usr/bin/ceph-mds -i mio -c /etc/ceph/ceph.conf

In fact, I managed to make it work previously using these instructions http://blog.bob.sh/2012/02/basic-ceph-storage-kvm-virtualisation.html verbatim previously, but after I tried again I obtained the same problem. Any idea of what might have failed?

事实上,我之前使用这些说明http://blog.bob.sh/2012/02/basic-ceph-storage-kvm-virtualisation.html逐字地设法使其工作,但在我再次尝试之后我获得了相同的问题。什么可能失败的想法?

Update as indicated by the comment, dmesg shows a problem

更新如评论所示,dmesg显示问题

[ 6715.712211] libceph: mon0 [::1]:6789 connection failed
[ 6725.728230] libceph: mon1 127.0.1.1:6789 connection failed

1 个解决方案

#1


1  

Try to use 127.0.0.1. It looks like the kernel is resolving the hostname, but 127.0.1.1 is weird, and maybe it isn't responding to IPv6 loopback.

尝试使用127.0.0.1。看起来内核正在解析主机名,但127.0.1.1很奇怪,也许它没有响应IPv6环回。

#1


1  

Try to use 127.0.0.1. It looks like the kernel is resolving the hostname, but 127.0.1.1 is weird, and maybe it isn't responding to IPv6 loopback.

尝试使用127.0.0.1。看起来内核正在解析主机名,但127.0.1.1很奇怪,也许它没有响应IPv6环回。