mountlate not late enough for nfe0 with dhcp

Jeremy Chadwick freebsd at jdc.parodius.com
Thu May 26 23:14:50 UTC 2011


On Thu, May 26, 2011 at 11:35:41PM +0200, William Palfreman wrote:
> I find my nfe0 interface on my media server (an Acer Revo Atom) has not
> finished dhcp by the time /etc/rc.d/mountlate is run, or
> /etc/rc.d/mountcritremote.  So the two NFS filesystems I want to mount cause
> booting to halt in the most inconvenient manner possible for a machine with
> no keyboard.
> 
> I originally had this problem with mountcritremote, so I added the late
> option to /ett/fstab:
> 
> nfshost:/share     /nfs            nfs     rw,late         0       0
> nfshost:/data       /data          nfs     ro,late          0       0
> 
> But the network was still not up by the time /etc/rc.d/mountlate ran.  So I
> slowed things down with the patch you can see below.
>
> [snip]

This has been discussed at length in the past, causing me to write an
rc.d script to work around the problem.  You can drop this script into
/usr/local/etc/rc.d, chmod 755 it, and make use of it appropriately.
The comments in the script should help you understand it.

http://jdc.parodius.com/freebsd/netwait

Example entries in rc.conf:

netwait_enable="yes"
netwait_ip="4.2.2.1 4.2.2.2"
netwait_if="em0"

I can point you to lengthy discussions on the mailing lists about this
problem if need be, but they're from last year or the year before.  They
basically discuss the problem and are what caused me to write what I
did.

synchronous_dhcp might solve this problem for you as well, but I tend to
recommend folks use netwait in more complex situations.  A "simple
sleep" is not 100% reliable and makes a lot of (bad) assumptions.

-- 
| Jeremy Chadwick                                   jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.               PGP 4BD6C0CB |



More information about the freebsd-stable mailing list