mania:~# lvs
  LV                VG   Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  civicrm           all  -wi-ao  10.00G                                      
  civicrm-drbd      all  -wi-ao 128.00M                                      
  drupal            all  -wi-ao  10.00G                                      
  drupal-drbd       all  -wi-ao 128.00M                                      
  mediagateusa      all  -wi-ao  10.00G                                      
  mediagateusa-drbd all  -wi-ao 128.00M                                      
  opensocial        all  -wi-ao   5.00G                                      
  opensocial-drbd   all  -wi-ao 128.00M                                      
  petzi             all  -wi-ao 300.00G                                      
  proxy             all  -wi-ao   1.00G                                      
  var               all  -wi-ao  10.00G                                      
  z2-1              all  -wi-ao   2.00G                                      
  z2-2              all  -wi-ao   2.00G                                      
  z2-3              all  -wi-ao   2.00G      


mania:~# virsh list --all
 Id Name                 State
----------------------------------
  4 proxy                running
  5 opensocial           running
 10 drupal               running
 14 mediagateusa         running
  - civicrm              shut off

vms :

  • proxy : won't be migrated, only config
  • opensocial : opensocial.pokersource.info : downtime allowed (~2hours), paravirt
  • drupal : drupal.pokersource.info : downtime allowed (~2hours), full virt
  • mediagateusa : is now migrated to mediagateusa.binbang.vm.gnt, can be deleted
  • civicrm : can be archived and deleted
  • petzi : can be deleted (backup). Ask zerodeux if petzi is backed up.
  • z2-123 backups , why they here and not on rosiers (it was for re-installation and fast access, can be deleted)

Failover ip in use : 87.98.242.37 (only redirect ssh to drupal). No need to migrate it, can be discarded.

Backups

drupal + opensocial + the system itself + civicrm

Migrate vms

Only opensocial and drupal are migrated.

1) declare dns + dhcp entries :

  • opensocial.pokersource.vm.gnt : 52:46:7e:08:0b:a8
  • drupal.pokersource.vm.gnt : 52:54:46:2f:a6:21

2) reload dhcp + dns on z2 cluster :

for i in 1 2 3 4 5 6 7;do echo "WORKING ON $i" ; ssh z2-$i "cd /etc/dhcp3; hg pull; hg update; /etc/init.d/dhcp3-server restart; rm /var/cache/bind/* && /etc/init.d/bind9 restart";done

3) copy the proxy configuration from proxy.mania.tld to the proxy on z2-X.host.gnt (all vms will go there), reload apache 3bis) copy shorewall config from mania to z2 for ip 87.98.242.37, reload shorewall

3) create vms :

 gnt-instance add --no-start -t drbd -s 5G -B memory=512M -n z2-9.host.gnt:z2-8.host.gnt -o debootstrap --net 0:mac=52:46:7e:08:0b:a8 opensocial.pokersource.vm.gnt 
 gnt-instance add --no-start -t drbd -s 10G -B memory=512M -n z2-9.host.gnt:z2-8.host.gnt -o debootstrap --net 0:mac=52:54:74:30:c5:9f  drupal.pokersource.vm.gnt

4) modify config for drupal

gnt-instance modify -H kernel_path=,initrd_path= drupal.pokersource.vm.gnt

5) For each instances :

  • activate it :
    gnt-instance activate-disks opensocial.pokersource.vm.gnt 
    gnt-instance activate-disks drupal.pokersource.vm.gnt 
    
  • stop it on mania :
    virsh shutdown opensocial
    virsh shutdown drupal
    
  • sync it :
    ssh mania.tld "dd if=/dev/all/opensocial" | dd of=/dev/drbdXX
    ssh mania.tld "dd if=/dev/all/drupal" | dd of=/dev/drbdYY
    
  • umount drbd devices on primary and secondary

6) restart vms :

gnt-instance activate-disks opensocial.pokersource.vm.gnt 
gnt-instance activate-disks drupal.pokersource.vm.gnt 

7) do NOT migrate the IP

8) Update the DNS for opensocial.pokersource.info and drupal.pokersource.info

CHECK than opensocial.pokersource.vm.gnt and drupal.pokersource.vm.gnt http work + test the proxy / public domain