3

I have a Linux server with a number of NFS exports. I have been mounting them on my Mac by setting up an auto_nfs file, and mounting them in /nfs/… folders.

I think this may the cause of some peculiar behaviour with some applications, which don’t seem to be able to fully traverse these volumes (see Applications Not Working Properly with Networked volumes for details on what I mean by peculiar).

When I mount a SMB share, it appears as a separate volume under my computer, but not so with NFS.

I conclude that things would work better for me if I mount the NFS shares in the /Volumes directory. But I can’t:

  • The settings in auto_nfs require existing directories, and in Sierra, I can’t create one.
  • I cannot mount an NFS share using the nfs: protocol, since apparently this isn’t supported.

Apparently Sierra changed a few rules regarding the /Volumes directory.

How can I mount an NFS share as an ordinary volume? Mount NFS share in /Volumes as a drive, but:

  • It’s an old one and not applicable to Sierra
  • The suggestions don’t work here
8

In Finder, press cmd + k and enter the path to the NFS server/share:

connect to server

For me this mounted as /Volumes/users-1 (but I already had /Volumes/Users mounted).

iMac21:~ user$ df -h /Volumes/users-1
Filesystem               Size   Used  Avail Capacity iused     ifree %iused  Mounted on
192.168.7.5:/nas/users  5.4Ti  4.8Ti  292Gi    95%  261121 366027775    0%   /Volumes/users-1
iMac21:~ user$

If you wanted this to happen on boot you can add it into the login items for your user.

  • I had already tried the nfs: protocol, as noted in my question, but it didn’t work then. I think my error was in not including the rest of the path. I didn’t know you could add a volume to the login items, so that’s two things I learned. Thanks. – Manngo Jan 22 '17 at 2:54
  • Greetings from 2019, there's no such UI in here anymore – holms Mar 9 at 2:11
  • Sure there is, enter Finder program first then Cmd + k – Correa May 3 at 22:21
13

The accepted answer only works when the NFS server allows connections on non-reserved ports (i.e. >1024).

The exports man pages say it:

exportfs understands the following export options: secure

This option requires that requests originate on an Internet port less than IPPORT_RESERVED (1024). This option is on by default. To turn it off, specify insecure.

For my CentOS 7.3 box this is not the case by default and I had to add insecure to the mount.

So for MACOS client to work you'll have to add the insecure option to your nfs server in your export

E.g.: /my/export 192.168.5.0/24(insecure)

If that's not possible: using mountyou can supply an option to allow reserved ports from the Mac side: sudo mount -t nfs -o resvport server:/my/export nfs

  • 2
    I spent half a day on this. I saw the comment but I didn't have CentOS -- I have Ubuntu Mate 16.04. I finally tried it and that was the issue. – pedz Dec 3 '17 at 2:14
  • 1
    This should be accepted as the best answer. It saves my day. Thanks! – Weibing Chen Aug 26 '18 at 3:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .