Bug 22308

Summary: [nfs] mounting NFS during boot blocks if host map comes from NIS
Product: Base System Reporter: brandt <brandt>
Component: confAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   

Description brandt 2000-10-26 11:10:01 UTC
	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.

Fix: 

Change the order in /etc/rc to mount NFS after doing the ypbind.
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.
Comment 1 dima 2000-10-26 23:03:12 UTC
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
Comment 2 brandt 2000-10-27 08:07:21 UTC
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
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:55 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped