8

I'm hoping to serve an NFS mount from my High Sierra (10.13.4) server to a linux client. The linux client can mount using NFSv3 protocol, but I use ACLs on the served files and directories, so I think we need NFSv4.

I'd like to use version 4 of the protocol. Is this possible? I see the nfsd(8) man page does not mention version 4. I found a manpage for FreeBSD exports(5) that uses the flag V4: at the start of a line in /etc/exports to declare the protocl version.

I tried this with my nfsd and it failed to parse correctly, using "nfsd checkexports".

If I check rpc:

$ sudo rpcinfo -p
program vers proto   port  
...
100003     2   udp   2049  nfs
100003     3   udp   2049  nfs
100003     2   tcp   2049  nfs
100003     3   tcp   2049  nfs

This makes me think my nfsd supports version 2 and 3 of the protocol. perhaps I can upgrade this server?

0

3 Answers 3

3

The author of NFS Manager Marcel Bresink states in the help files that macOS only supports NFS 4 as a client. As server it is limited to NFS 2 and 3:

https://www.bresink.com/osx/143439/Docs-en/pgs/0020-Intro.html

2
  • Thank you. This helps with expectations, at least. Sure would be nice to have NFS4, though. Someday...
    – Matt
    Aug 9, 2019 at 14:13
  • 1
    @Matt I have little hope for that... Aug 12, 2019 at 14:01
4

The version of nfsd on the Mac does support v4. For ACL support you definitely need to connect using v4.

Your failure to get a v4 connection is probably on the client side. Most NFS clients default to trying v3 first then falling back to v2 if unsuccessful.

On your client side you should specify v4 using the -o vers=4 option to your mount command. Do a man mount_nfs on the client to check that it supports that syntax rather than the old deprecated -o nfsv4 syntax. You could also use -4 but that is also deprecated and highly discouraged.

To get ACL support in your client you may have to add the -o acl option as most clients default to no ACL support.

A close reading of man NFS and man mount_nfs on the client is highly recommended.

3
  • 2
    Thanks for the pointers. On my Ubuntu 16.04 LTS client, the fstab option to be used is "nfsvers=4". I found this in the nfs(5) man page, referred from the mount(8) man page. FWIW, the nfs specific mount utility on 16.04 LTS is "mount.nfs", which is the target of a symlink called "mount.nfs4". When I set the mount options correctly, I still get "mount.nfs: Protocol not supported" on the Ubuntu client. So, there's evidence that the client supports nfsv4 and is configured correctly (no parse errors from reading the fstab). The problem persists for me.
    – Matt
    Apr 12, 2018 at 13:43
  • 4
    When I run rpcinfo -p 127.0.0.1 | grep "nfs" on my Mac, I only get versions 2 and 3 listed. It appears that at least in Sierra (10.12) nfsd does not support v4.
    – beporter
    Sep 18, 2018 at 14:38
  • 1
    We have tested identical Ubuntu boxes inside Vagrant attempting to connect to nfsd on a macOS and an Ubuntu host. No problems using v4 on the Ubuntu host. I don't think it's a client issue.
    – Ryan
    Jun 12, 2019 at 2:34
2

I am yet to see any evidence that nfsd on macOS supports version 4.

From man nfs.conf:

 For more information on the NFS and MOUNT protocols see Network File System Protocol
 Specification, RFC1094 and NFS: Network File System Version 3 Protocol Specification.

And as the OP points out rpcinfo localhost consistently reports versions 2 and 3 only. I have had no success getting any NFS 4 clients to connect to a macOS share.

1
  • This confirms what I found. See my comment to Tony's post, above.
    – Matt
    Jun 6, 2019 at 19:42

You must log in to answer this question.

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