From brandt@fokus.gmd.de  Thu Oct 26 03:05:38 2000
Return-Path: <brandt@fokus.gmd.de>
Received: from mailhub.fokus.gmd.de (mailhub.fokus.gmd.de [193.174.154.14])
	by hub.freebsd.org (Postfix) with ESMTP id 0F27437B479
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 26 Oct 2000 03:05:37 -0700 (PDT)
Received: from fokus.gmd.de (beagle [193.175.132.100])
	by mailhub.fokus.gmd.de (8.8.8/8.8.8) with ESMTP id MAA14603
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 26 Oct 2000 12:05:35 +0200 (MET DST)
Received: (from root@localhost)
	by fokus.gmd.de (8.11.1/8.11.0) id e9QA5Z101438;
	Thu, 26 Oct 2000 12:05:35 +0200 (CEST)
	(envelope-from hbb)
Message-Id: <200010261005.e9QA5Z101438@fokus.gmd.de>
Date: Thu, 26 Oct 2000 12:05:35 +0200 (CEST)
From: brandt@fokus.gmd.de
Reply-To: brandt@fokus.gmd.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: mounting NFS during boot blocks if host map comes from NIS
X-Send-Pr-Version: 3.2

>Number:         22308
>Category:       conf
>Synopsis:       [nfs] mounting NFS during boot blocks if host map comes from NIS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 26 03:10:01 PDT 2000
>Closed-Date:    
>Last-Modified:  Tue May 27 02:36:18 UTC 2008
>Originator:     Hartmut Brandt
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
GMD Fokus
>Environment:

	nsswitch.conf is setup as:

	hosts: files nis dns

	a lot of NFS file systems are mounted in /etc/fstab

>Description:

	mount_nfs blocks *very* long trying to get the NFS server's host
	names via NFS. changing the order to 'files dns nis' is a workaround.
	'files nis dns' works on Solaris without problems and should also
	on FreeBSD.

>How-To-Repeat:

	1. Edit /etc/nsswitch.conf as:

	hosts: files nis dns

	2. Mount at least on NFS file system in /etc/fstab for which you
	have no entry in /etc/hosts.

	3. Reboot and watch the NFS mount blocking.

>Fix:

	Change the order in /etc/rc to mount NFS after doing the ypbind.


>Release-Note:
>Audit-Trail:

From: Dima Dorfman <dima@unixfreak.org>
To: brandt@fokus.gmd.de
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: conf/22308: mounting NFS during boot blocks if host map comes from
 NIS
Date: Thu, 26 Oct 2000 15:03:12 -0700 (PDT)

 You may also want to try adding 'bg' to the mount options in fstab.
 This will cause the mount_nfs process to fork off and keep trying to
 mount the filesystem if it can't do it right away.  The obvious
 drawback is that your system may come up in multiuser without the
 filesystem mounted if your NIS server is a little slow.
 
 Furthermore, depending on your situation, you may want to look into
 using amd(8).
 
 > 	Change the order in /etc/rc to mount NFS after doing the ypbind.
 
 ypbind is on /usr; what if /usr is an imported filesystem?
 
 Regards
 
 -- 
 Dima Dorfman <dima@unixfreak.org>
 Finger dima@unixfreak.org for my public PGP key.
 
 "The best way to keep one's word is not to give it."
 	-- Napoleon Bonaparte
 

From: Harti Brandt <brandt@fokus.gmd.de>
To: Dima Dorfman <dima@unixfreak.org>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: conf/22308: mounting NFS during boot blocks if host map comes
 from NIS
Date: Fri, 27 Oct 2000 09:07:21 +0200 (CEST)

 On Thu, 26 Oct 2000, Dima Dorfman wrote:
 
 > You may also want to try adding 'bg' to the mount options in fstab.
 > This will cause the mount_nfs process to fork off and keep trying to
 > mount the filesystem if it can't do it right away.  The obvious
 > drawback is that your system may come up in multiuser without the
 > filesystem mounted if your NIS server is a little slow.
 
 Well, I did this, but it doesn't help. Somehow the way changed how the
 hostnames are retreived via NIS. With host.conf I also had NIS first and
 then DNS, but everything was fine. Now NIS blocks *VERY* long.
 
 > 
 > Furthermore, depending on your situation, you may want to look into
 > using amd(8).
 
 Oh, our infrastructure here is on Solaris and they have automount maps. I
 would like to use them, but no way. I tried to convert them automatically
 to amd maps - doesn't work (they use variables). I tried to figure out how
 to configure amd handish - I gave up after two days. But, I thought that
 my set-up should be rather usual.
 
 > ypbind is on /usr; what if /usr is an imported filesystem?
 
 I see. So obviously NIS lookup shouldn't block for too long when NIS is
 down! I'm by no means an expert, but isn't it possible to find out whether
 NIS is up *before* trying to use it in gethostbyname()?
 
 Regards,
 harti
 -- 
 harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private
               brandt@fokus.gmd.de, harti@begemot.org, lhbrandt@mail.ru
 
[bugmeister note: possibly related to conf/17540]
>Unformatted:
