[Gluster-users] samba-vfs-glusterfs share problems
Steve Dainard
sdainard at spd1.com
Wed Dec 2 18:31:16 UTC 2015
Just about to roll this into general use, and realized clients can't
always follow symlinks. I've tried symlinks within the gluster volume
directory tree as well as symlinks to different file systems.
>From a Windows client ALL symlinks appear to be files without extensions.
On Linux clients the symlinks show as proper files/directories only
when the symlinks are to another location on the gluster volume. If
the symlinks are to a different file system samba clients list
nothing.
I've tested a non-VFS share [test] and symlinks are working ok.
# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[home]"
Processing section "[test]"
Loaded services file OK.
Server role: ROLE_DOMAIN_MEMBER
Press enter to see a dump of your service definitions
[global]
workgroup = DOMAIN
realm = DOMAIN.CA
server string = Samba Server Version %v
security = ADS
dedicated keytab file = /etc/krb5.keytab
log file = /var/log/samba/log.%m
max log size = 50
unix extensions = No
load printers = No
printcap name = /dev/null
disable spoolss = Yes
template homedir = /home/%U
template shell = /bin/bash
winbind use default domain = Yes
winbind refresh tickets = Yes
winbind offline logon = Yes
idmap config DOMAIN:range = 4000-300000
idmap config DOMAIN:schema_mode = rfc2307
idmap config DOMAIN:backend = ad
idmap config * : range = 1000-2000
idmap config * : backend = tdb
hosts allow = 127., <>.<>.194.96/27, <>.<>.230.32/27, 10.0.231.0/24
printing = bsd
cups options = raw
print command = lpr -r -P'%p' %s
lpq command = lpq -P'%p'
lprm command = lprm -P'%p' %j
wide links = Yes
[home]
comment = exporting gluster filesystem via gfapi
path = /home/
write list = +users
force group = users
read only = No
create mask = 0660
force directory mode = 0770
kernel share modes = No
vfs objects = glusterfs
glusterfs:loglevel = 7
glusterfs:logfile = /var/log/samba/glusterfs-test.%M.log
glusterfs:volume = storage
glusterfs:volfile_server = 10.0.231.50
[test]
path = /mnt/test/
write list = +users
force group = users
read only = No
create mask = 0660
force directory mode = 0770
I can understand if samba VFS can't link to other filesystems, and I
can work around this, but symlinks on the same gluster volume should
work. I'll open a bug if someone can't see a config issue.
I should mention that smb.conf contains 'follow symlinks = yes' but
doesn't show in testparm, perhaps this is superceeded by 'wide links =
yes'?
OS = Centos 7.1
# rpm -qa | egrep -i 'gluster|samba'
samba-4.1.12-24.el7_1.x86_64
glusterfs-cli-3.6.7-1.el7.x86_64
samba-common-4.1.12-24.el7_1.x86_64
glusterfs-3.6.7-1.el7.x86_64
glusterfs-fuse-3.6.7-1.el7.x86_64
samba-libs-4.1.12-24.el7_1.x86_64
samba-winbind-4.1.12-24.el7_1.x86_64
glusterfs-api-3.6.7-1.el7.x86_64
samba-vfs-glusterfs-4.1.12-24.el7_1.x86_64
samba-winbind-modules-4.1.12-24.el7_1.x86_64
glusterfs-libs-3.6.7-1.el7.x86_64
samba-winbind-clients-4.1.12-24.el7_1.x86_64
Thanks
On Fri, Oct 2, 2015 at 4:42 PM, Steve Dainard <sdainard at spd1.com> wrote:
> Hi Diego,
>
> Awesome, works - much appreciated.
>
> As far as I can search this isn't listed anywhere on the gluster.org
> docs, but there is a link to a blog hosted here:
> https://lalatendumohanty.wordpress.com/2014/02/11/using-glusterfs-with-samba-and-samba-vfs-plugin-for-glusterfs-on-fedora-20/
>
> And it is also documented here:
> https://www.mankier.com/8/vfs_glusterfs for future searches.
>
> On Thu, Oct 1, 2015 at 2:53 PM, Diego Remolina <dijuremo at gmail.com> wrote:
>> On all your shares where you use vfs objects = glusterfs also add the option:
>>
>> kernel share modes = No
>>
>> Then restart samba.
>>
>> Here is one of my example shares:
>>
>> [Projects]
>> path = /projects
>> browseable = yes
>> write list = @Staff,root, at Admin, at Managers
>> writeable = yes
>> guest ok = no
>> create mask = 660
>> directory mask = 770
>> kernel share modes = No
>> vfs objects = glusterfs
>> glusterfs:loglevel = 7
>> glusterfs:logfile = /var/log/samba/glusterfs-projects.log
>> glusterfs:volume = export
>>
>> HTH,
>>
>> Diego
>>
>> On Thu, Oct 1, 2015 at 4:15 PM, Steve Dainard <sdainard at spd1.com> wrote:
>>> samba-vfs-glusterfs-4.1.12-23.el7_1.x86_64
>>> gluster 3.6.6
>>>
>>> I've shared a gluster volume using samba vfs with the options:
>>> vfs objects = glusterfs
>>> glusterfs:volume = test
>>> path = /
>>>
>>> I can do the following:
>>> (Windows client):
>>> -Create new directory
>>> -Create new file -- an error pops up "Unable to create the file 'New
>>> Test Document.txt' The system cannot find the file specified.' BUT the
>>> file is created anyways and shows up in the directory immediately
>>> -Create a new sub directory in the above directory
>>> -Delete or rename any file
>>> (Linux client)
>>> -Create new directory
>>> -Create a new file under sub-directory -- "Device or resource busy"
>>> BUT the file is created anyways - must refresh to see file in GUI
>>> -Delete or rename any file
>>>
>>> Can not do:
>>> (Windows client)
>>> -Edit the new txt file in notepad -- file opens but popup says 'The
>>> process cannot access the file because it is being used by another
>>> process.'
>>> -Create a new file in the above new directory -- "Unable to create the
>>> file 'New Text Document.txt' The system cannot find the file
>>> specified", refreshing the directory doesn't list the file, but if
>>> samba is restarted the client can see the file.
>>> (Linux client)
>>> -Edit the new file -- "Unexpected error: Device or resource busy"
>>>
>>>
>>> I've also shared the same volume via a fuse mount, and have no issues
>>> performing any file operations.
>>>
>>> smb.conf shares:
>>>
>>> [gluster-test-fuse]
>>> comment = exporting gluster filesystem via fuse mount
>>> path = /mnt/gluster/test
>>> read only = no
>>> writable = yes
>>> write list = +users
>>> browseable = yes
>>> guest ok = yes
>>> create mask = 0660
>>> ;directory mask = 0770
>>> force directory mode = 0770
>>> force group = users
>>>
>>> [gluster-test]
>>> comment = exporting gluster filesystem via gfapi
>>> vfs objects = glusterfs
>>> glusterfs:volume = test
>>> glusterfs:logfile = /var/log/samba/glusterfs-test.%M.log
>>> glusterfs:loglevel = 7
>>> path = /
>>> writable = yes
>>> write list = +users
>>> browseable = yes
>>> guest ok = yes
>>> create mask = 0660
>>> ;directory mask = 0770
>>> force directory mode = 0770
>>> force group = users
>>>
>>> Other things of note:
>>>
>>> I have a default ACL on the gluster volume, as well as setgid.
>>>
>>> Anyone else get samba vfs to work properly? I've opened a bugzilla
>>> here: https://bugzilla.redhat.com/show_bug.cgi?id=1268092
>>> _______________________________________________
>>> Gluster-users mailing list
>>> Gluster-users at gluster.org
>>> http://www.gluster.org/mailman/listinfo/gluster-users
More information about the Gluster-users
mailing list