Date: Thu, 26 May 2011 16:14:47 -0700 From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: William Palfreman <william@palfreman.com> Cc: freebsd-stable@freebsd.org Subject: Re: mountlate not late enough for nfe0 with dhcp Message-ID: <20110526231447.GA92428@icarus.home.lan> In-Reply-To: <BANLkTik06mc6adjAeviEGa-4tvcVP_3TUA@mail.gmail.com> References: <BANLkTik06mc6adjAeviEGa-4tvcVP_3TUA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110526231447.GA92428>