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

Re: [Xen-users] Resizing DomUs

Harold A. Giménez Ch. wrote:
Thanks Rainer, that makes sense.
How would I go about resizing the LVM? The PV you mention is simply the /boot partition, and the LVM in there is where / is mounted. The objective would be to expand the LVM. How would I go about that?

There are several ways to do this but they all amount to the same in the end. If you use fdisk on the file you can delete the second partition and add it with the same start point and the default end point so that the partition now fills the disk.

Generally speaking it's now easiest to do the remainder of the resizing in the guest. First, run "pvresize /dev/xvda2" (or whatever device the disk is mapped to). This should grow the volume group to which this belongs and you can now do "vgdisplay /dev/VolGroup00" (or whatever the volume group is called) and you'll see you have some free physical extents. Now you can increase the size of the logical volume you want to grow with "lvextend -L +<n> /dev/VolGroup00/LogVol01" where "<n>" is the number of extents you want to grow it by and which is no more than the number of free extents reported by vgdisplay. And now, finally, you can grow the file system: "resize2fs /dev/VolGroup00/LogVol01".

That's all assuming you have a Red Hat/Fedora style DomU and it's reasonably new. If it's different or it's older some things will be different: the main thing is that resize2fs used to be ext2online and took the mount point as parameter.

There are manual pages for all the commands I mentioned and it's worth reading them. And backing stuff up, just in case.

jch


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

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