Tuesday, February 5, 2008

To increase a disk size for a VM

To increase a disk size for a VM:

  1. In XenCenter "Storage" tab add a space
  2. In the VM console create a physical volume: pvcreate /dev/xvdb
  3. Extend a Volume Group for the physical volume: vgextend VolGroup00 /dev/xvdb
  4. Extend a logical volume for the size of new disk: lvextend -L +39G /dev/VolGroup00/LogVol00
  5. Switch to single user mode: init 1
  6. Extend file system to the whole logical volume: resize2fs /dev/VolGroup00/LovVol00

No comments: