Subject: Re: Double mount
To: None <current-users@netbsd.org>
From: Guenther Grau <Guenther.Grau@bk.bosch.de>
List: current-users
Date: 02/19/1999 16:50:50
Ted Lemon wrote:
> 
> > Maybe I am wrong, but... is it possible to mount two (or more) devices
> > to the same directory?
> 
> Given your experience, I would have to say yes.   But more to the
> point, what you see is not a bug - it's a feature.   If you were doing
> a union mount, for example, it would be a real drag if you couldn't do
> it right on top of an existing mount point.

Well, _if_ there was consensus that mount by default shouldn't allow
this,
it would be easy to add an additional option to mount to allow this.
This
should be implicitly set, if one adds the option -o union to mount.

On Solaris 2.5.1, mount does have the option -O to do this:

     -O             Overlay mount.  Allow the file system  to  be
                    mounted  over an existing mount point, making
                    the underlying file system inaccessible.   If
                    a  mount is attempted on a pre-existing mount
                    point without setting this  flag,  the  mount
                    will fail, producing the error "device busy".

This is just an additional data point. I am NOT saying we should
support this. I just wanted to let people know what other OS' do.
(And if we do, mount shouldn't return device busy, but mountpoint
busy :-)

  Guenther