On Tue, 09 May 2006 14:02:51 -0400
Fareha Shafique <fareha@eecg.toronto.edu> wrote:
> Fareha Shafique wrote:
>
> > Corey Wright wrote:
> >
> >> storage space is conserved because files only exist in one place, but
> >> are
> >> referenced within multiple vservers though special hard links.
> >>
> >> memory space is conserved because binaries and shared libraries (and
> >> any item in the file cache, i suppose) only exist in memory once,
> >> though many
> >> vservers may be executing/using the file. the idea is to extend the
> >> concept of "shared libraries" to vservers, so that just as a
> >> shared library may be referenced by multiple applications and it only
> >> exists in memory once, the same is true for a shared library
> >> referenced by
> >> multiple vservers (by way of vhashify).
> >>
> >> all the examples i have seen enable vhashify for vserver guests, not
> >> the host. i presume it is possible, but it is never applicable in my
> >> case because hard links are only shared on a single filesystem (where
> >> i mount my
> >> host's executables/libraries on /usr and my vservers on /home).
> >>
> >> hth.
> >>
> >> corey
> >>
> >>
> > Thanks, that explaination helps :)
> > Now, is it only libraries and binaries that can be shared or can a
> > vserver be an exact replica of the host.
>
> Oh sorry, that was already answered. I guess anything on the filesystem
> can be shared.
let me again emphasize: i have never seen vhashify used to "unify" the host
with guests. i don't know if the vhashify application allows for such.
you might be able to do it by creating a skeleton configuration
in /etc/vservers representing the host (ie /etc/vservers/host) with a vdir
that symlinks to /. just be sure to exclude /etc/vservers or you may
experience recursive problems. but that's a total hack, unsupported, and
may even void the warranty. ;-)
> > How about if I want the filesystem of vserver vs1 to be an exact
> > replica of the host, and only when I write/modify any file a local
> > copy should be created for vs1 (using COW)? Is this possible?
>
> Let me explain this better. Say I want to upgrade some software or
> install new software on my host machine. Before doing this, I would like
> to test the upgrade in an environment that is an exact replica of the
> host machine. Is it possible to create a vserver identical to the host
> so that it can be used as the test environment?
why don't you instead have two vservers: one test & one production. push
all your production applications/configuration from the host into a "test"
guest. when the "test" guest works how you want, just copy the "test"
guest to the "production" guest and unify the two.
i do something similar. i have a "test" guest (that's literally the name
of the guest) where i test applications and when everything works like i
want, i "apt-get install" or copy the tested application on a
"production" guest, copy over the configuration, vhashify the "production"
guest, and start it.
the added benefit of having your "production" environment contained within
a guest is that to relocate the production environment you simply stop the
guest, tarball/cpio/rsync/scp/etc it (the guest and its configuration) to
another vserver host, and start it there.
i think you are trying to push a square peg into a round hole with your
current design and should reconsider if possible.
corey
-- undefined@pobox.com _______________________________________________ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserverReceived on Wed May 10 13:54:33 2006