Re: [RFC] Filesystem with multiple mount-points

From: Denis Vlasenko
Date: Sun May 02 2004 - 17:14:00 EST


On Sunday 02 May 2004 20:58, Guennadi Liakhovetski wrote:
> On Sun, 2 May 2004 viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
> > <shrug>
> >
> > mount <whatever> /tmp/blah
> > mount --bind /tmp/blah/relative_path /desired_mountpoint
> > umount -l /tmp/blah
>
> Wow! I, actually, thought about it, but I didn't expect it to work right
> now, I would expect the umount to fail with EBUSY... But it does work!
> Guys, it rocks! The only slight inconvenience - mount still shows
>
> /tmp/blah/relative_path /desired_mountpoint (bind)
>
> which is not necessarily informative. A better display would be, perhaps
>
> <whatever>:relative_path /desired_mountpoint (bind)
>
> in /proc/mounts also not quite true:
>
> <whatever> /desired_mountpoint

You haven't symlinked /etc/mtab to /proc/mounts.
I always do it. Kernel knows better what is mounted, and where.
(at least supposed to know. You are right, currently /proc/mtab
is a bit not ok regarding bind mounts).

/etc/mtab is a historic userspace
hack for ancient Unix systems where kernel had no way to export
that info.
--
vda

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/