Re: [vserver] guest mounts

From: Corey Wright <undefined_at_pobox.com>
Date: Mon 28 Jun 2010 - 08:57:38 BST
Message-Id: <20100628025738.87c8606f.undefined@pobox.com>

On Mon, 28 Jun 2010 08:43:20 +0200 (CEST)
jason@netkosice.sk wrote:

> > On Fri, 25 Jun 2010 19:30:01 +0200
> > Herbert Poetzl <herbert@13thfloor.at> wrote:
> >
> > so try:
> >
> > vnamespace -e <vserver> mount
> > --bind /var/mail/ /var/lib/vservers/ftp/tmp/mnt/
> >
> > specifically, i've used the following:
> >
> > vnamespace -e <vserver> mount /dev/loop /vservers/<vserver>/mnt/
> >
> > (to mount the loop-back device into a vserver, like copying the contents
> > of
> > a cd/dvd image into a vserver.)
> >
> > corey
>
> thanks corey, but still no luck (I think I'm doing something wrong)
>
> # vserver ftp exec ls -a /tmp/mnt
> . ..
> # vnamespace -e ftp mount --bind /var/mail/ /var/lib/vservers/ftp/tmp/mnt/
> # vserver ftp exec ls -a /tmp/mnt
> . ..
> # vnamespace -e ftp cat /proc/mounts
> [...]
> /dev/mapper/var-mail /var/lib/vservers/ftp/tmp/mnt ext3
> rw,relatime,errors=continue 0 0
> # ls -a /var/mail
> . .. root

for the record, it still works for me as i just double-checked:

# vserver test1 exec ls /mnt
# echo this is a test >/tmp/test.txt
# vnamespace -e test1 mount --bind /tmp /home/vservers/test1/mnt
# vserver test1 exec ls /mnt
lost+found test.txt
# vserver test1 exec cat /mnt/test.txt
this is a test
# vnamespace -e test1 umount /home/vservers/test1/mnt
# vserver test1 exec ls /mnt
# rm /tmp/test.txt

corey

-- 
undefined@pobox.com
Received on Mon Jun 28 08:59:21 2010
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 28 Jun 2010 - 08:59:26 BST by hypermail 2.1.8