In order to serve files via Samba, configure a BeeGFS client host to be a Samba server and re-export the BeeGFS client mount-point via Samba. Samba versions 4.2 and above are recommended.
Add a share definition to file
/etc/samba/smb.conf for the BeeGFS mount-point, as shown in the
example below. For more information on these options, please have a look at the Samba documentation.
comment = BeeGFS file system
public = yes
path = /mnt/beegfs
browsable = yes
writable = yes
read only = no
Restart the samba server service. Now, you should be able to access the BeeGFS file system from a Samba client.
In case you are configuring a Clustered Samba cluster, take the following additional steps.
Add the following definitions to file
clustering = yes
netbios name = BeeGFS *
clustering = yes
idmap config * : backend = autorid
idmap config * : range = 1000000-1999999
vfs objects = fileid
fileid:algorithm = fsid
strict locking = yes
kernel oplocks = yes
blocking locks = yes
mmap = no
When configuring the cluster manager CTDB, add the following settings to
For Samba Versions > 4.8, the recovery lock option
CTDB_RECOVERY_LOCK is moved to
where the following entry must be added:
recovery lock = /mnt/beegfs/.ctdb/reclock
Turn on global file locks in BeeGFS by changing the following option in the BeeGFS client
tuneUseGlobalFileLocks = true
Configure the files
/etc/ctdb/pubcic_addresses according to the environment.
Consider exporting BeeGFS via NFS, which usually has a better performance than Samba and is supported by recent Windows versions.
If you are using Windows Samba clients, please consider adding the option
case sensitive = true
to the share definition above, in order to make the BeeGFS export case sensitive. This setting has a
positive performance impact on the client, as case-insensitive lookups perform fewer system calls on
the exported file system.
Another way of improving performance of Windows clients, but keeping the BeeGFS export
case-insensitive for ASCII file names, is to store the BeeGFS metadata in a case-insensitive XFS
partition, formatted using the command
mkfs.xfs with the option
-n version=ci, as seen in
the example below. This allows now to set the Samba option
case sensitive = true, as suggested
above so that Samba is led to perform less system calls on the exported file system. However, this
means that all filenames are case-insensitive, even for Linux clients.
$ mkfs.xfs -d su=128k,sw=8 -l version=2,su=128k -isize=512 -n version=ci /dev/sdx -f