From owner-freebsd-stable@FreeBSD.ORG Thu May 26 23:14:50 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0B35106566C for ; Thu, 26 May 2011 23:14:50 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta11.emeryville.ca.mail.comcast.net (qmta11.emeryville.ca.mail.comcast.net [76.96.27.211]) by mx1.freebsd.org (Postfix) with ESMTP id 6F7B68FC15 for ; Thu, 26 May 2011 23:14:50 +0000 (UTC) Received: from omta21.emeryville.ca.mail.comcast.net ([76.96.30.88]) by qmta11.emeryville.ca.mail.comcast.net with comcast id oNsv1g0011u4NiLABPEpiV; Thu, 26 May 2011 23:14:49 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta21.emeryville.ca.mail.comcast.net with comcast id oPEo1g00i1t3BNj8hPEopo; Thu, 26 May 2011 23:14:49 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id C488F102C19; Thu, 26 May 2011 16:14:47 -0700 (PDT) Date: Thu, 26 May 2011 16:14:47 -0700 From: Jeremy Chadwick To: William Palfreman Message-ID: <20110526231447.GA92428@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org Subject: Re: mountlate not late enough for nfe0 with dhcp X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 23:14:50 -0000 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 |