Mahesh Taluru
2020-Sep-01 18:25 UTC
[Samba] Unable to create subdirectories/files in samba mount when using vfs objects = glusterfs
Hi Team, I am trying to setup a samba CTDB cluster to export gluster volme as samba share. While CTDB cluster works well, I ran into an issue with creating subdirectories and also creating files/directories within subdictories when accessing the share from both linux and windows servers. Setup details : We have a three node cluster with nodes snode1, snode2 and snode3. I have a gluster volume named smbshare32 exported as samba share using vfs objects = glusterfs (libgfapi). When I mount the share on linux, I am able to create files/directories in the root of the mount point i.e under /smbshare32. [root at sclient1 /]# df -h /smbshare32 Filesystem Size Used Avail Use% Mounted on //10.4.0.31/gluster-smbshare32 600G 6.1G 594G 2% /smbshare32 [root at sclient1 /]# [root at sclient1 /]# cd /smbshare32 [root at sclient1 smbshare32]# ls [root at sclient1 smbshare32]# mkdir subdir1 [root at sclient1 smbshare32]# touch a [root at sclient1 smbshare32]# ls a subdir1 [root at sclient1 smbshare32]# When I switch to subdir1, I cannot create files or directories. Same issue happens on windows , but I get a different error message it says ?the file ? ? is too large for the destination file system. [root at sclient1 smbshare32]# cd subdir1/ [root at sclient1 subdir1]# touch a touch: setting times of ?a?: Invalid argument [root at sclient1 subdir1]# mkdir subdir2 mkdir: cannot create directory ?subdir2?: Invalid argument [root at sclient1 subdir1]# Below two scenarios works well: If I mount the cifs mount on the client using vers 1.0 , I am able to create files and directories. //10.4.0.31/gluster-smbshare32 /smbshare32 cifs vers=1.0,credentials=/etc/smbclient.passwd 0 0 [root at sclient1 /]# cd /smbshare32 [root at sclient1 smbshare32]# ls a subdir1 [root at sclient1 smbshare32]# cd subdir1/ [root at sclient1 subdir1]# touch a [root at sclient1 subdir1]# mkdir test2 [root at sclient1 subdir1]# Also if I mount the gluster volume using fuse and then export the fuse mount as samba share, I have no issues creating file/directories. We would prefer accessing the gluster volume using vfs_glusterfs and also use the latest SMB protocol version. Could you please let me know if I missed some configuration. I have mounted the gluster volume using fuse and set below ACLs as for the volume. [root at snode3 /]# getfacl /share getfacl: Removing leading '/' from absolute path names # file: share # owner: smbtest # group: smbtest user::rwx user:smbtest:rwx group::r-x group:smbtest:rwx mask::rwx other::r-x default:user::rwx default:user:smbtest:rwx default:group::r-x default:mask::rwx default:other::r-x [root at snode3 /]# Samba config file. [global] workgroup = SAMBA security = user passdb backend = tdbsam printing = cups printcap name = cups load printers = yes cups options = raw clustering = yes min protocol = NT1 [homes] comment = Home Directories valid users = %S, %D%w%S browseable = No read only = No inherit acls = Yes [printers] comment = All Printers path = /var/tmp printable = Yes create mask = 0600 browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @printadmin root force group = @printadmin create mask = 0664 directory mask = 0775 [gluster-smbshare32] comment = For samba share of volume smbshare32 vfs objects = glusterfs glusterfs:volume = smbshare32 glusterfs:logfile = /var/log/samba/glusterfs-smbshare32.%M.log glusterfs:loglevel = 7 path = / read only = no guest ok = yes kernel share modes = no gluster and samba versions. [root at snode3 /]# rpm -qa|grep -i gluster glusterfs-client-xlators-6.8-1.el7.x86_64 samba-vfs-glusterfs-4.10.4-11.el7_8.x86_64 glusterfs-6.8-1.el7.x86_64 glusterfs-api-6.8-1.el7.x86_64 glusterfs-cli-6.8-1.el7.x86_64 glusterfs-server-6.8-1.el7.x86_64 python2-gluster-6.8-1.el7.x86_64 glusterfs-libs-6.8-1.el7.x86_64 glusterfs-fuse-6.8-1.el7.x86_64 glusterfs-rdma-6.8-1.el7.x86_64 glusterfs-extra-xlators-6.8-1.el7.x86_64 [root at snode3 /]# rpm -qa|grep -i samba samba-libs-4.10.4-11.el7_8.x86_64 samba-vfs-glusterfs-4.10.4-11.el7_8.x86_64 samba-common-4.10.4-11.el7_8.noarch samba-client-libs-4.10.4-11.el7_8.x86_64 samba-common-libs-4.10.4-11.el7_8.x86_64 samba-4.10.4-11.el7_8.x86_64 samba-common-tools-4.10.4-11.el7_8.x86_64 [root at snode3 /]# Regards Mahesh Taluru
Rowland penny
2020-Sep-01 19:00 UTC
[Samba] Unable to create subdirectories/files in samba mount when using vfs objects = glusterfs
On 01/09/2020 19:25, Mahesh Taluru via samba wrote:> Hi Team, > > > > I am trying to setup a samba CTDB cluster to export gluster volme as samba share. While CTDB cluster works well, I ran into an issue with creating subdirectories and also creating files/directories within subdictories when accessing the share from both linux and windows servers. > > >Please do not keep posting the same question multiple times (3 times when you were not registered, then once to samba-technical and twice here). If someone knows the answer to your problem (sorry, but I do not), they will answer in due course. Please be patient until this happens. Rowland
Anoop C S
2020-Sep-03 07:10 UTC
[Samba] Unable to create subdirectories/files in samba mount when using vfs objects = glusterfs
Looks like I missed this thread and replied privately. Anyways, refer GlusterFS GitHub issue #1392[1] for details. [1] https://github.com/gluster/glusterfs/issues/1392 On Tue, 2020-09-01 at 13:25 -0500, Mahesh Taluru via samba wrote:> Hi Team, > > > > I am trying to setup a samba CTDB cluster to export gluster volme as > samba share. While CTDB cluster works well, I ran into an issue with > creating subdirectories and also creating files/directories within > subdictories when accessing the share from both linux and windows > servers. > > > > Setup details : > > > > We have a three node cluster with nodes snode1, snode2 and snode3. I > have a gluster volume named smbshare32 exported as samba share using > vfs objects = glusterfs (libgfapi). When I mount the share on linux, > I am able to create files/directories in the root of the mount point > i.e under /smbshare32. > > > > [root at sclient1 /]# df -h /smbshare32 > > Filesystem Size Used Avail Use% Mounted on > > //10.4.0.31/gluster-smbshare32 600G 6.1G 594G 2% /smbshare32 > > [root at sclient1 /]# > > > > [root at sclient1 /]# cd /smbshare32 > > [root at sclient1 smbshare32]# ls > > [root at sclient1 smbshare32]# mkdir subdir1 > > [root at sclient1 smbshare32]# touch a > > [root at sclient1 smbshare32]# ls > > a subdir1 > > [root at sclient1 smbshare32]# > > > > When I switch to subdir1, I cannot create files or directories. Same > issue happens on windows , but I get a different error message it > says ?the file ? ? is too large for the destination file system. > > > > [root at sclient1 smbshare32]# cd subdir1/ > > [root at sclient1 subdir1]# touch a > > touch: setting times of ?a?: Invalid argument > > [root at sclient1 subdir1]# mkdir subdir2 > > mkdir: cannot create directory ?subdir2?: Invalid argument > > [root at sclient1 subdir1]# > > > > Below two scenarios works well: > > > > If I mount the cifs mount on the client using vers 1.0 , I am able to > create files and directories. > > > > //10.4.0.31/gluster-smbshare32 /smbshare32 > cifs vers=1.0,credentials=/etc/smbclient.passwd 0 0 > > > > [root at sclient1 /]# cd /smbshare32 > > [root at sclient1 smbshare32]# ls > > a subdir1 > > [root at sclient1 smbshare32]# cd subdir1/ > > [root at sclient1 subdir1]# touch a > > [root at sclient1 subdir1]# mkdir test2 > > [root at sclient1 subdir1]# > > > > Also if I mount the gluster volume using fuse and then export the > fuse mount as samba share, I have no issues creating > file/directories. We would prefer accessing the gluster volume > using vfs_glusterfs and also use the latest SMB protocol version. > > > > Could you please let me know if I missed some configuration. > > > > I have mounted the gluster volume using fuse and set below ACLs as > for the volume. > > > > [root at snode3 /]# getfacl /share > > getfacl: Removing leading '/' from absolute path names > > # file: share > > # owner: smbtest > > # group: smbtest > > user::rwx > > user:smbtest:rwx > > group::r-x > > group:smbtest:rwx > > mask::rwx > > other::r-x > > default:user::rwx > > default:user:smbtest:rwx > > default:group::r-x > > default:mask::rwx > > default:other::r-x > > > > [root at snode3 /]# > > > > > > Samba config file. > > > > [global] > > workgroup = SAMBA > > security = user > > > > passdb backend = tdbsam > > printing = cups > > printcap name = cups > > load printers = yes > > cups options = raw > > clustering = yes > > min protocol = NT1 > > > > [homes] > > comment = Home Directories > > valid users = %S, %D%w%S > > browseable = No > > read only = No > > inherit acls = Yes > > > > [printers] > > comment = All Printers > > path = /var/tmp > > printable = Yes > > create mask = 0600 > > browseable = No > > > > [print$] > > comment = Printer Drivers > > path = /var/lib/samba/drivers > > write list = @printadmin root > > force group = @printadmin > > create mask = 0664 > > directory mask = 0775 > > > > [gluster-smbshare32] > > comment = For samba share of volume smbshare32 > > vfs objects = glusterfs > > glusterfs:volume = smbshare32 > > glusterfs:logfile = /var/log/samba/glusterfs-smbshare32.%M.log > > glusterfs:loglevel = 7 > > path = / > > read only = no > > guest ok = yes > > kernel share modes = no > > > > gluster and samba versions. > > > > [root at snode3 /]# rpm -qa|grep -i gluster > > glusterfs-client-xlators-6.8-1.el7.x86_64 > > samba-vfs-glusterfs-4.10.4-11.el7_8.x86_64 > > glusterfs-6.8-1.el7.x86_64 > > glusterfs-api-6.8-1.el7.x86_64 > > glusterfs-cli-6.8-1.el7.x86_64 > > glusterfs-server-6.8-1.el7.x86_64 > > python2-gluster-6.8-1.el7.x86_64 > > glusterfs-libs-6.8-1.el7.x86_64 > > glusterfs-fuse-6.8-1.el7.x86_64 > > glusterfs-rdma-6.8-1.el7.x86_64 > > glusterfs-extra-xlators-6.8-1.el7.x86_64 > > [root at snode3 /]# rpm -qa|grep -i samba > > samba-libs-4.10.4-11.el7_8.x86_64 > > samba-vfs-glusterfs-4.10.4-11.el7_8.x86_64 > > samba-common-4.10.4-11.el7_8.noarch > > samba-client-libs-4.10.4-11.el7_8.x86_64 > > samba-common-libs-4.10.4-11.el7_8.x86_64 > > samba-4.10.4-11.el7_8.x86_64 > > samba-common-tools-4.10.4-11.el7_8.x86_64 > > [root at snode3 /]# > > > > Regards > > > > Mahesh Taluru > > >