On Wed, 2018-08-01 at 17:05 -0500, Patrick Goetz wrote: > I've been doing some more work on this issue, and have to update my > previous claim. While it is true that autofs was mounting home > directories using NFSv3, this is because I had misconfigured the > rpc.nfsd environment variables on the NFS server. Putting > > RPCNFSDARGS="-N 2 -N 3 -U" > > in the /etc/default/nfs-kernel-server doesn't work on Ubuntu 16/18.04 > systems because of the way the nfs-config service file is set up. The > correct configuration option (mapped to /run/sysconfig/nfs-utils) is > > RPCMOUNTDOPTS="--manage-gids -N 2 -N 3" > > With this restriction in place (disallow NFSv2 and NFSv3 exports), > autofs running on Ubuntu 18.04 is correctly mounting home directories > from an Ubuntu 18.04 NFS server. > > > Unfortunately if I switch to an Ubuntu 16.04 server with exactly the > same configuration, it doesn't seem to work. I can mount directories by > hand: I can see below that the autofs availability probing is only checking v3 (I think ... those numbers ... I can check if need be). Anyway, there's a couple of things we should try to work out what's going on. But, apart from investigating further, setting -fstype=nfs4 in your map entry should attempt to mount using NFSv4 and fail if it can't do the mount. Perhaps nfsmount.conf isn't present because Ubuntu elects to use the defaults or they have named it something different. The nfs-utils default should be NFSv4 with fall back to earlier NFS protocol versions when "-t nfs" is used instead of "-t nfs4" for v4 only (aka. by using the fstype option). Assuming that v4 is the default put (which should be set to match the nfs-utils default): mount_nfs_default_protocol = 4 into the "[ autofs ]" configuration section and see if that makes the availability probe check v4 and mount ok (without using the fstype option). > > ================================ > root@viper:~# df -h /mnt > Filesystem Size Used Avail Use% Mounted on > /dev/sda2 228G 9.2G 207G 5% / > root@viper:~# mount -t nfs4 snakeskin:/home/pgoetz /mnt > root@viper:~# df -h /mnt > Filesystem Size Used Avail Use% Mounted on > snakeskin:/home/pgoetz 55G 52M 53G 1% /mnt > ================================ > > But automounter (version 5.1.2) gives me these error messages when I > attempt to login remotely: The option above should be available in 5.1.2 but there have been a lot of changes since, we might need to go there too. Btw, 5.1.3 should be avoided, there was an annoying regression in that release. snip ... > > I tried monitoring the NFS server logs, but didn't see anything there. > Am at a complete loss as to why this isn't working on 16.04. As expected, the availability probe thinks there are no servers available because it isn't seeing a response for (I believe) v3 and it isn't probing v4. It's been a while since I've had to think about this so if the problem continues I'll need to spend time looking at the code to be more helpful. Ian -- To unsubscribe from this list: send the line "unsubscribe autofs" in