XenServer/Palielināt VM LVM partīcijas izmēru

From Mana zināšanu grāmata
df -h
lvs
lvextend -L+10G /dev/mapper/vg-lvroot
resize2fs /dev/mapper/vg-lvroot
df -h

 

This should be relatively easy, since you're using LVM:
  1. First, as always, take a backup. 
  2. Resize the disk in Xen (you've already done this; despite this, please re-read step 1). 
  3. Use parted to resize the extended partition (xvda2); run parted /dev/xvda, then at the parted prompt resizepart 2 -1s to resize it to end at the end of the disk (BTW: quit will get out of parted). 
  4.  
Either (a) create another logical partition (xvda6) with the free space, then:
    1. reboot to pick up the partition table changes 
    2. pvcreate /dev/xvda6
    3. vgextend xenhosting-vg /dev/xvda6
or (b) 
    1. extend xvda5 using resizepart 5 -1s
    2. reboot to pick up the partition table changes 
    3. pvresize /dev/xvda5
  1.  
Finally, if you want to add that to your root filesystem, lvextend -r -l +100%FREE /dev/xenhosting-vg/root. The -r option to lvextend tells it to call resize2fs itself.