Gluster install w/ samba share

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

macrules34

Active Member
Mar 18, 2016
407
28
28
40
I have a 4 node gluster array(Ubuntu OS-2x 1TB drives per node) . I have created one volume that is started and in good status. The issue that I'm having is that I'm trying to make a SAMBA share from this volume and it gives me trouble. It is mounted to /mnt/gluster-drive. What should I be entering for the path to mount this volume on another linux machine?

Below is the SAMBA entry for this volume:
[gluster-vol1]
comment = For samba share of volume vol1
guest ok = Yes
path = /
read only = No
vfs objects = glusterfs
glusterfs:loglevel = 7
glusterfs:logfile = /var/log/samba/glusterfs-vol1.%M.log
glusterfs:volume = vol1
 

EffrafaxOfWug

Radioactive Member
Feb 12, 2015
1,394
511
113
If when you say "samba entry" you mean a share definition in smb.conf, why is the path set to / and not to /mnt/gluster-drive ?

If you want to mount it on another machine you'll need to either add an entry to fstab for mounting a remote CIFS path, or use a user-level mounting system.
 

amalurk

Active Member
Dec 16, 2016
311
116
43
102
Haven't tried this but.....I believe you can NFS mount from windows to the gluster cluster without needing Samba by using the NFS Client that is in Windows called Services for NFS or something that is an optional Windows component.
 

macrules34

Active Member
Mar 18, 2016
407
28
28
40
@EffrafaxOfWug When I say "entry" I mean a section of the smb.conf file, I can post the entire file if it will be helpful. The path was auto set to /, I didn't set that, I thought that was odd. So I will change it. When I go to mount it as a cifs in my sles linux box I use <server IP>:/<what do I put here?>, /mnt/gluster-drive?

@amalurk I'm using a SLES Linux as a client not Windows.
 

whitey

Moderator
Jun 30, 2014
2,766
868
113
41
If you are using Suse Linux why not mount native gluster or even NFS, gluster being preferred of course unless you have gluster/NFS-Ganesha/corosync/pacemaker HA setup?

EDIT: On CentOS 7.x it would be the following: (example from my glusterfs testing/playground)

Code:
yum -y install glusterfs-client
mount -t glusterfs gluster1:/gv0 /mnt/glusterfs/
This way you benefit from the clustered nature of distributed/replicated glusterfs setup and can survive node failure that is resilient WRT your replica level.
 
Last edited:

amalurk

Active Member
Dec 16, 2016
311
116
43
102
@EffrafaxOfWug When I say "entry" I mean a section of the smb.conf file, I can post the entire file if it will be helpful. The path was auto set to /, I didn't set that, I thought that was odd. So I will change it. When I go to mount it as a cifs in my sles linux box I use <server IP>:/<what do I put here?>, /mnt/gluster-drive?

@amalurk I'm using a SLES Linux as a client not Windows.
Well now I am even more confused why you want SAMBA in the first place.
 

macrules34

Active Member
Mar 18, 2016
407
28
28
40
I'm using samba because I'm having trouble finding the client software for my OS level. SLES 12 SP1.

On the client I'm using:
"sudo mount -t cifs "//<server IP>/gluster-vol1" /srv/install/OS -o user=<username>

The error I get is:
mount error (6): No such device or address

From my client host I run "smbclient -L <IP of Samba server> and get the following:

Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.7.6-Ubuntu]

Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
gluster-vol1 Disk For samba share of volume vol1
IPC$ IPC IPC Service (roadrunner server (Samba, Ubuntu))
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.7.6-Ubuntu]

Server Comment
--------- -------
FREENAS FreeNAS Server
ROADRUNNER roadrunner server (Samba, Ubuntu)

Workgroup Master
--------- -------
WORKGROUP FREENAS
 
Last edited:

macrules34

Active Member
Mar 18, 2016
407
28
28
40
Here are the permissions for the shared directory:
drwxr-xr-x 3 root root 4096 Aug 28 14:04 gluster-drive

Here is the output of the df -h command:
localhost:/vol1 899G 9.0G 891G 2% /mnt/gluster-drive
 

macrules34

Active Member
Mar 18, 2016
407
28
28
40
I am able to see the server and the share in a windows box but it errors out when I click on it to open it, no prompt for for a user name and password. Any ideas? Any file that would help in this diagnosis?
 
Last edited:

macrules34

Active Member
Mar 18, 2016
407
28
28
40
When I run: smbclient '\\<server IP>\gluster-vol1' -U <username>

I get this in return:
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.7.6-Ubuntu]

tree connect failed: NT_STATUS_BAD_NETWORK_NAME


 

amalurk

Active Member
Dec 16, 2016
311
116
43
102
Sure seems like native gluster client has to be doable on SLES too, how about this gluster/glusterfs-suse
If not then I would go NFS like whitey suggested above.

Doesn't SLES have included support that could be contacted?

SAMBA, a clone of windows functionality to connect two linux boxes just seems like the wrong way to do it.
 

macrules34

Active Member
Mar 18, 2016
407
28
28
40
I have switched over to using NFS but I'm still running into issue that I'm hopping you can help me resolve. I am able to mount the root (/) directory to my client but am unable to mount my share "gluster-drive". I get the error: mount.nfs4 mounting <server IP>:/mnt/gluster-drive failed, reason given by server: No such file or directory.

I have the following entry in /etc/exports:
/mnt/gluster-drive <client IP>(rw,sync,no_root_squash)
 

macrules34

Active Member
Mar 18, 2016
407
28
28
40
That didn't work, I got the mount.nfs4 mounting <server IP>:/mnt/gluster-drive failed, reason given by server: No such file or directory. error agian.

Its funny because it will let me mount it when the gluster drive isn't mounted to the share directory.
 

amalurk

Active Member
Dec 16, 2016
311
116
43
102
Sorry I am out of ideas. Your should read the documentation more closely. It says nfsv3 in docs and you are trying v4. There are clearly other problems with the connection like it is not exported right but, I do not have a similar enviroment to help further. I still find in unbelive that you cannot just install the gluster-client and use that, there has to be packages for SUSE and that would give you automatic failover to other nodes.
 

macrules34

Active Member
Mar 18, 2016
407
28
28
40
NFS v4 is what is installed on my server when I installed the NFS server package.

As for the gluster client, I can't find it for Suse linux 12 SP1, the closest I can find it Suse linux 12 SP3.
 

whitey

Moderator
Jun 30, 2014
2,766
868
113
41
Use a more recent Suse distro that has gluster-client in it (zypper install glusterfs-client) else did you follow this rough guidance/flow for NFS?

Server/client
zypper install nfs-utils
Setup /etc/exports (looks like you did it correct I believe)
Mount to first headnode/brick IP

If all else fails I could re-produce EXACT steps on CentOS to show ya how to get his working if you were willing to move to CentOS. I do have NFS mount to gluster working to single head/gluster node over NFS v3/v4 to my vSphere 6.5 cluster. Kinda defeats the purpose of gluster IMHO though, hence gluster NFS-ganesha reference.

Here are some other cmds that I am not sure if were really necessary or not but I kept getting r/o issues initially on NFS mount and forget how I resolved this in the end. May be good to re-produce anyways.

gluster volume info
gluster volume set gv0 nfs.disable off
gluster volume set gv0 nfs.volume-access read.write
gluster volume set gv0 nfs.export-dir /data/brick1/gv0
gluster volume info (to verify changes)

EDIT: You 'may' also be hitting a FW issue, did you try hammer approach first? I did this in a fit of rage/laziness on my CentOS gluster nodes.

systemctl disable firewalld
systemctl stop firewalld
 
Last edited: