This post is to highlight some advanced TrueNAS features to make your MacOS machine work better with with SMB/CIFS file shares on TrueNAS.

Server Message Block (SMB) File Sharing Protocol

Since 2013 in Mavericks (eleven years ago as I write this), Apple has preferred the SMB file sharing protocol over its own Apple Filing Protocol (AFP). Specifically, SMB2 as mentioned in the linked PDF.

This has not been without some amount of friction, as SMB was initially made to work primarily with IBM-compatible installations such as Windows and DOS. Interoperability with MacOS is generally fine, but can have some sharp edges.

Multiple Mounts

I had difficulty mounting more than one volume from TrueNAS over SMB, with the same user, and the exact same permissions on the folders. The solution1 for me was to disable “Enable Alternate Data Streams” on all of the shares I wanted to be able to mount at the same time as another share.

The link referred to suggests disabling “Enable Apple SMB2/3 Protocol Extensions” but I did not need to do this. In fact, it meant that my Time Machine backups to the TrueNAS machine did not work until I re-enabled this setting.

Long Names

Sometimes my files have long names. When copying this nominatively blessed data from one share to another, I received an error from MacOS stating that, “The file name you specified is not valid or too long”. The files were both coming from and going to the same file server so this seemed a little unreasonable.

I found a blog post on the very useful retired TrueNAS forums (RIP) that provided two lines of configuration to be added to each of the shares’ auxilliary parameters to make long names work2:

streams_xattr:store_stream_type = yes
streams_xattr:prefix = user.DosStream.

Once I had added this to the shares and restarted SMB, I was able to use the SMB service to copy these files without issue.

References: