NFS based /usr prevents normal startup due to slow net init

Dag-Erling Smørgrav des at des.no
Wed Mar 7 22:38:47 UTC 2007


Mike Meyer <mwm-keyword-freebsdhackers2.e313df at mired.org> writes:
> Steven Hartland <killing at multiplay.co.uk> writes:
> > Another observation from my recent dealings with using
> > NFS based /usr is that the remote critical mounts via
> > nfs dont always give the network enough time to
> > initialise before running. The first error displayed
> > is:
> > Mounting NFS file systems:mount_nfs: nfs1: hostname nor servname provided, or not known
> > [...]
> How about an extra flag in your fstab?  The default behavior for
> mount_nfs is to keep retrying until the mount succeeds.

No, it will fail immediately (as seen above) if it can't resolve the
server name.  The only way to fix this is to modify mount_nfs to sleep
and retry in such cases.  The *current* sleep-and-retry code is in the
NFS mount code in the kernel, which doesn't come into play until after
DNS lookup.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-hackers mailing list