Backgroundable NFS mounts can still cause a boot sequence to stall for
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 29 Dec 2003 00:07:44 +0000 (00:07 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 29 Dec 2003 00:07:44 +0000 (00:07 +0000)
commitcafd601ba30610746f3a73a6a7a412d56d689a48
tree82c2eb40c97c94c4912f10c0b8016bac52105fbd
parentcb840899a7f34bd258c58f83725c86e2035fdaa6
Backgroundable NFS mounts can still cause a boot sequence to stall for
several minutes or longer if DNS services are not available during boot.
The stall time depends on the state of the network, DNS, ethernet and arp
timeouts, and the number of backgroundable NFS mounts.

Furthermore, temporary DNS failures caused NFS mounts (foreground or
background) to permanently fail and exit, which will likely result in
inconsistent system state after booting completes if DNS services or the
network is down during boot.  This case is most likely to occur when
multiple machines boot simultaniously after recovering from a power outage.

Adjust foreground timeouts for 'bg' optioned NFS mounts to 1 second and reduce
the retry sleep() from 60 seconds to 20 seconds.  60 seconds is ridiculously
long even if you had a hundred machines with dozens of backgrounded nfs mounts
all trying to mount at the same time.  Do not exit on temporary DNS
failures, and if a warning is generated for an earlier failure generate
another warning if the mount later succeeds rather then silence (which might
be misinterpreted in the logs as the mount having failed).
sbin/mount_nfs/mount_nfs.c