[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: automounted home directories in chroot

On Fri, Jul 08, 2005 at 10:19:31AM -0300, Javier Kohen wrote:
> Any idea on how to make rbind do "what you want" when used with an
> automounted /media? The scenario is as follows: HAL manages /media and
> mounts/unmounts the external drives, CD's and whatnot; I've rbind
> mounted /media into a chroot's /media, but the changes are not
> propagated to the 'rbounded' mount point unless I remount it after each
> change. It doesn't really matter if I enter the chroot before or after
> the changes.

Hmm, that sounds like a bug to me then.  I certainly think the
description says it should work.  Maybe all rbind does it do a normal
bind mount on every mount in the dir you rbind mount, to save you from
doing all of them manually, but only at the time of running rbind, not
everytime mounts are added or deleted.  Certainly doing a small test
here shows that you are right, it doesn't update when you add more
mounts under it.  That sucks. :(

Never used HAL though, so perhaps it is doing something wrong.

> This is the relevant line from fstab:
> /media          /var/chroot/sid-ia32/media      none    rbind   0
> 0
> And this is part of the contents:
> $ ls /media/
> cdrom  cdrom0  usbdisk  usbdisk-1
> $ ls /var/chroot/sid-ia32/media/
> cdrom  cdrom0  usbdisk  usbdisk-1
> (It's fine up to here)
> $ ls /media/usbdisk
> audio  home  jkohen  lost+found
> $ ls /var/chroot/sid-ia32/media/usbdisk

Len Sorensen

Reply to: