23

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

2 Answers 2

18

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.

4
  • 1
    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
    Commented Jan 22, 2017 at 2:54
  • Greetings from 2019, there's no such UI in here anymore
    – holms
    Commented Mar 9, 2019 at 2:11
  • 4
    Sure there is, enter Finder program first then Cmd + k
    – Correa
    Commented May 3, 2019 at 22:21
  • Stupid question: how do I pass parameters to the connection/mount (besides username & password, there are at least two ways to do so — either explicitly on Finder, or implicitly by adding entries on Keychain Access)? Commented Nov 27, 2023 at 11:30
35

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

5
  • 3
    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
    Commented Dec 3, 2017 at 2:14
  • 2
    This should be accepted as the best answer. It saves my day. Thanks! Commented Aug 26, 2018 at 3:15
  • @pedz: "secure" is the default on (nearly?) all Linux distros. It's not at all specific to CentOS, only to normal Linux and Unix servers (as opposed to NAS appliances I guess). Commented Sep 20, 2019 at 6:14
  • How "insecure" is it to use allow using ports over 1024? I'm not clear on what's insecure about that at all
    – callum
    Commented Mar 11, 2021 at 15:22
  • 1
    Ports below 1024 are only accessible by the root user on *NIX machines. My guess is it's "more secure" because you need to have root access to a machine. In a corporate environment this might be enforceable, but anyone using their own device can have root on that system so really, it's not as secure as the name may suggest.
    – berto
    Commented Jul 19, 2022 at 12:38

You must log in to answer this question.

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