From rivers@dignus.com  Sun Nov 29 17:16:33 1998
Received: from smtp1.vnet.net (smtp1.vnet.net [166.82.1.31])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA27625
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 29 Nov 1998 17:16:31 -0800 (PST)
          (envelope-from rivers@dignus.com)
Received: from dignus.com (ponds.vnet.net [166.82.177.48])
	by smtp1.vnet.net (8.9.1a/8.9.1) with ESMTP id UAA18528
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 29 Nov 1998 20:16:23 -0500 (EST)
Received: from lakes.dignus.com (lakes.dignus.com [10.0.0.3])
	by dignus.com (8.9.1/8.8.5) with ESMTP id UAA01051
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 29 Nov 1998 20:56:23 -0500 (EST)
Received: (from rivers@localhost) by lakes.dignus.com (8.9.1/8.6.9) id UAA11836; Sun, 29 Nov 1998 20:16:54 -0500 (EST)
Message-Id: <199811300116.UAA11836@lakes.dignus.com>
Date: Sun, 29 Nov 1998 20:16:54 -0500 (EST)
From: Thomas David Rivers <rivers@dignus.com>
Reply-To: rivers@dignus.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: NFS mounts & /etc/rc
X-Send-Pr-Version: 3.2

>Number:         8903
>Category:       conf
>Synopsis:       /etc/rc can do NFS mounts before the network is "up"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    dillon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 29 17:20:02 PST 1998
>Closed-Date:    Wed Sep 04 12:11:03 PDT 2002
>Last-Modified:  Wed Sep 04 12:11:03 PDT 2002
>Originator:     Thomas David Rivers
>Release:        FreeBSD 3.0-RELEASE i386
>Organization:
Dignus, LLC
>Environment:

	Stock 3.0-RELEASE

>Description:

	In /etc/rc - we do NFS mounts after the first stage of
	network startup (stage #1).

	However, named isn't started until a later stage.  So, if
	you're also running a name server - you're NFS mounts hang.

>How-To-Repeat:

	Add NFS mounts (by name) to /etc/fstab and run a primary
	name server for your zone.

>Fix:

	I found the following diff to /etc/rc 
	fixed my problem; but it moves the NFS mounts until after
	the third stage of network startup.  I can imagine this
	might make diskless support a little "hairy".
	
	So - I left the original location commented out...

*** rc.ori	Sat Nov 28 16:20:48 1998
--- rc	Sat Nov 28 16:35:33 1998
***************
*** 137,145 ****
  	network_pass1
  fi
  
! echo -n "Mounting NFS file systems"
! mount -a -t nfs
! echo .
  
  # Whack the pty perms back into shape.
  chmod 666 /dev/tty[pqrsPQRS]*
--- 137,145 ----
  	network_pass1
  fi
  
! #echo -n "Mounting NFS file systems"
! #mount -a -t nfs
! #echo .
  
  # Whack the pty perms back into shape.
  chmod 666 /dev/tty[pqrsPQRS]*
***************
*** 207,212 ****
--- 207,213 ----
  	network_pass2
  fi
  
+ 
  # Check the quotas (must be after ypbind if using NIS)
  if [ "X${check_quotas}" = X"YES" ]; then
  	echo -n 'checking quotas:'
***************
*** 219,224 ****
--- 220,228 ----
  	network_pass3
  fi
  
+ echo -n "Mounting NFS file systems"
+ mount -a -t nfs
+ echo .
  
  # build ps databases
  kvm_mkdb 

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dillon 
Responsible-Changed-By: phantom 
Responsible-Changed-When: Mon Jan 10 05:41:13 PST 2000 
Responsible-Changed-Why:  
NFS is Matt's area 

From: "Leif Neland" <leif@neland.dk>
To: <freebsd-gnats-submit@FreeBSD.org>, <rivers@dignus.com>
Cc:  
Subject: Re: conf/8903: /etc/rc can do NFS mounts before the network is "up"
Date: Sun, 17 Jun 2001 11:49:08 +0200

 VGhpcyBQUiBjYW4gYmUgY2xvc2VkDQoNCkluIC1jdXJyZW50LCANCiMgJEZyZWVCU0Q6IHNyYy9l
 dGMvcmMsdiAxLjI2OSAyMDAxLzA2LzEwIDEyOjA5OjExIHNoZWxkb25oIEV4cCAkDQoNCm5mcyBp
 cyBjYWxsZWQgYWZ0ZXIgcmMubmV0d29yaywgd2hpY2ggc3RhcnRzIG5hbWVkLg0KDQpMZWlmDQo=
 

From: Mike Makonnen <makonnen@pacbell.net>
To: freebsd-gnats-submit@FreeBSD.ORG
Cc:  
Subject: Re: conf/8903 /etc/rc can do NFS mounts before the network is "up"
Date: Wed, 04 Sep 2002 11:44:06 -0700

 I think this pr can be closed.
 
 If you want to run a nameserver on a machine which mounts part
 of its file system over nfs and you have this problem, there are
 several option:
 1. Specify IP addresses instead of host names in /etc/fstab
 2. Have a secondary/fallback nameserver in /etc/resolv.conf
         i.e. nameserver 127.0.0.1
              nameserver 192.168.1.1
 
 Your solution works for you because you probably do not nfs mount any
 critical (/, /usr) filesystems. However, this solution would not work
 for others that may mount, say /var, over nfs. I think solution #2 is
 the better choice in a situation like this.
 
 Cheers,
 Mike.
State-Changed-From-To: open->closed 
State-Changed-By: dillon 
State-Changed-When: Wed Sep 4 12:05:41 PDT 2002 
State-Changed-Why:  
Yah, I agree.  It's a chicken-and-egg problem.  I usually either use the 
IP address in /etc/fstab, or I use a hostname and I create an entry in 
/etc/hosts.  A fallback name server will also work but, generally speaking, 
if it is a critical NFS mount robustness is more important.  For non-critical 
NFS mounts I usually specify them as background mounts in /etc/fstab 
allowing the system to boot even if it cannot immediately locate the NFS 
server. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=8903 
>Unformatted:
