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