- Joined
- Jun 22, 2007
- Messages
- 347
- Reaction score
- 2
- Points
- 18
- Your Mac's Specs
- iMac (27 inch, Late 2012), Processor: Core i5, Memory: 16GB 1333 Mhz DDR3 running MacOS Catalina
Hey there,
Just thought I'll post something on here about mounting network drives.
I had a problem where I setup iTunes and iPhoto to store their media libraries on a file server. That way, in the event of needing to reinstall the OS or formatting the computer, I never need worry about my music and photos being lost.
I made an application that will launch every time I log in, but I've noticed that when the Mac goes into sleep, on waking, the network drive has been ejected. And I need to run the application manually to before iTunes or iPhoto launch, otherwise I'll errors or messages showing up on my screen.
Reading online, there were a few solutions that involve installing 3rd party software like Sleepwatch and drive mounting solutions.
Then I came to know about Automount in OS X, which allows you map a network drive and solves my issue completely. Another thing is that I won't ever need to use my application again and I will never need any other 3rd party app as well.
That to me is excellent. And its so easy to do using Terminal
Just thought I'll post something on here about mounting network drives.
I had a problem where I setup iTunes and iPhoto to store their media libraries on a file server. That way, in the event of needing to reinstall the OS or formatting the computer, I never need worry about my music and photos being lost.
I made an application that will launch every time I log in, but I've noticed that when the Mac goes into sleep, on waking, the network drive has been ejected. And I need to run the application manually to before iTunes or iPhoto launch, otherwise I'll errors or messages showing up on my screen.
Reading online, there were a few solutions that involve installing 3rd party software like Sleepwatch and drive mounting solutions.
Then I came to know about Automount in OS X, which allows you map a network drive and solves my issue completely. Another thing is that I won't ever need to use my application again and I will never need any other 3rd party app as well.
That to me is excellent. And its so easy to do using Terminal
- Lauch Terminal
- Using vi editor, add a line to AutoMaster
Code:
sudo vi /etc/auto_master
Code:/Volumes/ auto_resources
It will look like this.
Code:# Automounter master map /Volumes/ auto_resources +auto_master # Use directory service /net -hosts -nobrowse,hidefromfinder,nosuid /home auto_home -nobrowse,hidefromfinder /Network/Servers -fstab /- -static
- Now create the auto_resources file.
Code:sudo vi /etc/auto_resources
Code:MediaName -fstype=smbfs smb://user:password@serverIP/ShareName
- Activate the AutoMount
Code:
sudo automount -vc
- Restart the computer.