nfs mount/automount fails on Big Sur

Trying to automount (autofs) an NFS share from my Ubuntu Linux 5.4.0 server to my MacBook Air Big Sur 11.2.3 client. Exhaustive online search over the last week has turned up nothing useful for me, and Apple MacOS User Guide has limited info.


Automounting works well with my older client MacBook Air High Sierra 10.12.6, but I haven't been able to set it up on my Big Sur client.


The shared directory on the server is /export/our and I am trying to mount it in the client directory /System/Volumes/Data/mnt which already exists:


% ls -ld /System/Volumes/Data/mnt

drwxr-xr-x 2 root wheel 1 5 Apr 15:38 /System/Volumes/Data/mnt


These are the symptoms I see:

After restarting and logging in, in Finder > Go to Folder... /System/Volumes/Data/mnt

it shows the shared folder ("Our") but it is empty (Get Info reports 0 bytes).


In the Terminal:

% ls -l /System/Volumes/Data/mnt 

total 2

dr-xr-xr-x 2 root wheel 1 5 Apr 15:42 Our

% ls -l /System/Volumes/Data/mnt/Our 

ls: Our: No such file or directory

% cd /System/Volumes/Data/mnt

% pwd

/System/Volumes/Data/mnt

% ls -Al

total 2

dr-xr-xr-x 2 root wheel 1 5 Apr 15:59 Our

% cd Our

cd: no such file or directory: Our


Trying to mount manually (I replace the real server name with "servername" below):

% sudo mount -t nfs -o rw,async,resvport,vers=4 servername:/export/our /System/Volumes/Data/mnt 

mount_nfs: can't mount /export/our from servername onto /System/Volumes/Data/mnt: No such file or directory

mount: /System/Volumes/Data/mnt failed with 2


The server is meant to be using NFS version 4 by default, but when I leave out the vers=4 option, I get a different error message:

% sudo mount -t nfs -o rw,async,resvport servername:/export/our /System/Volumes/Data/mnt   

mount_nfs: can't mount with remote locks when server (servername) is not running rpc.statd: RPC prog. not avail

mount: /System/Volumes/Data/mnt failed with 74


Further info:

On the server, /etc/export contains:

/export 192.168.1.0/24(rw,async,fsid=0,crossmnt,insecure,no_subtree_check)

/export/our 192.168.1.0/24(rw,async,insecure,no_subtree_check)


I changed my user and group IDs on both the MacBook Airs to match those on the server, so I should not need user/group mapping. This has been working fine on my High Sierra client.


On both clients, /etc/auto_master contains:

/System/Volumes/Data/mnt auto_nfs


and on the Big Sur client /etc/auto_nfs contains:

Our  -rw,async,resvport,nfc,vers=4  servername:/export/our


I've been adding those options in various combinations; the High Sierra client only has -rw.


On the Big Sur client:

% showmount -e servername

Exports list on servername:

/export/our             192.168.1.0/24

/export               192.168.1.0/24


% rpcinfo -p servername

  program vers proto  port

   100000  4  tcp  111 rpcbind

   100000  3  tcp  111 rpcbind

   100000  2  tcp  111 rpcbind

   100000  4  udp  111 rpcbind

   100000  3  udp  111 rpcbind

   100000  2  udp  111 rpcbind

   100005  1  udp 54469 mountd

   100005  1  tcp 49073 mountd

   100005  2  udp 56836 mountd

   100005  2  tcp 33493 mountd

   100005  3  udp 50426 mountd

   100005  3  tcp 41963 mountd

   100003  3  tcp  2049 nfs

   100003  4  tcp  2049 nfs

   100227  3  tcp  2049 nfs_acl

   100003  3  udp  2049 nfs

   100227  3  udp  2049 nfs_acl

   100021  1  udp 42005 nlockmgr

   100021  3  udp 42005 nlockmgr

   100021  4  udp 42005 nlockmgr

   100021  1  tcp 39821 nlockmgr

   100021  3  tcp 39821 nlockmgr

   100021  4  tcp 39821 nlockmgr


Any help would be so much appreciated! I can't believe there is a world out there with no NFS file serving LANs full of Big Sur clients. :)


Posted on Apr 4, 2021 9:14 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 27, 2021 4:13 PM

Try configuring the NFS client on the Mac to tell it to use NFS v4. This worked for me on Big Sur on Intel and M1 and so far I've had to change nothing else. nfs://server/share works just like it always did on previous macOS versions. It worked immediately. I am running Ubuntu Server 20.04 and using ZFS mount point NFS sharing.


sudo nano /etc/nfs.conf


#
# nfs.conf: the NFS configuration file
nfs.client.mount.options = vers=4

You should still file an official Radar bug report ticket with Apple.

Similar questions

1 reply
Question marked as Top-ranking reply

Apr 27, 2021 4:13 PM in response to johannschoonees

Try configuring the NFS client on the Mac to tell it to use NFS v4. This worked for me on Big Sur on Intel and M1 and so far I've had to change nothing else. nfs://server/share works just like it always did on previous macOS versions. It worked immediately. I am running Ubuntu Server 20.04 and using ZFS mount point NFS sharing.


sudo nano /etc/nfs.conf


#
# nfs.conf: the NFS configuration file
nfs.client.mount.options = vers=4

You should still file an official Radar bug report ticket with Apple.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

nfs mount/automount fails on Big Sur

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.