From mark@seeware.DIALix.oz.au  Fri Oct 18 17:55:38 1996
Received: from melbourne.DIALix.oz.au (uucp@melbourne.DIALix.oz.au [192.203.228.98])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA06087
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Oct 1996 17:55:32 -0700 (PDT)
Received: (from uucp@localhost) by melbourne.DIALix.oz.au (sendmail) with UUCP id KAA26613 for FreeBSD-gnats-submit@freebsd.org; Sat, 19 Oct 1996 10:55:18 +1000 (EST)
Received: (from mark@localhost) by doorway.seeware.DIALix.oz.au (8.7.5/8.7.3) id KAA22858; Sat, 19 Oct 1996 10:41:08 +1000 (EST)
Message-Id: <199610190041.KAA22858@doorway.seeware.DIALix.oz.au>
Date: Sat, 19 Oct 1996 10:41:08 +1000 (EST)
From: mark@seeware.DIALix.oz.au
Reply-To: mark@seeware.DIALix.oz.au
To: FreeBSD-gnats-submit@freebsd.org
Subject: Multiple mfs mounts of same mount point
X-Send-Pr-Version: 3.2

>Number:         1839
>Category:       kern
>Synopsis:       Multiple mfs mounts of same mount point
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    steve
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 18 18:00:01 PDT 1996
>Closed-Date:    Sun Aug 24 14:03:50 PDT 1997
>Last-Modified:  Sun Aug 24 14:06:01 PDT 1997
>Originator:     Mark Hannon
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
>Environment:

FreeBSD-2.1.5

>Description:

FreeBSD-2.1.5, mount behaves very strangely, after making a mistake
in my fstab and running mount -av several times I get the following:

putte:~# df
Filesystem        1K-blocks     Used    Avail Capacity  Mounted on
/dev/wd0a             29727    13729    13620    50%    /
mfs:18                 7199        7     6617     0%    /tmp
/dev/wd0s1g          347647   216884   102952    68%    /home
/dev/wd0s1e           98479    69336    21265    77%    /usr
/dev/wd0s1f          297423   163296   110334    60%    /usr/local
/dev/wd0s1h           48463     1314    43272     3%    /var
procfs                    4        4        0   100%    /proc
doorway:/var/mail     78975    23927    48730    33%    /var/mail
/dev/matcd0a         650002   650002        0   100%    /cdrom
mfs:2912               7199        1     6623     0%    /tmp
doorway:/var/mail     78975    23927    48730    33%    /var/mail
mfs:2923               7199        1     6623     0%    /tmp
doorway:/var/mail     78975    23927    48730    33%    /var/mail
doorway:/var/mail     78975    23927    48730    33%    /var/mail
mfs:2974               7199        1     6623     0%    /tmp
mfs:2986               7199        1     6623     0%    /tmp
doorway:/var/mail     78975    23927    48730    33%    /var/mail

My fstab is:
/dev/wd0s1b             none            swap    sw 0 0
/dev/wd0a               /               ufs     rw 1 1
/dev/wd0s1b             /tmp            mfs     rw,-s=16384,-b=8192,-f=1024 0 0
/dev/wd0s1g             /home           ufs     rw 1 1
doorway:/home/www       /home/www       nfs     rw 0 0
/dev/wd0s1e             /usr            ufs     rw 1 1
/dev/wd0s1f             /usr/local      ufs     rw 1 1
/dev/wd0s1h             /var            ufs     rw 1 1
doorway:/var/mail       /var/mail       nfs     rw 0 0
proc                    /proc           procfs  rw 0 0
/dev/matcd0a            /cdrom          cd9660  ro,noauto 0 0
/dev/wd0s2              /dos/c          msdos   rw,noauto 0 0

>How-To-Repeat:

Not 100% sure - will keep an eye out, I think that it occurs when making 
a failed attempt to mount all partitions, ie I saw after I had edited
fstab a number of times to get the mount points right.

>Fix:
	
Reboot

>Release-Note:
>Audit-Trail:

From: J Wunsch <j@uriah.heep.sax.de>
To: mark@seeware.DIALix.oz.au
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/1839: Multiple mfs mounts of same mount point
Date: Sat, 19 Oct 1996 16:27:11 +0200 (MET DST)

 As mark@seeware.DIALix.oz.au wrote:
 
 > FreeBSD-2.1.5, mount behaves very strangely, after making a mistake
 > in my fstab and running mount -av several times I get the following:
 > 
 > putte:~# df
 > Filesystem        1K-blocks     Used    Avail Capacity  Mounted on
 > /dev/wd0a             29727    13729    13620    50%    /
 > mfs:18                 7199        7     6617     0%    /tmp
 > /dev/wd0s1g          347647   216884   102952    68%    /home
 > /dev/wd0s1e           98479    69336    21265    77%    /usr
 > /dev/wd0s1f          297423   163296   110334    60%    /usr/local
 > /dev/wd0s1h           48463     1314    43272     3%    /var
 > procfs                    4        4        0   100%    /proc
 > doorway:/var/mail     78975    23927    48730    33%    /var/mail
 > /dev/matcd0a         650002   650002        0   100%    /cdrom
 > mfs:2912               7199        1     6623     0%    /tmp
 > doorway:/var/mail     78975    23927    48730    33%    /var/mail
 > mfs:2923               7199        1     6623     0%    /tmp
 > doorway:/var/mail     78975    23927    48730    33%    /var/mail
 > doorway:/var/mail     78975    23927    48730    33%    /var/mail
 > mfs:2974               7199        1     6623     0%    /tmp
 > mfs:2986               7199        1     6623     0%    /tmp
 > doorway:/var/mail     78975    23927    48730    33%    /var/mail
 
 That's natural.  Basically, you've got what you've been asking for...
 You can mount a new instance of something over the old mountpoint.  (I
 think you can't mount a disk partition more than once, since it's
 simply busy afterwards, but for NFS and MFS, they will be mounted
 again and again.)
 
 You should be able to umount them in reverse order.
 
 If the above is your entire problem, i'd consider it a pilot error,
 and not a bug.  Well, maybe the semantics of `mount -a' should be
 changed from `try to mount everything you find in /etc/fstab' to `try
 to mount everything in /etc/fstab unless it's already mounted'.
 
 Opinions?
 
 -- 
 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: Mark Hannon <mark@seeware.DIALix.oz.au>
