> On Thu, Jan 06, 2011 at 09:19:06PM -0500, grarpamp wrote:
> > So what was unclear?
> >
> > mount_nfs emits a nonzero exit status upon failing to look
> > up an FQDN causing mountlate to trigger a dump to shell
> > on boot during rc processing. That's a *showstopper*. The
> > right thing to do is to hack mount_nfs to punt to background
> > mounting in this case with an appropriate exit status.
> >
> > Personally I'd distinguish mount_nfs exit codes between:
> > 0 - mounted
> > 1 - backgrounded, for any reason
> > 2 - none of the above
> > and adjust the rc's to deal with it accordingly.
> >
> > Words are subject to interpretation and take time. Though
> > perhaps masked by brevity, I believe all the above elements
> > were in the prior concise post. Thanks everybody :)
> 
> So basically the problem is that the "bg" option in mount_nfs only
> applies to "network unreachable" conditions and not "DNS resolution
> failed" conditions.
> 
> Initially I was going to refute the above request until I looked
> closely
> at the mount_nfs(8) man page which has the following clauses:
> 
> For non-critical file systems, the bg and retrycnt options
> provide mechanisms to prevent the boot process from hanging
> if the server is unavailable.
> 
> [...describing the "bg" option...]
> 
> Useful for fstab(5), where the file system mount is not
> critical to multiuser operation.
> 
> I read these statements to mean "if -o bg is used, the system should
> not
> hang/stall/fail during the boot process". Dumping to /bin/sh on boot
> as
> a result of a DNS lookup failure violates those statements, IMHO.
> 
> I would agree that DNS resolution should be part of the bg/retry
> feature
> of "bg" in mount_nfs. How/whether this is feasible to implement is
> unknown to me.
> 
I don't think punting to "bg" when a DNS failure occurs is a particularily
good idea, mostly because it doesn't help for critical mounts. (I haven't looked
to see if the change is feasible, either.)

It would be nice to get DNS working more reliably early in boot and the,
of course, there is what Doug stated w.r.t. use IP numbers or put
entries in /etc/hosts for NFS servers.

rick
ps: I do think that "server unavailable" doesn't imply
    "server is available, but DNS can't resolve it's address".
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to