Better Mac compatibility with vfs_fruit in Unraid 6.2


Recommended Posts

*** The config modification mentioned below is now available in the GUI as of Unraid 6.3.2 in SMB Security Settings / Enhanced OS X interoperability. There is no need to manually modify the Samba configuration anymore. Thanks Unraid team! ***

 

So you have a Mac and connect to Unraid over SMB? Apple has depreciated AFP, so eventually this will be the case for every Mac user. With the release of Unraid 6.2 earlier today, Samba has been updated to version 4.4.5, which includes a new module called vfs_fruit. vfs_fruit is an extension to the SMB protocol that mimics Apple's own extension built into their smb server implementation. Due to the way the Finder application requests metadata while displaying directories over SMB, directories with lots of folders and files can take a very long time to show up. To resolve that issue, Apple extended SMB to allow for faster metadata retrieval (so it behaves like AFP).

 

Here is my disclaimer... I don't know what the ramifications are of enabling this module for better Mac compatibility in Unraid. I'm trying it on my own personal server, which has the data backed up. This has the potential to corrupt data so be extremely careful and only follow the directions below if you know what you are doing and have backups of your data.

 

First, you need to create a Samba configuration file that will persist after a reboot like this:

 

touch /boot/config/smb-extra.conf

 

Next, edit it with whatever text editor your prefer and add these lines to the file:

 

[global]                                                                                                                                                               

 

ea support = yes

vfs objects = catia fruit streams_xattr

fruit:resource = file

fruit:metadata = netatalk

fruit:locking = none

fruit:encoding = native

 

This will enable vfs_fruit for all shares on your Unraid server. If you want a specific share only (good idea for testing), replace [global] with [sharename]. Save the file and restart Samba:

 

killall -HUP smbd nmbd

 

Now, if you have a directory with hundreds / thousands of files and folders inside of it, and you connect to it over SMB with your Mac, you should see much quicker directory listings and responsiveness from Finder. Let me know how it works for you.

 

Oh and is your Mac running El Capitan 10.11.5 or newer, and your SMB throughput sucks? Try running this in terminal to disable SMB signing:

 

printf "[default]\nsigning_required=no\n" | sudo tee /etc/nsmb.conf >/dev/null

 

That should bring you back to pre-10.11.5 SMB speeds.

 

 

Link to comment

Oh and is your Mac running El Capitan 10.11.5 or newer, and your SMB throughput sucks? Try running this in terminal to disable SMB signing:

 

printf "[default]\nsigning_required=no\n" | sudo tee /etc/nsmb.conf >/dev/null

 

That should bring you back to pre-10.11.5 SMB speeds.

 

 

 

What would the command be to restore the original settings if turning off smb signing makes no difference?

Link to comment

What would the command be to restore the original settings if turning off smb signing makes no difference?

 

Generally the nsmb.conf file does not exist, so to return it back to the default state you would run:

 

sudo rm /etc/nsmb.conf

 

enter your password, hit enter, then reboot.

 

If you've created and edited your nsmb.conf for other reasons, you would need to edit the file with a text editor and remove the "signing_required=no" line, then save the file.

 

The default setting previous to 10.11.5 was "no". It was changed to "yes" for additional security in 10.11.5, which lead to slower transfer speeds as the SMB channel is encrypted by default now. This change simply reverts the option back to no, leaving the SMB stream unencrypted. Since SMB is generally only used on a local network, or encrypted VPN tunnel, I don't find the added encryption necessary for my security. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.