Subject: Re: [vserver] How to rebuild/reimport
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Wed, 9 Apr 2014 17:31:13 +0200

On Wed, Apr 09, 2014 at 03:04:50PM +0000, DLASALLE@barreau.qc.ca wrote:
> Hello,

> I have inherited a bunch of legacy Linux systems based on
> both the VSERVER and OpenVZ solutions, which I had never used
> before. Before going any further, I must mention that I really
> enjoy working w/ your solution.

Good to hear!

> After several months of getting my hands dirty doing several
> manipulations and getting acquainted with both services, I am
> now required to do several more advanced manoeuvers, hence this
> email/call for help.

> Before asking, yes, I have went thru http://linux-vserver.org more specifically http://linux-vserver.org/Building_Guest_Systems
&& http://linux-vserver.org/util-vserver:Howto_virtualize_an_exisiting_Linux_server
yet I wasn't able to find my answer.  I've also asked google, ofc.

> Consider the following:

> <<
> root@buapp2:/vservers# vserver-stat
> CTX   PROC    VSZ    RSS  userTIME   sysTIME    UPTIME NAME
> 0       64 465.1M 244.1M  49d02h22   4d20h37   3y21d22 root server
> 1        1   6.4M     4M   0m00s96   0m00s15   3y21d22 monitoring server
> 1002    23   1.5G 318.1M   5d04h19   6h01m49 893d22h39 tcmv1
> 1007    13 276.3M  46.1M   4d02h41  11h26m48   3y21d22 buappnxv1
> 49153   13 245.6M  48.6M   1d10h36   6h23m21   3y21d22 buappbdv1
> 49157   15 727.6M 107.8M   1h54m41  29m26s17   3y21d22 ldapappv1
> 49164    7   1.4G 258.5M   6d16h02   6h21m52 964d02h26 buappv2
> 49165    6 918.5M   165M   4d17h01   6h28m44 868d09h26 buappv1

> root@buapp2:/vservers# ls -lsa
> total 2222052
>       4 drwxr-xr-x 16 root     root           4096 2014-04-09 10:45 .
>       4 drwxr-xr-x 22 root     root           4096 2011-03-19 12:22 ..
>       4 drwxr-xr-x 20 root     root           4096 2008-09-02 14:24 adsv1
>       4 drwxr-xr-x 20 root     root           4096 2014-04-09 10:44 adsv1-copy-DLS
>       4 drwxr-xr-x 20 root     root           4096 2009-05-01 10:37 amqv1
>       4 -rwxr-xr-x  1 root     root           1083 2009-05-14 11:25 backup-vserver.sh
>       4 drwxr-xr-x 21 root     root           4096 2008-08-14 04:25 buappbdv1
>       4 drwxr-xr-x 19 root     root           4096 2009-05-01 13:27 buappnxv1
>       4 drwxr-xr-x 20 root     root           4096 2009-05-01 14:37 buappnxv2
>       4 drwxr-xr-x 21 root     root           4096 2008-08-14 05:54 buappv1
>       4 drwxr-xr-x 21 root     root           4096 2009-08-26 10:48 buappv2
>       4 drwxrwxrwx 16 root     root           4096 2013-10-15 10:52 buepsv1
>       4 drwxr-xr-x 20 root     root           4096 2009-05-13 16:19 ecole01
>       4 drwxr-xr-x 20 root     root           4096 2009-05-22 10:42 ecole02
> 2221932 -rw-r--r--  1 dlasalle dlasalle 2273034240 2014-04-07 15:15 EPSRestore.tar.gz
>       4 -rwxr-xr-x  1 root     root           4077 2008-09-02 15:20 install-vserver.sh
>       4 drwxr-xr-x 22 root     root           4096 2009-01-16 11:25 ldapappv1
>      48 drwxr-xr-x  2 root     root          49152 2008-01-23 11:27 lost+found
>       4 -rwxr-xr-x  1 root     root           1142 2009-04-21 09:43 rsync-vserver.sh
>       4 drwxr-xr-x 22 root     root           4096 2009-05-11 21:19 tcmv1
> root@buapp2:/vservers#


> As we can clearly see, vserver-stat shows 6 VPS up. However
> there are much more than 6 under /vservers/. My problem is that
> I need to restore one of them (advs1).

The configuration for Linux-VServer guests is usually
stored in /etc/vservers/<guest-name> so given that the
config for the advs1 guest is still there, a simple

 vserver advs1 start

should suffice to start the guest :)

> I would like to know what is the easiest route to take as
> I need this host(advs1) back up to troubleshoot some other
> problem elsewhere in our network.

If your config is broken or missing, it really depends
on what the guest did and what you still know of the
correct configuration.

HTH,
Herbert

> Thanks in advance,
> [cid:image001.gif@01CE6688.98AF8C30]

> Daniel LaSalle | Administrateur de systèmes et support aux usager(e)s

> T : 514 954-3400, poste 3674 | Sans frais : 1 800 361-8495

> Maison du Barreau  |  445, boul. Saint-Laurent, Montréal QC  H2Y 3T8
> dlasalle@barreau.qc.ca<mailto:dlasalle@barreau.qc.ca>  |  http://www.barreau.qc.ca<http://www.barreau.qc.ca/>

> P Avant l'impression, pensez-y... Est-ce vraiment nécessaire?