Serveur Proxmox : LYNX CALLEO Application 2250

Caractéristiques

Partitionnement

RAID

root@leo:~# cat /proc/mdstat 
Personalities : [raid1] 
md2 : active raid1 sda2[0] sdb2[1]
      244243320 blocks super 1.2 [2/2] [UU]
      
md0 : active raid1 sda1[0] sdb1[1]
      244138872 blocks super 1.2 [2/2] [UU]
      
md3 : active raid1 sdc2[0] sdd2[1]
      244243320 blocks super 1.2 [2/2] [UU]
      
md1 : active raid1 sdc1[0] sdd1[1]
      244138872 blocks super 1.2 [2/2] [UU]
      
unused devices: <none>

LVM

root@leo:~# pvs
  PV         VG       Fmt  Attr PSize   PFree  
  /dev/md0   vz_bacgl lvm2 a--  232,83g 142,59g
  /dev/md1   vz_bacgl lvm2 a--  232,83g 232,83g
  /dev/md2   vz_bacgl lvm2 a--  232,93g      0 
  /dev/md3   vz_bacgl lvm2 a--  232,93g 232,93g


root@leo:~# vgs
  VG       #PV #LV #SN Attr   VSize   VFree  
  vz_bacgl   4  37   0 wz--n- 931,51g 608,34g

root@leo:~# lvs | head 
  LV                 VG       Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
  200_root           vz_bacgl -wi-ao--   1,00g                                           
  200_var            vz_bacgl -wi-ao--   1,00g                                           
  200_var_log        vz_bacgl -wi-ao--   1,00g                                           
  204_root           vz_bacgl -wi-ao--   1,00g                                           
  204_var            vz_bacgl -wi-ao--   1,00g                                           
  204_var_lib_mysql  vz_bacgl -wi-ao--   2,00g                                           
  204_var_log        vz_bacgl -wi-ao--   1,00g                                           
  210_root           vz_bacgl -wi-ao--   1,00g                                           
  210_tmp            vz_bacgl -wi-a---   2,00g
 ... ... ... ... ...

Organisation réseau

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
    address 10.45.1.183
    netmask 255.255.255.0
    gateway 10.45.1.1

#rpv
auto eth1.20
iface eth1.20 inet manual
    vlan-raw-device eth1
auto br0
iface br0 inet manual
    bridge_ports eth1.20
    bridge_fd 1
    bridge_maxwait 0
    bridge_bridgeprio 1

#DMZ-Priv
auto eth1.10
iface eth1.10 inet manual
    vlan-raw-device eth1
auto br1
iface br1 inet manual
    bridge_ports eth1.10
    bridge_fd 1
    bridge_maxwait 0
    bridge_bridgeprio 2

#DMZ-Pub
auto eth1.112
iface eth1.112 inet manual
    vlan-raw-device eth1
auto br2
iface br2 inet manual
    bridge_ports eth1.112
    bridge_fd 1
    bridge_maxwait 0
    bridge_bridgeprio 3

Proxmox

Le serveur de virtualisation tourne sur Proxmox . On peut à la fois utiliser OpenVZ (pour créer des CT) et faire du KVM (pour créer des VM) .

Openvz

Confection d'un template et d'un fichier de configuration

 debootstrap --exclude=modutils,module-init-tools,pciutils,laptop-detect,dmidecode --include=locales,iproute,tcpdump,less,sudo,mtr-tiny,htop,rsync,apticron,screen,vim,heirloom-mailx --arch amd64 squeeze /var/lib/vz/private/2003 http://miroir.cm.auf.org/debian/

willy@leo:~$ sudo vzsplit -n 40 -f 40SqueezeNoVSwap -v no
[sudo] password for willy:
WARNING: Recommended minimal size of partition holding /var/lib/vz/private/ is 20 Gb!
WARNING: partition holding /var/lib/vz/private/ do not have space required for 40 containers
The maximum allowed value is 2
Default disk space values will be used

Config /etc/pve/openvz/ve-verysmallSqueeze.conf-sample was created

willy@leo:~$ sudo vzsplit -n 40 -f 40SqueezeVSwap
WARNING: Recommended minimal size of partition holding /var/lib/vz/private/ is 20 Gb!
WARNING: partition holding /var/lib/vz/private/ do not have space required for 40 containers
The maximum allowed value is 2
Default disk space values will be used

Config /etc/pve/openvz/ve-40SqueezeVSwap.conf-sample was created

Création d'un CT

vzctl  create 2003 --ostemplate '/var/lib/vz/template/cache/debian-squeeze-64_5.tar.gz' --hostname 'smtp' --config '15SqueezeNoVSwap'

Pas besoin d'utiliser pvectl de Proxmox ;)

Migration de Squeeze à Wheezy

{i} Il existe un script proxmox mais il n'a pas été employé ici.


  1. A priori, ça serait plus simple de gérer les ressources avec ce mode de fonctionnement (1)

ZAC/Yaoundé/Configuration/ServeurVirtualisationLeo (dernière édition le 2013-07-13 18:25:53 par WillyManga)