Cephfs : cannot mount external ceph cluster with non root path

kifeo

Well-Known Member
Oct 28, 2019
114
14
58
I try to mount an external ceph cluster with cephfs for backups.

I can mount the cephfs with a path capability of /, but not with a /some/path

It gives me a :
Feb 04 14:19:32 proxmox-bl2 kernel: libceph: client1148949 fsid dc87f194-4577-11ed-b69c-3cfdfeafecb8
Feb 04 14:19:32 proxmox-bl2 mount[3466036]: mount error 13 = Permission denied

The only thing that changes during the two is the mds path capability in the auth on the external ceph cluster.

Has anyone managed to do it ?

Thanks
 
Hello,
I tried to reproduce your Issue, but it worked for me.
Atleast if I understood you correctly.


What i did:
On the Cluster:
-install Ceph
-create monitors and managers
-create OSDs
-create Metadataserver and cephfs

then

Bash:
mkdir -p /mnt/pve/cephfs/some/path
ceph fs authorize cephfs client.test /some/path rw
ceph auth get client.test -o /tmp/ceph.client.test.keyring
scp /tmp/ceph.client.test.keyring <usr>@<client>:/etc/ceph/ceph.client.test.keyring

If this works
Code:
ceph fsid
then copy the fsid displayed.


After that on the client:

Write into the file
Code:
/etc/ceph/ceph.conf
the following code
Code:
[global]
fsid = <fsid>
mon_host = <mon-ip1>,<mon-ip2>,<mon-ip3>
where <mon-ipx> are the Adresses of the Cluster Monitors and <fsid> is the fsid copied before.

At last
Bash:
chmod 600 /etc/ceph/ceph.client.test.keyring
mount -t ceph <mon-ip1>,<mon-ip2>,<mon-ip3>:/some/path /mnt \
  -o name=test,mds_namespace=cephfs

Now
Bash:
touch bsp.txt
on your client should be visible under
Bash:
ls /mnt/pve/cephfs/some/path/
on the cluster.

Now of course test and /some/path should be replaceable.

I hope this is what you were trying to achieve and if yes, that it works for you.