I have successfully set up a working NFS server/client system on my local network machines. I love it!
But, having grown weary of the long delay when a mount is not available during boot-time, I decided to take @ridgy up on his suggestion to use autofs to mount the shares instead - using the information from this post.
I had firewall issues before, So, I immediately suspected the ufw might be the reason for the mounts timing out. So, I disabled ufw on server and client. And, sure enough; That got autofs working nicely. So, I am sure the basic configuration is correct.
The only other rules in ufw at this point are ALLOW rules for ports 2078 and 6589. There are no BLOCK rules set up. And, since NFS works fine with ufw on during fstab-controlled mounting, I am a bit confused as to where the blockage is occurring.
So far, I haven't found documentation on what ports/protocols are unique to autofs besides the usual NFS 111,2049 TCP/UDP.
Whenever I re-enable ufw. The shares become inaccessible again.
After following your advice below to edit nfs-common and nfs-kernel-server.. I triple checked, and the edits were made exactly as shown. I rebooted and ran...
$sudo netstat -nalp | grep rpc... The output was;
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1220/rpcbind tcp 0 0 0.0.0.0:32767 0.0.0.0:* LISTEN 4158/rpc.mountd tcp6 0 0 :::111 :::* LISTEN 1220/rpcbind tcp6 0 0 :::32767 :::* LISTEN 4158/rpc.mountd udp 0 0 0.0.0.0:972 0.0.0.0:* 1220/rpcbind udp 0 0 0.0.0.0:32767 0.0.0.0:* 4158/rpc.mountd udp 0 0 0.0.0.0:111 0.0.0.0:* 1220/rpcbind udp6 0 0 :::972 :::* 1220/rpcbind udp6 0 0 :::32767 :::* 4158/rpc.mountd udp6 0 0 :::111 :::* 1220/rpcbind unix 2 [ ACC ] STREAM LISTENING 15939 1/init /run/rpcbind.sock unix 2 [ ] DGRAM 49175 4158/rpc.mountd unix 3 [ ] STREAM CONNECTED 48294 1220/rpcbind /run/rpcbind.sock unix 3 [ ] STREAM CONNECTED 16984 1220/rpcbind unix 3 [ ] STREAM CONNECTED 48275 4157/rpc.idmapd unix 3 [ ] STREAM CONNECTED 48276 4157/rpc.idmapd
OK... So, I wonder... Where is rpc.statd ??? Additionally, my NFS shares (autofs was still disabled) were still visible from the client. even though the firewall had not been updated with the new rpc.mountd port 32767.