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
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.
Bruno
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Sun Oct 30 09:28:03 2005