To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
Cc: mark@seeware.DIALix.oz.au, FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/1839: Multiple mfs mounts of same mount point 
Date: Sun, 20 Oct 1996 09:16:38 +1000

 > As mark@seeware.DIALix.oz.au wrote:
 > 
 > > FreeBSD-2.1.5, mount behaves very strangely, after making a mistake
 > > in my fstab and running mount -av several times I get the following:
 > > 
 > > putte:~# df
 > > Filesystem        1K-blocks     Used    Avail Capacity  Mounted on
 > > /dev/wd0a             29727    13729    13620    50%    /
 > > mfs:18                 7199        7     6617     0%    /tmp
 > > /dev/wd0s1g          347647   216884   102952    68%    /home
 > > /dev/wd0s1e           98479    69336    21265    77%    /usr
 > > /dev/wd0s1f          297423   163296   110334    60%    /usr/local
 > > /dev/wd0s1h           48463     1314    43272     3%    /var
 > > procfs                    4        4        0   100%    /proc
 > > doorway:/var/mail     78975    23927    48730    33%    /var/mail
 > > /dev/matcd0a         650002   650002        0   100%    /cdrom
 > > mfs:2912               7199        1     6623     0%    /tmp
 > > doorway:/var/mail     78975    23927    48730    33%    /var/mail
 > > mfs:2923               7199        1     6623     0%    /tmp
 > > doorway:/var/mail     78975    23927    48730    33%    /var/mail
 > > doorway:/var/mail     78975    23927    48730    33%    /var/mail
 > > mfs:2974               7199        1     6623     0%    /tmp
 > > mfs:2986               7199        1     6623     0%    /tmp
 > > doorway:/var/mail     78975    23927    48730    33%    /var/mail
 > 
 > That's natural.  Basically, you've got what you've been asking for...
 > You can mount a new instance of something over the old mountpoint.  (I
 > think you can't mount a disk partition more than once, since it's
 > simply busy afterwards, but for NFS and MFS, they will be mounted
 > again and again.)
 > 
 > You should be able to umount them in reverse order.
 > 
 Must admit that I didn't try this. 
 
 > If the above is your entire problem, i'd consider it a pilot error,
 > and not a bug.  Well, maybe the semantics of `mount -a' should be
 > changed from `try to mount everything you find in /etc/fstab' to `try
 > to mount everything in /etc/fstab unless it's already mounted'.
 > 
 > Opinions?
 > 
 At least to my way of thinking the command semantics should be to mount
 everything that isn't already mounted - I use the command if I ever update
 fstab with several changes - it that case what I really want is an update
 of the mount state - perhaps a different flag??
 
 In any case not a big issue - perhaps all that needs to be done is to add some
 text to the mountd man page.
 
 Rgds/mark
 -- 
 +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
 | Mark Hannon,| FreeBSD, Free Unix for your PC | mark@seeware.DIALix.oz.au|
 | Melbourne,  | PGP key available by fingering | epamha@epa.ericsson.se   |
 | Australia   | seeware@melbourne.DIALix.oz.au |                          |
 +-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
 
 
State-Changed-From-To: open->analyzed 
State-Changed-By: mpp 
State-Changed-When: Fri Feb 21 18:39:18 PST 1997 
State-Changed-Why:  
Joerg analyzed this one aldready... 


Responsible-Changed-From-To: freebsd-bugs->mpp 
Responsible-Changed-By: mpp 
Responsible-Changed-When: Fri Feb 21 18:39:18 PST 1997 
Responsible-Changed-Why:  
I'll field this one. 
Responsible-Changed-From-To: mpp->freebsd-bugs 
Responsible-Changed-By: steve 
Responsible-Changed-When: Sat Aug 16 16:24:33 PDT 1997 
Responsible-Changed-Why:  
Remove mpp at the responsible person. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: steve 
State-Changed-When: Sun Aug 24 14:03:50 PDT 1997 
State-Changed-Why:  
In -current mount(8) tries to avoid mounting filesystems 
multiple times, with the exception of the root filesystem. 
>Unformatted:
