samba vfs_ceph: client_mds_namespace not working?
Dear all, maybe someone has experienced this before. We are setting up a SAMBA gateway and would like to use the vfs_ceph module. In case of several file systems one needs to choose an mds namespace. There is an option in ceph.conf: client mds namespace = CEPH-FS-NAME Unfortunately, it seems not to work. I tried it in all possible versions, in [global] and [client], with and without "client" at the beginning, to no avail. I either get a time out or an error. I also found the libcephfs function ceph_select_filesystem(cmount, CEPH-FS-NAME) added it to vfs_ceph.c just before the ceph_mount with the same result, I get an error (operation not permitted). Does anyone know how to get this to work? And, yes, I tested an ordinary kernel fs mount with the credentials for the ceph client without problems. I can't access any documentation on the libcephfs api, I always get a page not found error. My last resort is now to ceph fs set-default CEPH-FS-NAME to the fs to be used and live with the implied restrictions and ugliness. Best regards, ================= Frank Schilder AIT Risø Campus Bygning 109, rum S14
Update: setting "ceph fs set-default CEPH-FS-NAME" allows to do a kernel fs mount without providing the mds_namespace mount option, but the vfs_ceph module still fails with either cephwrap_connect: [CEPH] Error return: Operation not permitted or cephwrap_connect: [CEPH] Error return: Operation not supported depending on whether I use ceph:user_id = USER-NAME or ceph:user_id = client.USER-NAME I guess the second user spec is correct as the first error message indicates an auth problem. On the client side I see the same message in both cases: tree connect failed: NT_STATUS_UNSUCCESSFUL Best regards, ================= Frank Schilder AIT Risø Campus Bygning 109, rum S14 ________________________________________ From: Frank Schilder <frans@dtu.dk> Sent: 23 September 2020 11:00:50 To: ceph-users Subject: [ceph-users] samba vfs_ceph: client_mds_namespace not working? Dear all, maybe someone has experienced this before. We are setting up a SAMBA gateway and would like to use the vfs_ceph module. In case of several file systems one needs to choose an mds namespace. There is an option in ceph.conf: client mds namespace = CEPH-FS-NAME Unfortunately, it seems not to work. I tried it in all possible versions, in [global] and [client], with and without "client" at the beginning, to no avail. I either get a time out or an error. I also found the libcephfs function ceph_select_filesystem(cmount, CEPH-FS-NAME) added it to vfs_ceph.c just before the ceph_mount with the same result, I get an error (operation not permitted). Does anyone know how to get this to work? And, yes, I tested an ordinary kernel fs mount with the credentials for the ceph client without problems. I can't access any documentation on the libcephfs api, I always get a page not found error. My last resort is now to ceph fs set-default CEPH-FS-NAME to the fs to be used and live with the implied restrictions and ugliness. Best regards, ================= Frank Schilder AIT Risø Campus Bygning 109, rum S14 _______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io
On 2020-09-23 11:00, Frank Schilder wrote:
Dear all,
maybe someone has experienced this before. We are setting up a SAMBA gateway and would like to use the vfs_ceph module. In case of several file systems one needs to choose an mds namespace. There is an option in ceph.conf:
client mds namespace = CEPH-FS-NAME
Unfortunately, it seems not to work. I tried it in all possible versions, in [global] and [client], with and without "client" at the beginning, to no avail. I either get a time out or an error. I also found the libcephfs function
In ceph/src/common/options.cc I found this: Option("client_fs", Option::TYPE_STR, Option::LEVEL_ADVANCED) .set_flag(Option::FLAG_STARTUP) .set_default("") .set_description("CephFS file system name to mount") .set_long_description("Use this with ceph-fuse, or with any process " "that uses libcephfs. Programs using libcephfs may also pass " "the filesystem name into mount(), which will override this setting. " "If no filesystem name is given in mount() or this setting, the default " "filesystem will be mounted (usually the first created)."), /* Alias for client_fs. Deprecated */ Option("client_mds_namespace", Option::TYPE_STR, Option::LEVEL_DEV) .set_flag(Option::FLAG_STARTUP) .set_default(""), So the client_mds_namespace is deprecated, and maybe even removed? Does it work if you specify "client_fs"? Gr. Stefan
Hi Stefan, thanks for your answer. I think the deprecated option is still supported and I found something else - I will update to the new option though. On the ceph side, I see in the log now: client session with non-allowable root '/' denied (client.31382084 192.168.48.135:0/2576875769) It looks like the path option of vfs_ceph is not passed on correctly. I did neither try nor allow to mount the root itself, but a sub-directory. It looks like one of the combinations I tested works, but the path into the ceph fs is not used. The option I use is: path = /shares/FOLDER-NAME and this should show up in the client session as root '/shares/FOLDER-NAME'. Starts looking like a bug in vfs_ceph.c . Best regards, ================= Frank Schilder AIT Risø Campus Bygning 109, rum S14 ________________________________________ From: Stefan Kooman <stefan@bit.nl> Sent: 23 September 2020 11:49:29 To: Frank Schilder; ceph-users Subject: Re: [ceph-users] samba vfs_ceph: client_mds_namespace not working? On 2020-09-23 11:00, Frank Schilder wrote:
Dear all,
maybe someone has experienced this before. We are setting up a SAMBA gateway and would like to use the vfs_ceph module. In case of several file systems one needs to choose an mds namespace. There is an option in ceph.conf:
client mds namespace = CEPH-FS-NAME
Unfortunately, it seems not to work. I tried it in all possible versions, in [global] and [client], with and without "client" at the beginning, to no avail. I either get a time out or an error. I also found the libcephfs function
In ceph/src/common/options.cc I found this: Option("client_fs", Option::TYPE_STR, Option::LEVEL_ADVANCED) .set_flag(Option::FLAG_STARTUP) .set_default("") .set_description("CephFS file system name to mount") .set_long_description("Use this with ceph-fuse, or with any process " "that uses libcephfs. Programs using libcephfs may also pass " "the filesystem name into mount(), which will override this setting. " "If no filesystem name is given in mount() or this setting, the default " "filesystem will be mounted (usually the first created)."), /* Alias for client_fs. Deprecated */ Option("client_mds_namespace", Option::TYPE_STR, Option::LEVEL_DEV) .set_flag(Option::FLAG_STARTUP) .set_default(""), So the client_mds_namespace is deprecated, and maybe even removed? Does it work if you specify "client_fs"? Gr. Stefan
participants (2)
-
Frank Schilder
-
Stefan Kooman