WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] expanding Xen guest disk size

To: <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-users] expanding Xen guest disk size
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>