Skip to content

Samba Shared Storage

Windows and MacOS workstations can use NFS but this comes with limited support and no authentication.

This section illustrates the configuration of a Samba server running on a Linux host (eg: RaspberryPi) using Debian 4.x version of Samba. This runs on the Gateway Device and is not used by the k8s cluster workers.

In this guide, the Samba user is called flamenco_smb_user and the Samba file store is intentionally explicitly called flamenco_shared_storage. We are also going to expect the Flamenco shared-storage to be mounted on a Windows client at F:\ so that Jobs can access the two-way variable path for Windows platform as F:\flamenco\.

We are assuming the two-variable shared-storage paths are correct in this example.

In summary…

Entity Value
Samba username flamenco_smb_user
Samba Share Name flamenco_shared_storage
Windows Client Remote Drive F:\flamenco
Linux Client Mount /media/shared/flamenco

Samba Share

On a Linux host, the /etc/smb.conf file contains the shares.

Note

We are adding Samba drive mapped to exactly the same location on the Linux host where the shared-storage is located. So this is why the path is /nfs/share.

To allow the Windows client to setup a mounted network directory with say, F:\flamenco, it is necessary to only specify /nfs/share in the path, and not /nfs/share/flamenco.

We are using /nfs/share because this is the original location of the shared-storage which is already being presented via NFS.

[flamenco_shared_storage]
    path = /nfs/share
    writeable=yes
    public=no
    follow_symlinks = yes
    wide_links = yes

Flamenco uses Shaman storage which relies on symbolic links. By default, symbolic links are not enabled in Samba implementations without specifying it on the server.

It seems that if a symlink is broken then it does not appear to a Samba Windows or Linux client.

Linux host flamenco symlink files that are broken (in red)…

The situation can arise if the NFS/Samba server does not have the Linux mount point for the shared-storage provisioned. The solution is to create the /media/shared/flamenco mount on the Linux host that provides the Samba server. Or, you can align the Flamenco platform paths so that they match the Samba path.

One quick way to do this is to use a bind mount and bind /media/shared/flamenco to /nfs/shared/flamenco.

sudo mount --bind /nfs/share/flamenco /media/shared/flamenco

Note

If you are using a NAS or some other appliance to provide Samba shares then you may not have any choice but to ensure the flamenco platform shared-storage paths match that of the NAS device so that the symlinks are not broken.

Once the mount is present, the symlinks will then be unbroken (light blue)…