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.
The NFS server runs in the background on the host Mac, publishing the list of available files and listening for requests from the client (Linux in this case, but could be anything). You can configure the number of processes you want to have running. Apple OS X as an NFS Server (with Linux Clients) For a customer, I had to set up a Linux-based virtualised environment on a MacBook Pro using VirtualBox. This environment included making a couple of 8TB external hard drives available under NFS to the Linux hosts.
- 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.
Nfs Client For Mac Catalina
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:
Mac Os Nfs Share
- 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'.
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'.
Nfs Client For Mac
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.
Mac Connect To Nfs
Use this procedure to mount to the cluster manually from the command line:Mac Nfs Share
- Open a terminal. For example, you can click on Launchpad > Open terminal.
- At the command line, enter the following command to become the root user:
- List the NFS shares exported on the server. For example:
showmount -e usa-node01
- Set up a mount point for an NFS share. For example:
- Mount the cluster via NFS. For example:
sudo mount -o hard,nolock usa-node01:/mapr /mapr
- List all mounted filesystems to verify that the cluster is mounted. For example: