From fn@pain.csrv.uidaho.edu  Sun Dec 17 04:55:51 1995
Received: from pain.csrv.uidaho.edu (root@pain.csrv.uidaho.edu [129.101.114.109])
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id EAA27715
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 17 Dec 1995 04:55:50 -0800 (PST)
Received: (from fn@localhost) by pain.csrv.uidaho.edu (8.6.12/8.6.9) id EAA06657; Sun, 17 Dec 1995 04:55:48 -0800
Message-Id: <199512171255.EAA06657@pain.csrv.uidaho.edu>
Date: Sun, 17 Dec 1995 04:55:48 -0800
From: Faried Nawaz <fn@pain.csrv.uidaho.edu>
Reply-To: fn@pain.csrv.uidaho.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: /var/db/mountdtab not removed on bootup.
X-Send-Pr-Version: 3.2

>Number:         899
>Category:       bin
>Synopsis:       /var/db/mountdtab can contain useless/outdated info
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 17 05:00:01 PST 1995
>Closed-Date:    Tue Dec 19 10:54:18 MET 1995
>Last-Modified:  Tue Dec 19 11:00:04 MET 1995
>Originator:     Faried Nawaz
>Release:        FreeBSD 2.2-CURRENT i386
>Organization:
>Environment:

this problem's in 2.x, i think.  i'm

FreeBSD pain.csrv.uidaho.edu 2.2-CURRENT FreeBSD 2.2-CURRENT #0: Wed Dec 13 20:01:46 PST 1995     fn@pain.csrv.uidaho.edu:/disk1/src/sys/compile/pain  i386


>Description:

/var/db/mountdtab is not removed on bootup, and so hosts "appear" to be
mounting drives when they aren't doing so.

>How-To-Repeat:

set up the nfs server stuff on host 'A',
export a drive/directory to host 'B',
mount host_a:/whatever on host 'B',
unmount,
reboot host 'A', wait for it to come back up
type 'showmount host_a'.

>Fix:
	

--- /etc/rc~	Sun Dec 17 04:49:39 1995
+++ /etc/rc	Sun Dec 17 04:49:52 1995
@@ -210,6 +210,7 @@
 fi
 
 if [ "X${nfs_server}" = X"YES" -a -r /etc/exports ]; then
+	cp /dev/null /var/db/mountdtab
 	echo -n ' mountd'
 	if [ "X${pcnfsd}" = X"YES" ]; then
 		mountd -n


perhaps mountd should remove a client's entry from /var/db/mountdtab
when the client umounts?
>Release-Note:
>Audit-Trail:

From: J Wunsch <j@uriah.heep.sax.de>
To: fn@pain.csrv.uidaho.edu
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: bin/899: /var/db/mountdtab not removed on bootup.
Date: Mon, 18 Dec 1995 09:59:26 +0100 (MET)

 As Faried Nawaz wrote:
 > 
 > >Description:
 > 
 > /var/db/mountdtab is not removed on bootup, and so hosts "appear" to be
 > mounting drives when they aren't doing so.
 
 I believe this is rather a bug in the NFS implementation in not
 removing mountdtab entries at umount time.
 
 Removing mountdtab on bootup is the wrong way.  It is _intented_ to
 persist across system boots, since the NFS protocol was designed so
 that a server can go down and up again while a client is holding it
 mounted.
 
 -- 
 cheers, J"org
 
 joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
 Never trust an operating system you don't have sources for. ;-)

From: Barnacle Wes <wes@intele.net>
To: j@uriah.heep.sax.de
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: bin/899: /var/db/mountdtab not removed on bootup.
Date: Mon, 18 Dec 1995 09:29:06 -0700 (MST)

 Faried Nawaz hypothesized:
 % /var/db/mountdtab is not removed on bootup, and so hosts "appear" to be
 % mounting drives when they aren't doing so.
 
 J Wunsch replied:
 >  I believe this is rather a bug in the NFS implementation in not
 >  removing mountdtab entries at umount time.
 
 You are, of course, correct.  ;^)
 
 This bug has existed for many years; the SunOS 3.6 implementation
 (circa 1989) exhibited this same problem.  There might be a historical
 reason for this behavior that we don't know, but it has always seemed
 like a bug to me.
 
 
 -- 
    Wes Peters	| Yes I am a pirate, two hundred years too late
     Softweyr 	| The cannons don't thunder, there's nothing to plunder
    Consulting	| I'm an over forty victim of fate...
  wes@intele.net	|					Jimmy Buffet
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Tue Dec 19 10:54:18 MET 1995 
State-Changed-Why:  
This is the intented behaviour, not a bug. 

>Unformatted:
