[lkml]   [2003]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: About /etc/mtab and /proc/mounts wrote:
> On Thu, 27 Feb 2003 20:47:05 +0100, Kasper Dupont said:
> > mnttab report in those cases? And while we are discussing bind mounts, there
> > is one feature that I have sometimes missed: A possibility to directly mount
> > a subdirectory of a filesystem without having to mount the root of that
> > filesystem first and use a bindmount afterwards.
> Hmm.. so what you mean is being able to have a filesystem called (for example)
> /somewhere, and being able to mount /somewhere/deep/path/like/this on a
> mountpoint /wherever/else, but without having /somewhere mounted itself?


> That looks *almost* doable, except that things like quotas or the free
> block list would be a hassle if then you also went and mounted
> /somewhere/deep/other/path on /something/else

It is doable. And you don't need to change the filesystems themselves.
In fact VFS has most of the support right now. It can be done in
userspace, I can do it by first mounting /somewhere then use --bind
and finally unomount /somewhere. The reason I brought it up is that
if we are going to change mount, we might want to add this feature,
and we should find some better strings for the device field in mtab.
Right now the sequence of commands I suggested would leave the name
of an unmounted filesystem in a device field in the mtab file. Perhaps
rather than writing the oldparth, it would be wiser to write
device:path in the device field, where path would be path relative to
the root of the filesystem. Then that same notation could be supported
by mount, and implemented by temporarily mounting the root of that

The only case that couldn't be done from userspace is mounting of the
root. Now some people might say nobody would need that feature, and it
could be done using initrd and some pivot_root stuff anyway. But in
fact a very similar feature already exists in the umsdos filesystem.
IMHO that feature should be removed from umsdos and reimplemented
using pivot_root instead. Then at the same time the hardcoded paths
could be changable through boot options, and the feature could become
filesystem independend.

Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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