Re: The automounter hangs on attempts to mount non-existent directories unless the option vers=4.2 is specified?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2020-06-17 at 08:34 -0500, Patrick Goetz wrote:
> 
>    mount_nfs_default_protocol = 4
> 
> to /etc/autofs.conf.  However, using this setting in /etc/auto.home:
> 
>    * octopus.biosci.utexas.edu:/home/&
> 
> any attempt to access a non-existent directory in /home (e.g. 
> /home/syslog) would result in the automounter hanging while various 
> attempts to mount were executed.  Changing the auto.home line to
> 
>    * -tcp,vers=4.2 octopus.biosci.utexas.edu:/home/&
> 
> resolved this issue.  I can understand the tcp option, but what
> doesn't 
> make sense to me is the necessity to also specify vers=4.2
> If I remove vers=4.2 from the options list, the automounter starts 
> hanging again when asked to mount a non-existent directory.

If you specify vers or nfsvers and the its value starts with 4
(and mount_nfs_default_protocol is set to 4, and UDP protocol is
not the requested mount protocol) then autofs will probe the server
to work out whether it's available before attempting a mount.

The point is, when the NFS version is explicitly given and those
other conditions are met autofs will do targeted probing to work
out if the server is responding in order to try to (partly) avoid
the potential RPC stubbornness we see during the kernel mounting.

If not the usual probing will be done for protocols and NFS versions
to work out, if the server is responding, and what protocols and NFS
versions are available.

In fact it's not that smart, the probing is really only used to work
out whether to attempt a mount rather than construct an options string,
assuming that job is better left to mount.nfs(8).

If there are multiple servers for the the mount entry (either via DNS
or the map entry itself) then it does eliminate servers that aren't
responding and order the list of servers to try by response time.

Umm ... although I think there are also conditions under which it won't
do the probe at all ... those bits are in more than one place, I'd need
to look over that code if that's really going to be useful and needed.

Ian




[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux