Unable to add device disk cephfs

Hi,

I try to add a disk device to a container with this command :

lxc config device add container cephfs-data disk source=cephfs:/data path=/cephfs

but, while I can mount* this CephFS on the LXD host, the command return :

Error: Failed to start device "cephfs-data": Unable to mount "a.b.c.d:3300:6789,a.b.c.d:6789,w.x.y.z:6789,s.t.u.v:6789:/" at "/var/snap/lxd/common/lxd/devices/container/disk.cephfs--data.cephfs" with filesystem "ceph": invalid argument

I can see a difference in the ceph node list : the first IP address is present 2 times, with two different ports.

I tried the same command on another host, which can also mount the cephFS filesystem with mount command, but it fails too.

*The mount command (in /etc/fstab) which is running fine :

a.b.c.d:6789,s.t.u.v:6789,a.b.c.d:6789:/data /mnt/data ceph rw,relatime,name=node,acl 0 2

The ultimate goal is to mount this cephFS inside many containers, to share datas.

I think I can first do the mount on the host, and then add a “classical” disk device to containers, but it seems to be a little bit more “dirty”.

Can you show your ceph.conf? There’s something in there which isn’t getting parsed properly by LXD.

Here it is :

cat /etc/ceph/ceph.conf

[global]
        fsid = 575711fc-909c-11ec-afcc-13737cf20988
        mon_host = [v2:a.b.c.d:3300/0,v1:a.b.c.d:6789/0] [v2:w.x.y.z:3300/0,v1:w.x.y.z:6789/0] [v2:s.t.u.v:3300/0,v1:s.t.u.v:6789/0]

What version of LXD are you using?

Feeding your mon_host to our current parser, it’s getting me:

mon=[10.0.0.1:3300 10.0.0.1:6789 10.0.0.2:6789 10.0.0.3:6789] err=<nil>

which looks correct

I use LXD 5.0 : snap 5.0.0-b0287c1 22923

Ah, I see the problem.

1 Like
1 Like