Re: [Vserver] When to mount lvm? (vs2.01)

From: Lars Braeuer <lbraeuer_at_mpex.net>
Date: Wed 14 Dec 2005 - 13:53:21 GMT
Message-ID: <43A023D1.7070804@mpex.net>

First of all, thanks for the answers.

I basically understand the design of namespaces. Should have looked through this page before asking
my question.

Does anybody know what happens in the background if I take the example at the bottom and physically
mount the device onto /vservers/test01 which will then also be used in the namespace of the vserver
as mountpoint for the bind mount?

Another question:
There's the generateInitOptions function setting the values for INITCMD_START, INITCMD_STOP and so
on. In the vserver.functions file I don't see a call for a different namespace, but "test -x
$vdir/vdir/etc/init.d/rc" is still working (when running vserver.start). How can this be, if this
all happens without a namespace set or is there somewhere a namespace call that I didn't see so far?

When running vserver.stop the INITCMD_STOP can't be set, although nothing is unmounted before
"generateOptions" in vserver.stop is called. I included a "ls -la $vdir/vdir/$i" right above the
"test -x" call at line 264 (util-vserver-0.30.209) which returns:

ls: /usr/local/etc/vservers/test01/vdir//etc/init.d/rc: No such file or directory

Leading to a "No command given; use '--help' for more information.", because the INITCMD_STOP is empty.

When running vserver.start it seems to "see" the directory:

-rwxr-xr-x 1 root root 2235 Dec 13 20:11 /usr/local/etc/vservers/test01/vdir//etc/init.d/rc

I know, I can set cmd.stop and everything works fine, but I want it to be detected automatically
without having to set the config options myself for each guest system.

Best,

Lars

PS: I'm running the latest stable release (2.6.14.3-vs2.01, util-vserver-0.30.209)

Enrico Scholz wrote:
> lbraeuer@mpex.net (Lars Braeuer) writes:
>
>
>>I'm not sure where to mount an LVM2 device with vs2.0. I do
>>not want to mount it on system boot, but when starting the
>>guest vserver.
>>
>>The fstab file in the vserver config directory seems to be the right place.
>>
>>But when including an entry like this in the fstab file, the mount
>>won't show up in the hostsystem and will not be accessible via the
>>mount point in the /vservers directory:
>>/dev/mapper/vg-test01 / ext3 defaults 1 2
>
>
> I would recommend to do physical mounting in the host's /etc/fstab
> and bind-mount it in the vserver's fstab. E.g.
>
> | [/etc/fstab]
> | /dev/mapper/vg-test01 /srv/mnt/test01 ext3 defaults 1 2
>
> | [/etc/vservers/.../fstab
> | /srv/mnt/test01 / none bind
>
>
> This gives the advantage that the partition will be fsck'ed
> during the regularly system boot and that you can share it
> between multiple vservers ('mount' is allowed only once per
> physical partition but you can 'mount --bind' multiple times).
>
>
>
>>But I'm able to enter the vserver with "vserver test01 enter",
>>weird.
>
>
> Expected namespace behaviour...
>
>
>
> Enrico

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Wed Dec 14 13:53:46 2005

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 14 Dec 2005 - 13:53:48 GMT by hypermail 2.1.8