Re: dynamic mounts and chroot jail woes (long)...
On Mon, Oct 17, 2005 at 07:16:37PM +0100, Stephen Gran wrote:
> I think you are going about it wrong, or looking at it backwards, or
> something. It may be helpful to note that filesystems are mounted
> _over_ an existing mount point, not under. So, if you have two
> directories:
> /media/pendrive
> /ia32/media/pendrive
>
> and you bind mount /media/pendrive onto /ia32/media/pendrive, you get
> exactly what is in /media/pendrive *right now*. When you later mount
> the actual pendrive _over top_ of /media/pendrive, it does nothing to
> what's underneath of it, and so the bind mount is unaffected.
>
> So, all that being said, your solution is actually not a bad one, and
> seems to work. If you want an easier to maintain setup, the only thing
> I can think off the top of my head would be
> a) hard linking the directory one level up (e.g., /media), this will of
> course only work if they are on the same file system.
You don't hardlink directories.
> b) an automounter arrangement that mounted the removable/network media in
> both places. This seems slightly more difficult, but doesn't on the
> face of it, seem impossible.
Hmm. Auto bind mount on mount?
The symlink looks cleaner with the original mount in the chroot
location.
Len Sorensen
Reply to: