[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] expanding Xen guest disk size


  • To: <xen-users@xxxxxxxxxxxxxxxxxxx>
  • From: "Guido Hecken" <guido.hecken@xxxxxxxxxxxxx>
  • Date: Mon, 13 Jun 2011 21:39:37 +0200
  • Delivery-date: Mon, 13 Jun 2011 12:40:52 -0700
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Thread-index: AcwqAaExx4yed55YSjKY0YMtV/LRmQ==
  • Thread-topic: [Xen-users] expanding Xen guest disk size

In my previous post I adviced to delete the partition containing
volumegroup and a logical volume and recreate this partition to extend
it's size.
I forgot to mention some additional required steps.

After the hard work on the partitions you will have to alter your LVM
structure with it's physical volume (PV), volume group (VG) and logical
volume (LV).

Use parted or fdisk to:
- Delete partition 2 (hda2)
- Delete partition 1 (hda1)
- Create partition 1 Start (1) End (13) type 83 set active
- Create partition 2 Start (14) End (-1) type 8e

Extend your LVM layout:
- Resize the PV =>man pvresize
- Extend the VG => man vgextend
- Resize the LV => man lvresize

Resize your filesystems:
- resize2fs or xfs_growfs


Here the disklayout inside domu from Sylvan's last post in this thread:

root@testserver ~]# fdisk -l 

Disk /dev/hda: 15.7 GB, 15728640000 bytes 
255 heads, 63 sectors/track, 1912 cylinders 
Units = cylinders of 16065 * 512 = 8225280 bytes 

Device Boot Start End Blocks Id System 
/dev/hda1 * 1 13 104391 83 Linux 
/dev/hda2 14 764 6032407+ 8e Linux LVM 

----- 
root@testserver ~]# df -m 
Filesystem 1M-blocks Used Available Use% Mounted on 
/dev/mapper/VolGroup00-LogVol00 
2821 1116 1560 42% / 
/dev/hda1 99 13 82 14% /boot 
tmpfs 742 0 742 0% /dev/shm

Regards,
Guido


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.