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. :)