Hello Using two file server with samba 4.12.6 running as a CTDB cluster and trying to share a specific path on a cephfs. After loading the config the ctdb log shows the following error: ctdb-eventd[248]: 50.samba: ERROR: samba directory "/plm" not available Here is my samba configuration: [global] clustering = Yes netbios name = FSCLUSTER realm = INT.EXAMPLE.COM registry shares = Yes security = ADS workgroup = INT.EXAMPLE.COM map acl inherit = Yes vfs objects = acl_xattr [plm] guest ok = Yes inherit permissions = Yes kernel share modes = No path = /plm read only = No vfs objects = ceph ceph:config_file = /etc/ceph/ceph.conf ceph:user_id = samba The user samba has the following rights on ceph: [client.samba] key = ... caps mds = "allow r, allow rw path=/plm" caps mon = "allow r" caps osd = "allow rw tag cephfs data=data" And the pool looks like this: drwxrwxrwx 3 root root 1 Sep 10 22:06 plm When changing the path to / (instead of /plm) within the samba config it works. When mounting the share with a client I can see the directory plm. With ceph-fuse I'm able to mount the correct path (/etc/fstab): id=samba,conf=/etc/ceph/ceph.conf,client_mountpoint=/plm /mnt/plm fuse.ceph noatime 0 0 This would be a workaround for me but I would like to share the directory directly with vfs_ceph within samba. Did I miss something? Regards, Jonas
On 21/09/2020 08:55, Jonas via samba wrote:> Hello > > > Using two file server with samba 4.12.6 running as a CTDB cluster and trying to share a specific path on a cephfs. After loading the config the ctdb log shows the following error: > > > ctdb-eventd[248]: 50.samba: ERROR: samba directory "/plm" not available > > > Here is my samba configuration: > > > [global] > clustering = Yes > netbios name = FSCLUSTER > realm = INT.EXAMPLE.COM > registry shares = Yes > security = ADS > workgroup = INT.EXAMPLE.COM > map acl inherit = Yes > vfs objects = acl_xattr > > [plm] > guest ok = Yes > inherit permissions = Yes > kernel share modes = No > path = /plm > read only = No > vfs objects = ceph > ceph:config_file = /etc/ceph/ceph.conf > ceph:user_id = sambaNo idea about the cephs part, but your smb.conf isn't correct, your workgroup shouldn't be the same as the realm, perhaps use 'INT' instead. You have no 'idmap config' lines, how are you going to map your AD users to Unix users ? You have 'guest ok = yes' set in [plm] but you do not have 'map to guest = bad user' set in [global], so guest access will not work. Finally, by setting 'vfs objects = ceph' in [plm], you have turned off acl_xattr on the share. Rowland
"Rowland penny via samba" samba at lists.samba.org ? 21 September 2020 11:03> On 21/09/2020 08:55, Jonas via samba wrote: > No idea about the cephs part, but your smb.conf isn't correct, your > workgroup shouldn't be the same as the realm, perhaps use 'INT' instead. > You have no 'idmap config' lines, how are you going to map your AD users > to Unix users ? You have 'guest ok = yes' set in [plm] but you do not > have 'map to guest = bad user' set in [global], so guest access will not > work. Finally, by setting 'vfs objects = ceph' in [plm], you have turned > off acl_xattr on the share.Sorry, I tried to keep the config as short as possible and deleted and renamed some stuff. Probably not the best idea. Here is the full config: [global] clustering = Yes netbios name = FSCLUSTER realm = INT.EXAMPLE.COM registry shares = Yes security = ADS template shell = /bin/zsh winbind refresh tickets = Yes winbind use default domain = Yes workgroup = INT.EXAMPLE idmap config int.example:range = 1000000-1999999 idmap config int.example:backend = rid idmap config *:range = 10000-19999 idmap config * : backend = tdb map acl inherit = Yes vfs objects = acl_xattr [plm] force create mode = 0770 force directory mode = 0770 force group = "domain users" guest ok = Yes inherit permissions = Yes kernel share modes = No path = /plm read only = No valid users = "@domain users" vfs objects = ceph ceph:config_file = /etc/ceph/ceph.conf ceph:user_id = samba Hope that it is clarified now