A GlusterFS volume can serve Linux clients directly while Windows and macOS users still need an SMB/CIFS share name. Exporting the mounted volume through Samba gives those clients a normal network share without asking them to install the native GlusterFS client.
This setup uses one Samba gateway host with a GlusterFS FUSE mount under /srv/gluster. Samba then exports that local mount point from /etc/samba/smb.conf, so the share depends on both the GlusterFS mount and the smbd service being active on the gateway.
Use a single gateway for a small deployment unless clustered Samba with CTDB is already part of the design. The Samba vfs_glusterfs module can access a volume through libgfapi without a FUSE mount when the module is packaged and configured, but the FUSE mount path keeps the share definition portable across package sets and easier to verify with normal Linux tools.
$ sudo gluster volume info volume1 Volume Name: volume1 Type: Replicate Status: Started Number of Bricks: 1 x 2 = 2 Transport-type: tcp Bricks: Brick1: node1:/srv/gluster/brick1 Brick2: node2:/srv/gluster/brick1 ##### snipped #####
Related: How to check GlusterFS volume status
$ sudo apt update && sudo apt install --assume-yes samba smbclient glusterfs-client fuse3 Reading package lists... Done Building dependency tree... Done The following NEW packages will be installed: fuse3 glusterfs-client samba smbclient ##### snipped ##### Setting up glusterfs-client ... Setting up samba ... Setting up smbclient ...
The package names shown match Ubuntu and Debian. On RHEL-family systems, use the equivalent samba, samba-client, glusterfs-fuse, and fuse packages from the enabled repositories.
$ sudoedit /etc/fuse.conf
user_allow_other
The fuse3 package creates /etc/fuse.conf on current Ubuntu systems. Without user_allow_other, the allow_other mount option may be rejected or unavailable to non-root access paths.
$ sudo mkdir -p /srv/gluster/volume1
$ sudo mount -t glusterfs -o allow_other node1:/volume1 /srv/gluster/volume1
Replace node1:/volume1 with a reachable GlusterFS node and an existing volume name. The first node supplies the volume file; the mounted client still talks to the bricks listed by the volume.
$ findmnt -T /srv/gluster/volume1 TARGET SOURCE FSTYPE OPTIONS /srv/gluster/volume1 node1:/volume1 fuse.glusterfs rw,relatime,allow_other
$ sudo groupadd --system gluster-smb $ getent group gluster-smb gluster-smb:x:999:
$ sudo adduser --disabled-password --ingroup gluster-smb --gecos "" smbshare Adding user `smbshare' ... Adding new user `smbshare' (1001) with group `gluster-smb' ... ##### snipped #####
Use existing per-person Unix accounts, domain accounts, or a dedicated service account instead of a shared example user when auditability matters.
$ sudo chgrp gluster-smb /srv/gluster/volume1
$ sudo chmod 2770 /srv/gluster/volume1
The leading 2 keeps new files and directories under the gluster-smb group.
$ sudo smbpasswd -a smbshare New SMB password: Retype new SMB password: Added user smbshare.
$ sudo cp --archive /etc/samba/smb.conf /etc/samba/smb.conf.bak
$ sudoedit /etc/samba/smb.conf
[volume1] comment = GlusterFS volume1 path = /srv/gluster/volume1 browseable = yes read only = no guest ok = no valid users = @gluster-smb force group = gluster-smb create mask = 0660 directory mask = 2770
Do not set guest ok = yes on a writable GlusterFS-backed share unless anonymous network writes are intentional and restricted elsewhere.
$ sudo testparm --suppress-prompt
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback)
Server role: ROLE_STANDALONE
##### snipped #####
[volume1]
comment = GlusterFS volume1
create mask = 0660
directory mask = 02770
force group = gluster-smb
path = /srv/gluster/volume1
read only = No
valid users = @gluster-smb
$ sudo systemctl restart smbd
Restarting smbd can disconnect active SMB clients on the gateway.
$ systemctl is-active smbd active
Related: How to check Samba service status
$ sudo ufw allow from 192.168.1.0/24 to any app Samba Rules updated
Replace 192.168.1.0/24 with the LAN or VPN subnet that should reach the share. Avoid opening Samba to all networks on an internet-facing host.
$ smbclient -L //files.example.net -U smbshare
Password for [WORKGROUP\smbshare]:
Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
volume1 Disk GlusterFS volume1
IPC$ IPC IPC Service (files.example.net server)
SMB1 disabled -- no workgroup available
Replace files.example.net with the Samba gateway hostname or address. The SMB1 disabled line can appear after a successful SMB2 or SMB3 share listing.
Related: How to browse SMB shares with smbclient
$ smbclient //files.example.net/volume1 -U smbshare
Password for [WORKGROUP\smbshare]:
Try "help" to get a list of possible commands.
smb: \> mkdir smoke-test
smb: \> ls
. D 0 Tue Jun 16 09:50:00 2026
.. D 0 Tue Jun 16 09:45:00 2026
smoke-test D 0 Tue Jun 16 09:50:00 2026
123530212 blocks of size 1024. 107116992 blocks available
smb: \> rmdir smoke-test
smb: \> exit
Windows clients can connect to the same share as \\files.example.net\volume1 using an SMB account allowed by valid users.