AluminumMonster Posted September 16, 2016 Share Posted September 16, 2016 *** 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. Quote Link to comment
spants Posted September 16, 2016 Share Posted September 16, 2016 Thanks - seems to be working well on my system. Quote Link to comment
JorgeB Posted September 16, 2016 Share Posted September 16, 2016 First, you need to create a Samba configuration file that will persist after a reboot like this: FYI you can use the Samba extra configuration box on Settings -> SMB Settings Quote Link to comment
AluminumMonster Posted September 16, 2016 Author Share Posted September 16, 2016 FYI you can use the Samba extra configuration box on Settings -> SMB Settings I had no idea that existed, thanks! Quote Link to comment
wgstarks Posted September 16, 2016 Share Posted September 16, 2016 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? Quote Link to comment
AluminumMonster Posted September 16, 2016 Author Share Posted September 16, 2016 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. Quote Link to comment
wgstarks Posted September 16, 2016 Share Posted September 16, 2016 Thanks. Might give this a try. Not sure it'll make much difference though. Browsing folders in SMB shares has always been a little slow for me. Quote Link to comment
AluminumMonster Posted September 16, 2016 Author Share Posted September 16, 2016 Sure, the signing change would only improve transfer speeds, not Finder browsing of the SMB share. The changes above for Samba would fix the browsing speed, but it's pretty experimental at this point... hopefully it'll be an option built into Unraid eventually. Quote Link to comment
Recommended Posts
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.