Can't mount NFS share in Big Sur. Crashes with NFSv4, rpc error with v3

I have an NFS mount being served from a Raspberry Pi that worked in prior versions of macOS.

I can see the mount on the remote server with showmount:

$ showmount -e 10.0.100.119                                                            
Exports list on 10.0.100.119:
/mnt/ssd/shared-nfs                 *

And rpcbind seems to show all the ports configured correctly:

$ rpcinfo -p 10.0.100.119 
   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  54106  mountd
    100005    1   tcp  47295  mountd
    100005    2   udp  57827  mountd
    100005    2   tcp  49259  mountd
    100005    3   udp  54143  mountd
    100005    3   tcp  50115  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  44848  nlockmgr
    100021    3   udp  44848  nlockmgr
    100021    4   udp  44848  nlockmgr
    100021    1   tcp  40361  nlockmgr
    100021    3   tcp  40361  nlockmgr
    100021    4   tcp  40361  nlockmgr

If I go into the Finder, press CMD+ K and connect to nfs://10.0.100.119:/mnt/ssd/shared-nfs, it gives an error in Console.app:

nfs: STAT(NSM) rpc service is not available, unable to mount with current lock mode.

If I connect explicitly with NFSv4, with nfs://vers=4,10.0.100.119:/mnt/ssd/shared-nfs, Console.app shows ReportCrash Saved crash report for mount_nfs[60875] version 150.40.3, and if I view it, some of the relevant lines are:

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000020
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [60875]

VM Regions Near 0x20:
--> 
    __TEXT                      10f907000-10f913000    [   48K] r-x/r-x SM=COW  /sbin/mount_nfs

Application Specific Information:
dyld3 mode

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   mount_nfs                       0x000000010f90c1da 0x10f907000 + 20954
1   libdyld.dylib                   0x00007fff204ca621 start + 1

I was also trying to mount the thing via the CLI (e.g. mount -t nfs -o vers=4 10.0.100.119:/mnt/sshd/shared-nfs /Volumes/share), but couldn't find any way to do it that didn't result in an error.


Solution 1:

I also updated my OS and it worked on the BigSur 11.6 with this command:

mount -o vers=4,resvport -t nfs xxx.xxx.xxx.xxx:/var/nfs/content /mnt/content/.