Bug 899 - /var/db/mountdtab can contain useless/outdated info
Summary: /var/db/mountdtab can contain useless/outdated info
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 2.2-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1995-12-17 13:00 UTC by faried nawaz
Modified: 1995-12-19 10:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description faried nawaz 1995-12-17 13:00:01 UTC
/var/db/mountdtab is not removed on bootup, and so hosts "appear" to be
mounting drives when they aren't doing so.

Fix: 

perhaps mountd should remove a client's entry from /var/db/mountdtab
when the client umounts?--O0EMOMSSqV2HYUnuGn38fTGB5KRT8f8qlkl7TxrgTBbWSOit
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- /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
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'.
Comment 1 Joerg Wunsch 1995-12-18 08:59:26 UTC
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. ;-)
Comment 2 wes 1995-12-18 16:29:06 UTC
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
Comment 3 Joerg Wunsch freebsd_committer freebsd_triage 1995-12-19 09:54:18 UTC
State Changed
From-To: open->closed

This is the intented behaviour, not a bug.