*** 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.