Cahier 2016 groupe n°3
Sommaire
Gestion de la machine virtuelle
Installation de la machine virtuelle avec Xen
Pour créé la machine virtuelle, on utilise xen-create-image avec les paramètres souhaités :
xen-create-image --hostname=Deadpool --ip=193.48.57.163 --netmask=255.255.255.240 --gateway=193.48.57.171 --dir=/usr/local/xen
--mirror=http://debian.polytech-lille.fr/debian/ --dist=jessie --password=********
Puis, on récupère les informations suivantes afin de vérifier diverses paramètres :
General Information
--------------------
Hostname : Deadpool
Distribution : jessie
Mirror : http://debian.polytech-lille.fr/debian/
Partitions : swap 128M (swap)
/ 4G (ext3)
Image type : sparse
Memory size : 128M
Kernel path : /boot/vmlinuz-3.14-2-amd64
Initrd path : /boot/initrd.img-3.14-2-amd64
Networking Information
----------------------
IP Address 1 : 193.48.57.163 [MAC: 00:16:3E:FF:6F:DC]
Netmask : 255.255.255.240
Gateway : 193.48.57.171
Creating partition image: /usr/local/xen/domains/Deadpool/swap.img
Done
Creating swap on /usr/local/xen/domains/Deadpool/swap.img
Done
Creating partition image: /usr/local/xen/domains/Deadpool/disk.img
Done
Creating ext3 filesystem on /usr/local/xen/domains/Deadpool/disk.img
(...)
Logfile produced at:
/var/log/xen-tools/Deadpool.log
Installation Summary
---------------------
Hostname : Deadpool
Distribution : jessie
MAC Address : 00:16:3E:FF:6F:DC
IP Address(es) : 193.48.57.163
RSA Fingerprint : d0:38:7b:89:c7:72:e7:52:d9:b7:5c:5b:ab:3e:fe:3f
Root Password : hZsEGmZX
Configuration de la machine virtuelle
On utilise lvcreate pour faire en sorte que les répertoires var et home de la machine virtuelle soient sur des partitions LVM de l'hôte :
lvcreate -L 10G -n /dev/virtual/ima5-Deadpool-home -v lvcreate -L 10G -n /dev/virtual/ima5-Deadpool-var -v
Pour démarrer la machine virtuelle et accéder directement à celle ci via console on utilise la commande suivante :
xl console Deadpool
Gestion du serveur DAS
Site IBM [1]
Site Hp [2], Maintenance et service G5.
Site Hp [3], Datasheet G5
Site Hp, [4], Datasheet MSA60
Site Hp, [5], Datasheet en Français
Installation des outils HP
Source : http://wiki.csnu.org/index.php/Installation_des_outils_HP_pour_debian
Ajout du dépôt dans /etc/apt/sources.net :
deb http://downloads.linux.hpe.com/SDR/repo/mcp/ jessie/current non-free
Copier / Coller le contenu des clés et les ajouter, liens des clés disponibles à ces adresses :
http://downloads.linux.hpe.com/SDR/hpPublicKey1024.pub http://downloads.linux.hpe.com/SDR/hpPublicKey2048.pub http://downloads.linux.hpe.com/SDR/hpPublicKey2048_key1.pub
Ajout des clefs :
apt-key add ./hpPublicKey1024.pub apt-key add ./hpPublicKey2048.pub apt-key add ./hpPublicKey2048_key1.pub
On met à jour les paquets et on installe l'utilitaire HP hpssacli :
aptitude update aptitude install hp-health hpssacli
Commandes disponibles pour hpssacli : https://oitibs.com/hp-acu-command-line-reference/
Configuration des disques
Après avoir installé l'utilitaire HP pour gérer nos disques, nous pouvons enfin savoir les caractéristiques des baies :
hpssacli ctrl all show config
On obtient alors :
Smart Array P800 in Slot 4 (sn: P98690E9SV10C3)
Port Name: 1I
Port Name: 2I
Port Name: 1E
Port Name: 2E
Internal Drive Cage at Port 3I, Box 1, OK
Internal Drive Cage at Port 4I, Box 1, OK
StorageWorks MSA 60 at Port 1E, Box 1, OK
array A (SAS, Unused Space: 0 MB)
logicaldrive 1 (820.2 GB, RAID 5, OK)
physicaldrive 3I:1:1 (port 3I:box 1:bay 1, SAS, 146 GB, OK)
physicaldrive 3I:1:2 (port 3I:box 1:bay 2, SAS, 146 GB, OK)
physicaldrive 3I:1:3 (port 3I:box 1:bay 3, SAS, 146 GB, OK)
physicaldrive 3I:1:4 (port 3I:box 1:bay 4, SAS, 146 GB, OK)
physicaldrive 4I:1:5 (port 4I:box 1:bay 5, SAS, 146 GB, OK)
physicaldrive 4I:1:6 (port 4I:box 1:bay 6, SAS, 146 GB, OK)
physicaldrive 4I:1:8 (port 4I:box 1:bay 8, SAS, 146 GB, OK)
physicaldrive 4I:1:7 (port 4I:box 1:bay 7, SAS, 146 GB, OK, spare)
array B (SATA, Unused Space: 0 MB)
logicaldrive 2 (1.9 TB, RAID 5, Recovering, 0% complete)
logicaldrive 3 (1.9 TB, RAID 5, Ready for Rebuild)
logicaldrive 4 (751.2 GB, RAID 5, Ready for Rebuild)
physicaldrive 1E:1:1 (port 1E:box 1:bay 1, SATA, 1 TB, OK)
physicaldrive 1E:1:2 (port 1E:box 1:bay 2, SATA, 1 TB, OK)
physicaldrive 1E:1:4 (port 1E:box 1:bay 4, SATA, 1 TB, OK)
physicaldrive 1E:1:5 (port 1E:box 1:bay 5, SATA, 1 TB, OK)
physicaldrive 1E:1:6 (port 1E:box 1:bay 6, SATA, 1 TB, OK)
physicaldrive 1E:1:11 (port 1E:box 1:bay 11, SATA, 1 TB, Rebuilding)
physicaldrive 1E:1:3 (port 1E:box 1:bay 3, SATA, 1 TB, OK, spare)
array C (SATA, Unused Space: 0 MB)
logicaldrive 5 (1.9 TB, RAID 5, OK)
logicaldrive 6 (1.7 TB, RAID 5, OK)
physicaldrive 1E:1:7 (port 1E:box 1:bay 7, SATA, 1 TB, OK)
physicaldrive 1E:1:8 (port 1E:box 1:bay 8, SATA, 1 TB, OK)
physicaldrive 1E:1:9 (port 1E:box 1:bay 9, SATA, 1 TB, OK)
physicaldrive 1E:1:10 (port 1E:box 1:bay 10, SATA, 1 TB, OK)
physicaldrive 1E:1:12 (port 1E:box 1:bay 12, SATA, 1 TB, OK)
physicaldrive 1E:1:3 (port 1E:box 1:bay 3, SATA, 1 TB, OK, spare)
Nous avons supprimé (et formaté) tous les disques logiques liés aux disques physiques du StorageWorks MSA 60
hpssacli ctrl slot=4 ld 6 delete hpssacli ctrl slot=4 ld 5 delete ... hpssacli ctrl slot=4 ld 2 delete
Puis créé un disque logique en RAID 10 avec tous les disques physiques du MSA60 qui sera notre disque réservé pour la sauvegarde des VM
hpssacli ctrl slot=4 create type=ld drives=1E:1:1,1E:1:2,1E:1:3,1E:1:4,1E:1:5,1E:1:6,1E:1:7,1E:1:8,1E:1:9,1E:1:10,1E:1:11,1E:1:12 raid=1+0
Enfin, on s'assure que le disque logique a correctement été généré
array B (SATA, Unused Space: 0 MB)
logicaldrive 2 (5.5 TB, RAID 1+0, OK)
physicaldrive 1E:1:1 (port 1E:box 1:bay 1, SATA, 1 TB, OK)
physicaldrive 1E:1:2 (port 1E:box 1:bay 2, SATA, 1 TB, OK)
physicaldrive 1E:1:3 (port 1E:box 1:bay 3, SATA, 1 TB, OK)
physicaldrive 1E:1:4 (port 1E:box 1:bay 4, SATA, 1 TB, OK)
physicaldrive 1E:1:5 (port 1E:box 1:bay 5, SATA, 1 TB, OK)
physicaldrive 1E:1:6 (port 1E:box 1:bay 6, SATA, 1 TB, OK)
physicaldrive 1E:1:7 (port 1E:box 1:bay 7, SATA, 1 TB, OK)
physicaldrive 1E:1:8 (port 1E:box 1:bay 8, SATA, 1 TB, OK)
physicaldrive 1E:1:9 (port 1E:box 1:bay 9, SATA, 1 TB, OK)
physicaldrive 1E:1:10 (port 1E:box 1:bay 10, SATA, 1 TB, OK)
physicaldrive 1E:1:11 (port 1E:box 1:bay 11, SATA, 1 TB, OK)
physicaldrive 1E:1:12 (port 1E:box 1:bay 12, SATA, 1 TB, OK)