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] Re: DomU guest - resize disk on LVM?

To: "HAWKER, Dan" <dan.hawker@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Re: DomU guest - resize disk on LVM?
From: "Christopher G. Stach II" <cgs@xxxxxxxxx>
Date: Tue, 31 Oct 2006 09:23:46 -0600
Cc: xen-users@xxxxxxxxxxxxxxxxxxx, 'Robin Bowes' <robin-lists@xxxxxxxxxxxxxx>
Delivery-date: Thu, 02 Nov 2006 13:55:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <7F6B06837A5DBD49AC6E1650EFF54906012230D9@xxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <7F6B06837A5DBD49AC6E1650EFF54906012230D9@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (X11/20061029)
HAWKER, Dan wrote:
Gerd Hoffmann wrote:
Robin Bowes wrote:
I can increase the size of the under-lying logical volume
(/dev/vg01/lv_bah_vm) e.g increase it from 10GB to 15GB. But, even though I've resized the under-lying LV, the PV in the Xen guest is still only 10GB.

How do I get the PV inside the Xen guest to reflect the increased size of the under-lying disk, i.e. appear to be 15GB?
I think you can't resize PVs. How about creating a new /dev/hda3 partition (inside the guest) using the new disk space,
create a new pv
there, add that to the volume group?
Thanks for all the suggestions.

I have since realised what I'm missing: the PV/VG is actually created from a partition, i.e the under-lying disk is /dev/xvda, so I have /boot as /dev/xvda1 and the PV is /dev/xvda2. So, to resize it, I need to boot into a rescue disk or live CD and rezize the /dev/xvda2 partition. The PV should then reflect the increased size. I can then increase the partition size and grow the FS.


Are all these layers *really* required??? Seems messy to have LVM ontop of
LVM (even if the OS doesn't realise this is the case).
ATM for my Xen boxes I use LVM in the Dom0 and use this to create my DomU
drives. For instance I have Dom0 and DomU VGs in my Dom0. I then create the
usual set of LVs for each Dom0/U and make them accessible to the DomU in the
usual way (as sda1,sda2, etc, etc).

VG-Dom0
 - LVRoot
 - LVSwap
 - LVwhatever
VG-DomU
 - LVDomU1-root
 - LVDomU1-swap
 - LVDomU1-whatever
 - LVDomU2-root
 - LVDomU2-swap
 - LVDomU2-whatever

With this I can extend the LVs in the Dom0, and either shutdown the DomU and
resize2fs from Dom0 or even (tested on test VMs and low-use production ones)
resize online within the DomU. Works fine and I still get the manageability
of LVM within my DomU's without actually using LVM within them.

Just makes it simpler in my little head :)  or am I missing a trick here???

Dan

You're mostly right. There is an obvious advantage (for consistent naming for cluster nodes) to export the entire LVM partition to every domU (using CLVM) so you can just mount /dev/vgwhatever/foo-root inside of the domU instead of exposing /dev/vgwhatever/foo-root as /dev/xvda1 to the domain. LVM inside of LVM is definitely overcomplicating things, though.

--
Christopher G. Stach II

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