Unable to create subdirectories/files in samba mount when using vfs objects = glusterfs

Mahesh Taluru mtaluru87 at gmail.com
Tue Sep 1 13:32:47 UTC 2020

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

//  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.

// /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

[root at snode3 /]# getfacl /share

getfacl: Removing leading '/' from absolute path names

# file: share

# owner: smbtest

# group: smbtest












[root at snode3 /]#

Samba config file.


       workgroup = SAMBA

       security = user

       passdb backend = tdbsam

       printing = cups

       printcap name = cups

       load printers = yes

       cups options = raw

    clustering = yes

    min protocol = NT1


       comment = Home Directories

       valid users = %S, %D%w%S

       browseable = No

       read only = No

       inherit acls = Yes


       comment = All Printers

       path = /var/tmp

       printable = Yes

       create mask = 0600

       browseable = No


       comment = Printer Drivers

       path = /var/lib/samba/drivers

       write list = @printadmin root

       force group = @printadmin

       create mask = 0664

       directory mask = 0775


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












[root at snode3 /]# rpm -qa|grep -i samba








[root at snode3 /]#


Mahesh Taluru

More information about the samba-technical mailing list