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] How do I resize a Physical Partition in a Dom U that's "

To: Bob Linkonij <boblnknj0@xxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] How do I resize a Physical Partition in a Dom U that's "on" a Logical Volume in the Dom 0?
From: Simon Hobson <linux@xxxxxxxxxxxxxxxx>
Date: Fri, 1 May 2009 17:33:06 +0100
Cc:
Delivery-date: Fri, 01 May 2009 09:33:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <54f972110905010823j7b89b586ief072abf79fda2a@xxxxxxxxxxxxxx>
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>
References: <54f972110905010823j7b89b586ief072abf79fda2a@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Bob Linkonij wrote:

What I want to do now is increase the size of the Dom U's root
(/dev/xvdc) partition.  And I want to avoid losing, overwriting, or
screwing up somehow my data in the process :-)

I know the first step I have to do is increase the size of the right
LV, that matches the /dev/xvdc1 "root" partition in the Dom U, in the
Dom 0 first.  I do that with

lvextend -L +4G /dev/VG01 guest_root

Can I do that "hot" without shutting down the Dom U first?  Or do I
need to shut it down THEN do the lvextend?

You can do that 'hot'

The next step is what's got me confused.

The lvcreate I did first increased the size of "/dev/xvdc", but now I
need to grow or extend the "/dev/xvdc1" partition in the Dom U to fill
up to the maximum available.

Do I do that in the Dom U or in the Dom 0?  I think resize2fs needs to
be used, since I don't have a Logical Volume in the Dom U.  I just
don't know.

I'm not clear here - did you partition /dev/xvdc and create a filesystem on /dev/xvdc1, or did you create a filesystem on /dev/xvdc ? I do the latter.

If you create a filesystem on the disk device rather than partitioning it, then you can shutdown the guest, use resize2fs to enlarge the filesystem in it, and startup the guest.

If you created a partition, then you will need to deal with that. I think there was a discussion a while back on mounting partitions from a partition. You'll need to enlarge the partition to fill the disk, and then you can resize the filesystem in it. Other than doing it from within the guest I don't know how to do that. Once you shutdown and then start up (NOT reboot) the guest, it will see the new logical volume as a bigger disk - I don't know if there is any way to make this happen 'live'.

I'm sorry if I'm just missing what's obvious but I'm kind of confused
by the whole Logical/Physical differences in the Dom 0 and the Dom U.

You're not alone !

--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

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