From: Chuck Lever Date: Fri, 12 Feb 2010 18:04:14 +0000 (-0500) Subject: text-based mount: Retry when server can't be reached X-Git-Tag: nfs-utils-1-2-2~13 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=df6c9d1821585c773297fbfffa1dd315b9c84359;hp=df6c9d1821585c773297fbfffa1dd315b9c84359 text-based mount: Retry when server can't be reached We want new default behavior from mount.nfs when the server refuses a connection. Since connection refusal can be spurious (for example, if the server is rebooting), mount.nfs should retry. NFS shares that are automatically mounted by /etc/fstab at boot time may be problematic. The new behavior can be disabled by specifying the "retry=0" mount option, or these mounts can be changed to background mounts by specifying the "bg" option. A kernel code change is still required for the mount(2) system call to return ECONNREFUSED for NFSv4 mounts (see 2.6.33). For v2/v3, the version and transport negotiation logic in mount.nfs should drive a retry if the server's rpcbind can't be reached. Note that if a v2/v3 mount request encounters an unregistered NFS service, it will still fail immediately. That wouldn't be too hard to change as well, but there are many more corner cases there where failing immediately is appropriate. Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson ---