In the first article I’ll show you some small optimizations for the SMB shares for working with macOS. For more information about this series about openmediavault and an overview of all articles, please see here.

So let’s get started. The above mentioned optimizations for SMB are the settings vfs objects = catia fruit streams_xattr and fruit:metadata = stream

As you probably know, openmediavault already allows a lot of settings for shared folders and SMB shares in its GUI and also allows you to specify advanced options, both in the settings for SMB/CIFS as a whole, as well as for the respective individual shares.

In addition, openmediavault offers, with the help of environment variables, to specify default values for certain settings, which is especially helpful for several shares, as you no longer have to adjust each individual share. From the developers’ point of view, this is also preferable to manual input in the advanced options.

Unfortunately, openmediavault is not entirely consistent when using TimeMachine and users’ home sharing, and we have to use both ways to properly set this up.

GUI settings

Go to Settings under SMB/CIFS, scroll down there and enter the following in the Advanced Options field:

fruit:metadata = stream

You’ll get this:

Setting the environment variables

Log in via ssh to your openmediavault Raspberry Pi and set the environment variables by typing:

sudo omv-env set OMV_SAMBA_SHARE_VFSOBJECTS "catia fruit streams_xattr"
sudo omv-env set OMV_SAMBA_HOMES_VFSOBJECTS "catia fruit streams_xattr"
sudo omv-env set OMV_SAMBA_SHARE_FRUIT_METADATA stream 

The environment variables now must now be updated into openmediavault. This will updated the affected configuration files too. This is easy to do with the following commands. However, this will take a while. The whole thing takes almost 50 – 60 seconds on my overclocked Raspi 4. So please be patient.

sudo omv-salt stage run prepare
sudo omv-salt deploy run samba

Now all normal shares, TimeMachine and users Home shares are provided with these macOS-specific settings, both the already existing shares, as well as those that you create in the future.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published.

Bitte löse die kleine Aufgabe, um den Kommentar abzuschicken. *