Subject: RE: [vserver] How to rebuild/reimport
From: <DLASALLE@barreau.qc.ca>
Date: Wed, 9 Apr 2014 15:41:51 +0000

 Wed, 9 Apr 2014 15:41:51 +0000
Pardon my dyslexia ...

"adsv1" instead of "advs1".

And it works:

:/etc/vservers/ldapappv1# vserver adsv1 start
 * Starting system log daemon...
   ...done.
 * Starting OpenBSD Secure Shell server sshd
   ...done.
/etc/rc3.d/S16ssh: 168: cannot create /proc/4420/oom adj: Operation not permitted
JAVA HOME=/usr/java
APACHEDS HOME=/usr/local/apacheds-1.0.2
CLASSPATH=:/usr/java/lib/tools.jar:/usr/local/apacheds-1.0.2/bin/bootstrapper.jar:/usr/local/apacheds-1.0.2/bin/logger.jar:/usr/local/apacheds-1.0.2/bin/daemon.jar
Starting apacheds server: 09/04/2014 11:40:31 4428 apacheds error: Invalid user name
specified
09/04/2014 11:40:31 4428 apacheds error: Cannot parse command line arguments
success apacheds server startup

 * Starting Name Service Cache Daemon nscd
   ...done.
 * Starting periodic command scheduler crond
   ...done.
 * Starting Munin-Node
   ...done.
 * Running local boot scripts (/etc/rc.local)
   ...done.
root@buapp2:/etc/vservers/ldapappv1#

THANKS A LOT!

Now, I would have another question but I think I should start a new topic as it involves
OpenVZ <> Vserver import/export (Network issue).

<3 HTH

-----Message d'origine-----
De : Lasalle Daniel 
Envoyé : Wednesday, April 09, 2014 11:38 AM
À : vserver@list.linux-vserver.org
Objet : RE: [vserver] How to rebuild/reimport

Thank you for your very fast reply!

The config is there :

root@buapp2:/etc/vservers# du adsv1/ -h | tail
8,0K    adsv1/apps/init
12K     adsv1/apps
20K     adsv1/interfaces/0
24K     adsv1/interfaces
12K     adsv1/uts
20K     adsv1/scripts
96K     adsv1/
root@buapp2:/etc/vservers# 


However when issuing "vserver advs1 start" I get the following:

Can not find a vserver-setup at '/etc/vservers/advs1/'.

Possible solutions:
* fix the spelling of the 'advs1' vserver name
* read 'vserver advs1 build --help' about ways to create a new vserver
* see 'vserver --help' for the syntax of this command

If I compare this folder w/ another similar VPS (one that is up/listed under vserver-stat),
it seems that both configs are "the same":

root@buapp2:/etc/vservers/ldapappv1# vserver-stat
CTX   PROC    VSZ    RSS  userTIME   sysTIME    UPTIME NAME
0       58 428.9M 228.9M  49d02h22   4d20h37   3y21d23 root server
1        1   6.4M     4M   0m00s96   0m00s15   3y21d23 monitoring server
1002     7   1.4G 273.8M   5d04h19   6h01m51 893d23h16 tcmv1
1007    13 276.3M  46.1M   4d02h41  11h26m48   3y21d23 buappnxv1
49153   13 245.6M  48.6M   1d10h36   6h23m21   3y21d23 buappbdv1
49157   15 727.6M 107.8M   1h54m41  29m26s17   3y21d23 ldapappv1   <---------------------
 this is up
49164    7   1.4G 257.9M   6d16h03   6h21m53 964d03h03 buappv2
49165    6 918.5M 164.6M   4d17h01   6h28m45 868d10h03 buappv1
root@buapp2:/etc/vservers/ldapappv1# du . -h | tail                <---------------------
this is the config
8,0K    ./apps/init
12K     ./apps
20K     ./interfaces/0
24K     ./interfaces
12K     ./uts
20K     ./scripts
96K     .  <------------------------------------------!
root@buapp2:/etc/vservers/ldapappv1#   <---- is the same size as ---->

root@buapp2:/etc/vservers# du adsv1/ -h | tail
8,0K    adsv1/apps/init
12K     adsv1/apps
20K     adsv1/interfaces/0
24K     adsv1/interfaces
12K     adsv1/uts
20K     adsv1/scripts
96K     adsv1/   <------------------------------------ !
root@buapp2:/etc/vservers#

Thanks,

DLS

-----Message d'origine-----
De : Herbert Poetzl [mailto:herbert@13thfloor.at] Envoyé : Wednesday, April 09, 2014
11:31 AM À : Lasalle Daniel Cc : vserver@list.linux-vserver.org Objet : Re: [vserver]
How to rebuild/reimport

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?