lkml.org 
[lkml]   [1996]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Overmounting a filesystem
Date
>> mount /dev/hda2 /home
>> ... do things
>> mount /dev/hda3 /home
>
> can I do things like that:
>
> mount /dev/cdrom /cdrom
> mount /cdrom/adirectory /home/ftp/adirectory

With Linux, I am almost sure you can not do that.

With OSF/1 and Digital Unix, I think you can. You can mount
one file on top of another, so directories might work too.
I think it gets very complicated unless you are happy with
symlink behavior or a missing /cdrom/adirectory.

The complication is that you need a different view of the filesystem
for each process. Something in /home/ftp/adirectory is also in
/cdrom/adirectory, so what does .. refer to? If it refers to /cdrom,
then the mount behaves like a symlink (but more useful, because the
underlying directory need not be removed). If it refers to /cdrom
or /home/ftp depending on how the process got there, you have to
track different views of the filesystem for different processes.

BTW, this and the union fs do not belong in user space!
I think there is a huge security hole. Some process could
just ignore the library and make syscalls directly.




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