In <[EMAIL PROTECTED]>, Steven Hartland <[EMAIL PROTECTED]> typed:
> Eric Anderson wrote:
> > I don't know about the fs corruption, but the double mounts is
> > something you asked it to do (maybe unknowingly).  When you added
> > that partition, one of the options is to mount it.
> Clearly an easy work around in that case then but personally
> I would expect a mount to a directory already in use by another
> mount point to fail. Taking even further a mount to a directory
> that is not actually empty should fail. IIRC this is how solaris
> behaves but its been a while.

Yeah, there are some system that have that annoying behavior. I've
cursed at them before. Being able to create a skeleton for some
mounted file system on the root is a useful thing, and I've done it in
a number of cases. Mount has an option (union) specifically designed
for such cases. Further, we have at least one file system (unionfs)
that is explicitly designed to be mounted on top of non-empty
directories that people are actively using and developing.

> Either way allowing multiple mounts to the same location is bound to
> cause all manor of confusion and should be prevented.

This is just a special case of mounting on a non-empty directory. It
should work right. The last mounted file system is the one you get
(unless you're using a file system that's designed to behave another
way). If you unmount the directory, the last mounted device is
unmounted.

As a general rule, deciding that something is "useless and dangerous"
and removing it isn't the Unix way of doing things. Just because you
can't see a use for something doesn't mean that no one else
will. That's true even if you wrote the code. Someone doing something
with your program you never thought of is a sign that you developed a
generally useful tool. As for dangerous, Unix users - especially root,
and mount is restricted to root by default - are assumed to know what
they're doing.

        <mike
-- 
Mike Meyer <[EMAIL PROTECTED]>          http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to