MacOS – Clever sysadmin needed! How to keep SMB shares mounted

macmacosNetworksmb

We have multiple Mac OS/OSX servers (A mix of El Cap and High Sierra) that have SMB shares mounted for backing /archiving jobs (chronosync and P5)

The SMB shares are connected via "connect to server" and generally remain stable, but become unmounted randomly at least once every 1-2 days.

My question: Is there any way analyse the logs (We've looked in system.log) and find the reason for the unmount?

The goal here is to keep the SMB shares mounted at all cost.

I've read around on StackExchange and tried analysing the network connections using the command from this post:

SMB: auto-unmount then unable to re-mount without restart

netstat -I
ping -c 90 -i 10 your_SMB_server
tail -f /var/log/system.log

No errors or issues with the packets found.

I'm sure there's a sys admin expert out that must have solved this already 😉

Appreciate any suggestions or ideas, however rudimentary

Thanks!

Best Answer

Not certain I understand the context of your question, so let's try this first:

This has worked for me:

  1. Mount the SMB/CIFS share using Finder's Go, Connect to Server....
  2. If prompted for credentials, and given the option, store those credentials in the Keychain
  3. Open System Preferences, Users and Groups; select the Login Items tab near the top
  4. Click the + button at the bottom of the list of login items to "add" an item.
  5. This will produce a new Finder window that allows you to select an item. Simply navigate to the mounted SMB/CIFS share from the Sidebar, select/highlight the SMB/CIFS share of interest, then click the Add button in the bottom right of the Finder window.

This should dismiss the Finder window, and now the share should be mounted at each login. Let us know if this doesn't work/isn't what you needed.