From nobody@FreeBSD.ORG Thu Jun 24 05:19:50 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 8BA3E14E14; Thu, 24 Jun 1999 05:19:50 -0700 (PDT)
Message-Id: <19990624121950.8BA3E14E14@hub.freebsd.org>
Date: Thu, 24 Jun 1999 05:19:50 -0700 (PDT)
From: conrad@dirac.physik.uni-bonn.de
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: When mounting NFS dirs, /etc/rc doesn't give sensible error messages
X-Send-Pr-Version: www-1.0

>Number:         12376
>Category:       misc
>Synopsis:       When mounting NFS dirs, /etc/rc doesn't give sensible error messages
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dillon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 24 05:20:01 PDT 1999
>Closed-Date:    Sat Oct 2 12:47:29 PDT 1999
>Last-Modified:  Sat Oct  2 12:48:31 PDT 1999
>Originator:     Jan Conrad
>Release:        2.2.7 / 3.2
>Organization:
Univ. of Bonn, Germany
>Environment:
FreeBSD merlin.physik.uni-bonn.de 3.2-RELEASE FreeBSD 3.2-RELEASE #1: Sun Jun 13 12:57:02 CEST 1999     conrad@merlin.physik.uni-bonn.de:/nilles/freebsd/src/sys/compile/MERLIN  i386

>Description:
When mounting NFS dirs, /etc/rc uses (line 173)
	mount -a -t nfs
However, this often doesn't succeed because of NFS errors (which are
NOT the subject of this bug report).
However, in that case THE ERROR MESSAGE DOES NOT TELL WHICH MOUNT
PRODUCED THE ERROR, BECAUSE '-v' WAS NOT SPECIFIED IN /etc/rc.
>How-To-Repeat:
Boot the Box in an environment whith many NFS mounts
>Fix:
Use
	mount -v -a -t nfs
in /etc/rc
Better: modify mountd to produce sensible error messages...

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: sheldonh 
State-Changed-When: Thu Jun 24 07:15:48 PDT 1999 
State-Changed-Why:  
It's unlikely that your suggested "-v" change will be acceptable, 
since it introduces unnecessary diagnostic lines on successful mounts  
too. Could you send an example of the text that you _do_ see when 
an NFS mount fails? 
State-Changed-From-To: feedback->open 
State-Changed-By: sheldonh 
State-Changed-When: Sun Jun 27 12:47:40 PDT 1999 
State-Changed-Why:  
Submitter understands that making a change to "tide us over" a bad 
spell with our NFS support is a bad idea. Submitter seems interested 
in coming up with a patch for mount that will provide sensible 
output when NFS mounts fail. (private mail) 

From: Jan Conrad <conrad@th.physik.uni-bonn.de>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc:  
Subject: Re: misc/12376: When mounting NFS dirs, /etc/rc doesn't give sensible
 error messages
Date: Fri, 30 Jul 1999 14:05:51 +0200 (CEST)

 Hi Sheldon,
 
 On Thu, 29 Jul 1999, Sheldon Hearn wrote:
 
 > 
 > Hi Jan,
 > 
 > Have you taken a crack at the problem you reported in PR 12376 ?  I'm
 > curious because nobody else has commented on the PR. If you've lost
 > interest, let me know and I'll close the PR.
 
 I am sorry for my late answer, but I was vary busy with the STRINGS'99
 conference (I am a theoretical physicist) and. in addition, I first wanted
 to find the real bug (see kern/12609).
 
 I came to the following conclusions:
 
 First of all, when you just issue a mount from the command line, the error
 messages are quite ok, since you usually know what the mountpoint is etc..
 And I am pretty sure that unix users don't want to see error messages
 telling them something they allready know (at least this is my
 impression).
 
 The problem appears when you mount automatically at boottime. Since the
 '-v' flag isn't appreciated, and in addition, it is not handed over to say
 mount_nfs, where sould mount_nfs know from that it should produce a longer
 message??? One could invent a new option, but that's not an issue, I
 think.
 
 One thing, however, could be changed: when mount_nfs goes to
 background, because bg is set and some error occures, it could issue a
 message like 'backgrounding <MOUNT INFORMATION>'. This would help a lot:
 the error message I got came from a backgrounded mount_nfs that called
 itself 'nfs'. But, I think, as this message was standard in older
 BSDlike unixes (say Ultrix 3), it must have been taken out because people
 didn't like it...
 
 So I don't know whether people like such a message.
 
 Another problem comes from the fact, that, when '-v' is specified, mount
 displays the mountpoint information using statfs. So if the mount doesn't
 succeed and is backgrounded, mount issues a statsfs on the parent file
 system and thus displays the wrong information.
 
 But since mount_nfs give back success as an exit code after it
 backgrounded, mount can't tell that the mount didn't succeed!
 
 I really don't know how to fix this... (Well, in my opinion mount_nfs
 should not give back success after backgrounding - that would help..)
 
 
 In conclusion, I would like mount_nfs to give a message like
 'backgrounding...' (this is my opinion since I know FreeBSD...).
 but I am not sure this is appreciated..
 
 What do you think about it?
 > 
 > Ciao,
 > Sheldon.
 > 
 best regards
 	Jan
 
 
 
Responsible-Changed-From-To: freebsd-bugs->dillon 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Fri Oct 1 04:50:21 PDT 1999 
Responsible-Changed-Why:  
Over to the NFS maintainer, who might be interested in diffs. ;-) 
State-Changed-From-To: open->closed 
State-Changed-By: dillon 
State-Changed-When: Sat Oct 2 12:47:29 PDT 1999 
State-Changed-Why:  
Added warning for foreground failure of mount_nfs prior to it going into  
background mode.  The Warning includes the name of the mount source. 
>Unformatted:
