lkml.org 
[lkml]   [1996]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Overmounting a filesystem
On Tue, 9 Apr 1996, H. Peter Anvin wrote:

> >
> > On 9 Apr 1996, H. Peter Anvin wrote:
> >
> > > Currently it seems Linux does not permit overmounting a filesystem
> > > (mounting a filesystem on top of another, on the same path).
> >
> > Just tried it, and it works:
> >
> > /dev/hda1 on / type ext2 (rw)
> > /dev/hda2 on /home type ext2 (rw)
> > /proc on /proc type proc (rw)
> > /dev/hda3 on /home/eddie type ext2 (rw)
> >
>
> Try mounting /dev/hda3 on /home, on top of /dev/hda2 instead. That's
> what I'm talking about.

Ok, I tried that and the attempt was rejected. I still think that is the
logical think for Linux to do.

Why would you want to do such a thing anyway? If you need a filesystem
mounted onto another, make a subdirectory for that filesystem. Mounting a
filesystem in a populated directory hides the existing files anyway, how
do you benefit?

Using the same mount point for various filesystems seems to me to be
an easy way to cause confusion about what filesystem you are actually
using at a given point in time. It make more sense to me to create
dedicated mount points for various filesystems even when they are
frequently mounted and unmounted.

Another options, of course, is to unmount the existing filesystem first.
If you don't want type both the unmount and mount commands, then make an
alias or script!

IMHO, this all seems to boil down to laziness.

Please convince me otherwise, I very well may have tunnel vision on this
subject.


Now here's something really scary!

[root@titus /home]# mount
/dev/hda1 on / type ext2 (rw)
/dev/hda2 on /home type ext2 (rw)
/proc on /proc type proc (rw)
/dev/hda3 on /usr/src type ext2 (rw)
[root@titus ~]# ls /usr/src
BASE BUILD
INTERNET NET
LIBS RPMS
SOURCES SPECS
SRPMS UTIL
X digi-1.5
linux lost+found
[root@titus ~]# umount /usr/src
[root@titus ~]# mount -oremount /dev/hda3 /home
[root@titus ~]# mount
/dev/hda1 on / type ext2 (rw)
/dev/hda3 on /home type ext2 (rw)
/proc on /proc type proc (rw)
[root@titus ~]# ls /home
eddie ftp httpd lost+found roadcapw

The shown contents of /home IS NOT what is in the root directory of
filesystem /dev/hda3! Yet, mount shows that /dev/hda3 is mounted onto
/home. So, what filesystems is REALLY mounted there. Scares the hell
out of me.
__
William E. Roadcap mailto://roadcapw@cfw.com
TITUS Software ftp://titus.cfw.com/pub
Waynesboro, Va (USA) http://www.cfw.com/~roadcapw



\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.056 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site