On Sun, Oct 30, 2005 at 10:27:40AM +0100, Bruno wrote:
> On Sunday 30 October 2005 00:11, Herbert Poetzl wrote:
> > On Sun, Oct 30, 2005 at 02:53:17AM +0900, Jun OKAJIMA wrote:
> > > Hello.
> > >
> > > I also have same question.
> > > How to do a mount to vserver namespace?
> > > I suppose that current vserver gets per-ctx namespace and this requires
> > > special mount command. If so, what is the command?.
> > >
> > > For example, assume the vserver I am using is 100,
> > >
> > > [Host]# mount -o bind /home/okajima /vserver/100/home/okajima
> > > [Host]# ls -la /vserver/100/home/okajima
> > >        [ something come. This is okay.]
> > > [Vserver]# ls -la /home/okajima
> > >        [ nothing comes This is NOT okay.]
> > > [Vserver]# mount -o bind /bin /mnt
> > > [Vserver]$ ls -la /mnt
> > >        [ Nothing comes.]
> > > [Vserver]$ cat /proc/mounts
> > >        [ /bin->/mnt stuff is not printed.]
> > > [Host]# zcat /boot/initrd.gz > /vserver/100/diskimage
> > > [Vserver]# mount -o loop diskimage /mnt
> > > [Vserver]$ ls -la /mnt
> > >        [ Nothing comes.]
> > >
> > >
> > > Tell me the command to do a bind mount!.
> >
> > vnamespace --enter <xid> -- mount --bind /host/path /vservers/guest/path
> >
> > HTH,
> > Herbert
> >
> For my test-case this command does NOT work:
> 
> I try to bind-mount something that was mounted on host AFTER guest was 
> started, an thus is not visible at all in guest namespace.
> 
> Steps to reproduce:
> 
> Start host
> Start guest
> On host:
>  mount /mnt/cdrom
>  vnamespace --enter guest -- mount --bind /mnt/cdrom /vservers/guest/mnt/cdrom

in this case you want to do:

  vnamespace --enter guest -- mount /mnt/cdrom
  vnamespace --enter guest -- mount --bind /mnt/cdrom /vservers/guest/mnt/cdrom

or much simpler:

  vnamespace --enter guest -- mount /dev/cdrom /vservers/guest/mnt/cdrom

> From guest /mnt/cdrom is still as empty as it was before, on host /mnt/cdrom 
> shows the CDROM contents...

> From what it looks like I assume that the mount only operates in a single 
> namespace, not binding from host namespace to guest namespace.

yep, that's true for now ...

HTH,
Herbert

> Bruno
> 
> _______________________________________________
> Vserver mailing list
> [email protected]
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
[email protected]
http://list.linux-vserver.org/mailman/listinfo/vserver

Reply via email to