Mounting an NFS share from OS X: Difference between revisions
m 1 revision imported |
(No difference)
|
Revision as of 17:45, 29 June 2015
Note: These instructions are for Mac OS X Version 10.6 (Snow Leopard) and later releases only. An earlier version of the article discussed Version 10.5 (Leopard)
To mount a QNAP Turbo Station NFS share from OS X, follow these steps:
- Start Finder, and go to Applications / Utilities / Disk Utility.
- Select File / NFS Mounts... from the menu bar.
- Click the "+" icon at the bottom left of the NFS Mounts window.
- Enter your Turbo Station's NFS URL, following the format of the example in the dialog.
- Under the URL, enter the mount location. A convenient place is under /Volumes. For instance, if you entered the URL as nfs://myserver/Public, enter /Volumes/Public as the mount location. Note: Don't create the subdirectory; it will be created dynamically when the share is mounted.
- Click the arrow in front of "Advanced Mount Parameters". A new text entry box is displayed. Enter:
resvport
.
- Click "Verify" at the bottom right. Note: This only checks that your Turbo Station has NFS enabled; it doesn't check if the remote NFS URL is correct.
- A popup window should appear, saying "The NFS server appears to be functional". Click "OK".
- Click "Save" at the bottom right of the NFS Mounts Window.
- Enter your password to allow Disk Utility to make the changes.
- This completes the process. Your NFS share should appear at the mount location you entered above.
Since Mac OS X 10.8 (Mountain Lion) doesn't offer anymore to mount NFS shares from Disk Utility, manual mount is the only solution under that version.
Here is a Terminal command that permits to mount NFS share without problems, as some arguments are mandatory to make the mout fully MacOS compliant:
sudo mount -o rw,bg,hard,resvport,intr,noac,nfc,tcp myserver:/sharedirectory /Volumes/sharedirectory/
enter your machine admin password, and voilà.
- list of major options used:
- rw for read and write permission
- resvport (explanation in discussion)
- nfc permits to your finder to handle the UTF-8 NFC coding of Linux and Windows instead of Apple UTF-8 NFD (well explained on G**gle), if not used any file or directory named with accents maybe unseen by the finder (where still okay under a terminal session !)
Discussion
By default, Mac OS X connects to an NFS server from a "non-privileged" TCP/IP port, that is, ≥ 1024. However, the Turbo Station only accepts connections from a "privileged" TCP/IP port, ≤ 1023. The "resvport" option in the setup causes Mac OS X to use a privileged port.
If you don't specify the "resvport" option, you will be unable to connect to the Turbo Station. If you use a Terminal CLI, and issue ls /Volumes/Public
, for instance, the HDD and LAN lights on the Turbo Station will blink, and the Mac will display the error message "Operation not permitted".
Many online documents refer to the "-P" mount option, but according to the mount_nfs(8) man page, this is "highly discouraged". The "resvport" option should be used instead.
It's unclear why the Turbo Station only accepts connections from "privileged" ports. In past decades, this was considered to be a security feature, as only the administrator of a shared computer could allow connections from such ports. Nowadays, in a domestic or SME environment, each user of a computer is their own administrator.