Mounting NFS volumes under Mac OS
This is not supported, however can be done. See Caveat below.
The only way to get a CSAIL NFS volume mounted on your MacOS
is for your local Mac's UID to match your CSAIL UID. Changing your UID can open a world of pain, so if you insist on doing this, we recommend creating a new local account before proceeding.
- Your Mac must have a wired or registered wireless network address (generally, it must start with 128.30). If using wireless, register your device as described at Changes to Stata Center Wireless Service?.
First, determine the volume name, server name, and group name you want to have access as.
- Connect to a CSAIL Ubuntu system that automounts the volume.
- Access the volume, for example
ls -l /csail/userdir
- Identify the group name that has access to the directories you work on.
- Also retrieve its group ID:
user@nfs-prod-1:/csail/userdir$ getent group our-groupname
- Examine the output of
mount to find the server name that matches your volume name (the part after "/csail/"). For example, in...
servername.csail.mit.edu:/export/userdir on /csail/userdir type nfs [...]
Next, create a local group on your Mac
Run the following from Terminal. Replace
appropriately from what you found above.
sudo dscl . list groups gid | fgrep $GID
If any lines are returned, STOP. Otherwise, continue:
sudo dscl . create groups/$GROUPNAME gid $GID
sudo dscl . append groups/$GROUPNAME GroupMembership $USER
Then, log out and log in again for the changes to take effect.
Creating a NFS connection and desktop shortcut.
For MAC OS 10.9 and Above :
- Open a Terminal
- Create a directory to mount an nfs sharer:
$ sudo mkdir /path/to/your/mount
- Mount an NFS file system in read/write moder:
$ sudo mount -o rw -t nfs $servername.csail.mit.edu:/export/userdir path/to/your/mount
You should see your nfs Volume mount dir in path/to/your/mount
To create a desktop shortcut on your desktop select the dir and begin dragging it to your desktop. Before releasing the dir to your desktop hold down the Option
keys on your keyboard. The icon should now have a small arrow in the left bottom corner and the mouse button can be released dropping the new shortcut on the desktop.