[Samba] Unable to create subdirectories/files in samba mount when using vfs objects = glusterfs
Anoop C S
anoopcs at samba.org
Thu Sep 3 07:10:16 UTC 2020
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
>
>
>
More information about the samba
mailing list