No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>


To have a better experience, please upgrade your IE browser.


How to Automatically Mount NAS on Mac Book

Publication Date:  2012-07-18 Views:  18 Downloads:  0
Issue Description

Fristly,I will show the difference of mount between Windows and Mac Book, and to see what protocol I will use and what I must to do.

 1.       Operating system: Windows can automatic mount NAS, but it is different with Mac Book. Essentially, the kernel program of Mac Book is Linux, but it is a little different with Linux at some places and it can’t be automatic mount the same as Linux such as SUSE.

2.       Network protocol: When windows mount NAS, it’s network protocol is only CIFS, but Mac can support CIFS and NFS at same time. By contrast, NFS is more faster and stability than CIFS, so we chose NFS share to do the mount.

3.       Mount point: When windows mount NAS, it need a drive. Mac need a folder in local to do the mount. So the MAC must build a folder before mount.

 Secondly, Mac can do the mount in GUI interface. I try it, but find that it will lost some mount points at some time. It is very surprise and I don’t find the reason of this, so I decide to use terminal to do the mount.


Alarm Information
Handling Process
1.       Make sure our NAS is OK and the NFS share of NAS is opened.
2.       Assume we need mount five file systems.Find a Mac, enter the “terminal” utility, do as follows:
sudo -s
sudo mkdir /NAS/N
sudo mkdir /NAS/O
sudo mkdir /NAS/P
sudo mkdir /NAS/Q
sudo mkdir /NAS/R
3.       Make a map between IP address and drive name.Do as follows in the root account
cd  /etc
vi hosts
And you can edit the file hosts to do the map.Add the command as follows in this file N O P Q R
Make sure the space between IP address and drive name is “Tab”
“:wq” to save and quit
4.       The next step is make a shell in mac book to auto-mount NAS.The command to this shell is as follows:
sudo umount /NAS/N
sudo umount /NAS/O
sudo umount /NAS/P
sudo umount /NAS/Q
sudo umount /NAS/R
sudo mount -t nfs -o resvport,locallocks N:/vx/FS_N /NAS/N
sudo mount -t nfs -o resvport,locallocks O:/vx/FS_O /NAS/O
sudo mount -t nfs -o resvport,locallocks P:/vx/FS_P /NAS/P
sudo mount -t nfs -o resvport,locallocks Q:/vx/FS_Q /NAS/Q
sudo mount -t nfs -o resvport,locallocks R:/vx/FS_R /NAS/R
5.       Set your shell can be auto-mounted.Open “system preferences” in MAC

Click “Accounts” to add your shell as an application as follows. Then the shell can be run after restart
Root Cause
1.       Use terminal to mount, only root user can do it. So we need the permission of root user
Open “terminal” utility.
“sudo –s”   and enter your password to get root permission
“sudo makedir  /NAS/O”  make a mount point
“sudo mount –t nfs –o resvport,locallocks   /NAS/O” is the   command for mount
2.       Step 1 is just the command that mount NAS.When restart, this mount will disappear.
So I want to make a shell and when the computer is restart ,the shell could be run automaticly.
3.       If a file system is mounted in Mac,it will be shown at the root catalogue. And the name of it in catalogue will be the mount name, just ad IP address. It is hard to tell one apart one another, so we must give a new name of it. Change the file /etc/hosts will be the most convenient and effective way.
Mac is not good at mount. There have some bugs of mount, so we just make it more useful but can’t solve it.