Gluster install w/ samba share

Discussion in 'Linux Admins, Storage and Virtualization' started by macrules34, Aug 27, 2018.

  1. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    221
    Likes Received:
    4
    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
     
    #1
  2. EffrafaxOfWug

    EffrafaxOfWug Radioactive Member

    Joined:
    Feb 12, 2015
    Messages:
    710
    Likes Received:
    249
    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.
     
    #2
  3. amalurk

    amalurk Member

    Joined:
    Dec 16, 2016
    Messages:
    101
    Likes Received:
    12
    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.
     
    #3
  4. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    221
    Likes Received:
    4
    @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.
     
    #4
  5. whitey

    whitey Moderator

    Joined:
    Jun 30, 2014
    Messages:
    2,735
    Likes Received:
    847
    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.
     
    #5
    Last edited: Aug 27, 2018
  6. amalurk

    amalurk Member

    Joined:
    Dec 16, 2016
    Messages:
    101
    Likes Received:
    12
    Well now I am even more confused why you want SAMBA in the first place.
     
    #6
  7. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    221
    Likes Received:
    4
    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
     
    #7
    Last edited: Aug 28, 2018
  8. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    221
    Likes Received:
    4
    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
     
    #8
  9. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    221
    Likes Received:
    4
    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?
     
    #9
    Last edited: Aug 29, 2018
  10. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    221
    Likes Received:
    4
    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


     
    #10
  11. amalurk

    amalurk Member

    Joined:
    Dec 16, 2016
    Messages:
    101
    Likes Received:
    12
    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.
     
    #11
  12. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    221
    Likes Received:
    4
    Yes but you have to pay for their support.
     
    #12
  13. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    221
    Likes Received:
    4
    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)
     
    #13
  14. amalurk

    amalurk Member

    Joined:
    Dec 16, 2016
    Messages:
    101
    Likes Received:
    12
    #14
  15. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    221
    Likes Received:
    4
    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.
     
    #15
  16. amalurk

    amalurk Member

    Joined:
    Dec 16, 2016
    Messages:
    101
    Likes Received:
    12
    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.
     
    #16
  17. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    221
    Likes Received:
    4
    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.
     
    #17
  18. whitey

    whitey Moderator

    Joined:
    Jun 30, 2014
    Messages:
    2,735
    Likes Received:
    847
    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
     
    #18
    Last edited: Sep 1, 2018
  19. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    221
    Likes Received:
    4
    Is that the path to the nfs shared directory?
     
    #19
  20. whitey

    whitey Moderator

    Joined:
    Jun 30, 2014
    Messages:
    2,735
    Likes Received:
    847
    Yes that matches /etc/exports exported dir
     
    #20
Similar Threads: Gluster install
Forum Title Date
Linux Admins, Storage and Virtualization PXE Booting SLES 12 SP1 install Aug 20, 2018
Linux Admins, Storage and Virtualization Datasets on my root ZFS mirror - allocating space for Proxmox install and data Jul 2, 2018
Linux Admins, Storage and Virtualization Do ProxMox have a console for installing Windows? Jan 29, 2018
Linux Admins, Storage and Virtualization Proxmox Install Issue -- No country? Jun 26, 2017
Linux Admins, Storage and Virtualization Ubuntu 16.04.2 LTS Server and Mellanox ConnectX-3 installation WTF? May 18, 2017

Share This Page