Re: [vserver] Problems with scripts

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Wed 15 Aug 2007 - 22:14:25 BST
Message-ID: <20070815211425.GA11044@MAIL.13thfloor.at>

On Wed, Aug 15, 2007 at 05:39:36PM -0300, Gustavo wrote:
> Hi, I'm new in list, my name is Gustavo and I've been testing vservers
> for some weeks in my work for development and testing, and made
> some "helpers" too.

> My problem now is with scripts to be located at /etc/vservers/scripts.
> As I've seen in the "flower page", they are initialize, prepre-start,
> pre-start, post-stop, postpost-stop, and so on.

> Happens that I'm trying to mount a file as a loop device to be like de
> block device representing the disk of the vps.

not the best decision (performance wise), but works
fine (you might want to consider using LVM instead)

> Since initialize runs _before_ the fs is mounted, it works fine
> but unmounting and freeing the loop dev appears to be not so easy
> because maybe there is a chroot to the vps root dir before running the
> postpost-stop script.

actually you do not need to care about unmounting it,
if you mounted it properly (inside the guest namespace)
as it will get unmounted when the context disappears

> Do you know any alternative for doing this?

yeah, I would simply put it into the config fstab and
be done with it, the tolls will automagically mount it
for you and the kernel will take care of unmounting

> (in some days when this finish taking shape, I'll put public the
> scripts I made to enhance functionality and make easy common
> creation/modification tasks with vservers)

best,
Herbert

> Thanks,
> Gustavo
Received on Wed Aug 15 22:14:37 2007

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 15 Aug 2007 - 22:14:40 BST by hypermail 2.1.8