From owner-freebsd-questions@FreeBSD.ORG Fri Sep 3 19:56:19 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D834210656BD for ; Fri, 3 Sep 2010 19:56:19 +0000 (UTC) (envelope-from enlil65@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6E5888FC1C for ; Fri, 3 Sep 2010 19:56:19 +0000 (UTC) Received: by wyb33 with SMTP id 33so2366571wyb.13 for ; Fri, 03 Sep 2010 12:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Sez3ahgIOyUpaDRlyIG7pHlubpoI2I8O/V+xUBt+58c=; b=SeIr5MOYs3d0q/9AB6dO5HNoUwuWdOvW8EPkNk5n9vRfJjhcLi1/zVx/whch5yDI15 qVZOMJzA4UVMA24G/RFRu4rudbYesWQM3wVJrCegc1UDCNIyn7OeMRB1b1eMKXNJsLPS RgsDgBlgFT3sgwbI90VwuZPburtDT8/DXcD0I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=J1dLWC9q2/0txhxKBJ/DvVRA177I3bQGcULGbOijCJrk0aRrviqdhB7vyaXWg/UXr3 k98tqVkoZ3JGL1WhOR4wXPH4N5UQF6QxBR0QlJRyylf7aNJ9M79z2tF+1pCv3tzmGs50 24dRgKOQrySxbrh3BQknp+BM1LiZD/Cst7Bt0= MIME-Version: 1.0 Received: by 10.227.148.2 with SMTP id n2mr239600wbv.216.1283543778165; Fri, 03 Sep 2010 12:56:18 -0700 (PDT) Received: by 10.216.165.211 with HTTP; Fri, 3 Sep 2010 12:56:18 -0700 (PDT) In-Reply-To: References: <4C1B20F0.2090804@mapper.nl> Date: Fri, 3 Sep 2010 14:56:18 -0500 Message-ID: From: Peggy Wilkins To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: network deamons starting before network! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2010 19:56:19 -0000 On Thu, Sep 2, 2010 at 9:45 AM, Peggy Wilkins wrote: > On Fri, Jun 18, 2010 at 2:32 AM, Mark Stapper wrote: > >> Since updating to 8.X I noticed that network services were started >> before the network was up! >> I use lagg failover configuration on both my FreeBSD boxes. >> First, boot fails on mounting my nfs-shares. >> After entering and exiting the "rescue" shell, the system boots as norma= l. >> >> uname -a >> FreeBSD mario 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #4: Fri Jun 18 >> 07:46:01 CEST 2010 =A0 =A0 ****@mario:/usr/obj/usr/src/sys/mario =A0amd6= 4 >> What could I do to fix this? >> >> Here's an exerpt from /var/log/messages: >> >> Jun 18 09:10:25 =A0ntpd[1376]: ntpd 4.2.4p5-a (1) >> Jun 18 09:10:25 =A0kernel: fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.8 >> Jun 18 09:10:27 =A0ntpd_initres[1412]: host name not found: yoshi >> Jun 18 09:10:27 =A0kernel: nfe0: link state changed to UP >> Jun 18 09:10:27 =A0kernel: lagg0: link state changed to UP >> Jun 18 09:10:27 =A0kernel: nfe1: link state changed to UP >> Jun 18 09:10:27 =A0ntpd_initres[1412]: couldn't resolve `yoshi', giving = up >> on it >> Jun 18 09:10:28 =A0dhclient: New Hostname (lagg0): mario >> Jun 18 09:10:28 =A0dhclient: New IP Address (lagg0): 10.58.235.6 >> Jun 18 09:10:28 =A0dhclient: New Subnet Mask (lagg0): 255.255.255.0 >> Jun 18 09:10:28 =A0dhclient: New Broadcast Address (lagg0): 10.58.235.25= 5 >> Jun 18 09:10:28 =A0dhclient: New Routers (lagg0): 10.58.235.1 > > I upgraded my amd64 FreeBSD-8.0-RELEASE-p4 system to > FreeBSD-8.1-RELEASE earlier this week. =A0After completing the upgrade > and rebooting, I also am having the above reported problem. > > I am not using dhcp, I have configured a static IP address. > > My system also has nfe NIC. =A0I wonder if this problem is specific to > systems using nfe network driver. =A0The problem was not occuring on my > 8.0 system, before the upgrade to 8.1. > > Here are my boot messages that display this problem. [snip] > It is pretty clear that the network services are all getting started > twice, once before dropping to single user shell, and a second time > after exiting single user. > > It is also pretty clear that "nfe0: link state changed to DOWN" is > happening at a bad time; and nothing that requires network to be up is > waiting for it to change to UP. I have a workaround for this problem, albeit an ugly workaround. I edited /etc/rc.d/netif to add a 10 second sleep as each network interface is brought up: if [ -n "${_ok}" ]; then case ${_func} in ifn_start) _str=3D'Starting' ;; ifn_stop) _str=3D'Stopping' ;; esac echo "${_str} Network:${_ok}." if check_startmsgs; then for ifn in ${_ok}; do /sbin/ifconfig ${ifn} sleep 10 done fi fi This is probably overkill, and for me it adds 20 seconds to boot time, but it works for me until the general problem is solved. I think there is a general bug with the rc.d/rcorder framework, because even outside this weird case with nfe NIC if any network mount fails during the early part of rc processing it is repeated in the late part via "mount -a" in the second passthrough. This results potentially in multiple mounts of the same remote filesystem (e.g. if mount_nfs is backgrounded in the first pass mount_nfs will be run a second time in the second pass; and if the first problem isn't resolved the second mount_nfs is also backgrounded. For me this usually results in two mounts of the same remote filesystem, after the (presumably temporary) network mounting problem resolves). plw