Steve Dickson wrote: >> The transport protocols are probed differently for NFS and MNT: for >> MNT, UDP is probed first then TCP; for NFS, the opposite is true. The >> mount command is supposed to try both transport protocol types both >> for NFS and MNT, but it appears that it is failing to try the other >> type if the first fails... I see this is also problematic for umount.nfs. > > The idea here was to use UDP to probe for both rpc.mountd and the > NFS server so as not to put (tcp) ports in TIMEWAIT, basically making > them unavailable for the actual mount. That allowed many more tcp > mounts to happen during autofs mount storms. Right. I don't see GETPORT using UDP as often as perhaps it should, though. I need to go back and check it. And umount.nfs always uses TCP for the mountd request. I have a patch that fixes that to behave more like mount.nfs does, which I will forward in the next day or two. I notice some problems if a share is mounted with TCP, but the server later disables TCP -- umount.nfs hiccups on that when it tries to umount using the same protocol as listed in /etc/mtab. Perhaps relying on /etc/mtab for setting the umount protocol is unnecessary. > Note: if the protocol was explicitly specified (i.e. proto=tcp) only > that protocol was used during the probing and mounting. I have > been asked to change that as well. Meaning if when proto=tcp is > specified, they still want the udp probing to occur. I would like to spell out exactly what behavior we want to solder into the community nfs-utils here, at least so I can approximate it with the string-ified mount implementation, but also because it seems to be quite heuristic and totally undocumented. If we tune for a particular use case, it will break others, so we need to agree on a default that works for most cases. (As part of this exercise it would also be lovely to assemble some nice regression test cases, but that may be too much to hope for ;-) We have three requests that need to be made: 1. GETPORT -- I think this should UDP all the time unless proto=tcp is explicitly specified; 2. MNT -- likewise, UDP unless proto=tcp is specified or GETPORT says UDP is not supported; 3. NFS -- this should be TCP all the time unless proto=udp is specified or GETPORT says TCP is not supported. Even better would be to use RPCB_DUMP instead of RPCB_GETPORT. That way we only need a single rpcbind call for both protocols, and can get transport protocol information as well, and make an "informed" choice. Also, can we get rid of the clnt_ping()? If not, can we document why it is there? It adds two extra round trips to the whole process. If error reporting is the problem, maybe we can try the pings only if the kernel part of the mount process fails?