Differences

This shows you the differences between two versions of the page.

Link to this comparison view

saisp:labs:04:contents:03 [2014/01/24 10:08]
mihai.carabas [03. Lorem ipsum]
saisp:labs:04:contents:03 [2014/03/16 23:56] (current)
razvan.deaconescu
Line 1: Line 1:
-==== 03. Adăugare resurse la o mașină virtuală KVM ====+==== 03. [15p] Actualizare volume ​====
  
-    * KVM exercitiu +Dorim să renunțăm la al doilea grup de volume (''​kalimdor''​). Ștergeți acest grup de volume și apoi extindeți grupul de volume ''​azeroth''​ pentru a cuprinde parțiile fizice ''/​dev/​sdb2''​ și ''/​dev/​sdc2''​. 
-      ​* adaugare un nou HDD la masina virtuala ​de la 1+ 
 +<note tip> 
 +Pentru a extinde un grup de volume folosiți comanda ''​vgextend''​. 
 +</​note>​ 
 + 
 +Extindeți dimensiunile volumelor logice de pe grupul ''​azeroth''​ pentru a acoperi întreaga dimensiune a acestuia. 
 + 
 +<note tip> 
 +Pentru a extinde un volum logic folosiți comanda ''​lvextend''​. 
 +</​note>​ 
 + 
 +<​solution ​-hidden> 
 +Pentru început ștergem volumele logice și apoi grupul de volume ''​kalimdor'':<​code bash> 
 +root@lvm:~# lvremove /​dev/​kalimdor/​ashenvale 
 +Do you really want to remove active logical volume ashenvale? [y/n]: y 
 +  Logical volume "​ashenvale"​ successfully removed 
 +root@lvm:~# lvremove /​dev/​kalimdor/​tanaris 
 +Do you really want to remove active logical volume tanaris? [y/n]: y 
 +  Logical volume "​tanaris"​ successfully removed 
 +root@lvm:~# lvremove /​dev/​kalimdor/​durotar 
 +Do you really want to remove active logical volume durotar? [y/n]: y 
 +  Logical volume "​durotar"​ successfully removed 
 +root@lvm:~# vgremove kalimdor 
 +  Volume group "​kalimdor"​ successfully removed 
 +</​code>​ 
 + 
 +Validăm ștergerea grupului de volume:<​code bash> 
 +root@lvm:~# vgs 
 +  VG      #PV #LV #SN Attr   VSize VFree 
 +  azeroth ​  ​2 ​  ​3 ​  0 wz--n- 1.99g    0 
 +</​code>​ 
 + 
 +Extindem acum grupul ''​azeroth''​ cu volumele fizice ''/​dev/​sdb2''​ și ''/​dev/​sdc2'':<​code bash> 
 +root@lvm:~# vgextend azeroth /dev/sdb2 
 +  Volume group "​azeroth"​ successfully extended 
 +root@lvm:~# vgextend azeroth /dev/sdc2 
 +  Volume group "​azeroth"​ successfully extended 
 +</​code>​ și verificăm componeța grupului (patru volume fizice):<​code bash> 
 +root@lvm:~# vgs 
 +  VG      #PV #LV #SN Attr   VSize VFree 
 +  azeroth ​  ​4 ​  ​3 ​  0 wz--n- 3.98g 1.99g 
 +root@lvm:~# pvs 
 +  PV         ​VG ​     Fmt  Attr PSize    PFree 
 +  /​dev/​sdb1 ​ azeroth lvm2 a--  1020.00m ​      0 
 +  /​dev/​sdb2 ​ azeroth lvm2 a--  1020.00m 1020.00m 
 +  /​dev/​sdc1 ​ azeroth lvm2 a--  1020.00m ​      0 
 +  /​dev/​sdc2 ​ azeroth lvm2 a--  1020.00m 1020.00m 
 +</​code>​ 
 + 
 +Dispunem ​de ''​1.99GB''​ liberi în grupul ''​azeroth''​. Dublăm spațiul fiecărui volum logic ca să ne acoperim spațiul liber:<​code bash> 
 +root@lvm:~# lvextend -L +700 /​dev/​azeroth/​arathor 
 +  Extending logical volume arathor to 1.37 GiB 
 +  Logical volume arathor successfully resized 
 +root@lvm:~# lvextend -L +840 /​dev/​azeroth/​dalaran 
 +  Extending logical volume dalaran to 1.64 GiB 
 +  Logical volume dalaran successfully resized 
 +root@lvm:~# lvextend -L +500 /​dev/​azeroth/​lordaeron 
 +  Extending logical volume lordaeron to 1000.00 MiB 
 +  Logical volume lordaeron successfully resized 
 +</​code>​ 
 +Apoi afișăm informații despre aceste partiții:<​code bash> 
 +root@lvm:~# lvs 
 +  LV        VG      Attr       ​LSize ​   Pool Origin Data%  Move Log Cpy%Sync Convert 
 +  arathor ​  ​azeroth -wi-a----- ​   1.37g 
 +  dalaran ​  ​azeroth -wi-a----- ​   1.64g 
 +  lordaeron azeroth -wi-a----- 1000.00m 
 +root@lvm:~# vgs 
 +  VG      #PV #LV #SN Attr   VSize VFree 
 +  azeroth ​  ​4 ​  ​3 ​  0 wz--n- 3.98g    0 
 +</​code>​ 
 +</​solution>​
  
saisp/labs/04/contents/03.1390550931.txt.gz · Last modified: 2014/01/24 10:08 by mihai.carabas
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0