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

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] How do I resize a Physical Partition in a Dom U that's "on" a Logical Volume in the Dom 0?
From: Bob Linkonij <boblnknj0@xxxxxxxxx>
Date: Fri, 1 May 2009 08:23:49 -0700
Delivery-date: Fri, 01 May 2009 08:24:38 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=kvefTWSiZvTGDKs4sVhu8XOhE5FjwbnFXtNEUszeHdk=; b=o6xRL+6Gjqou4jx2ftRjLWw+iXCuNeR03GmDr9Ylh8JrZmtRIz7jpFQWNqZakZp+bj mB7A7zpg6p/B6+6QJJNx7PLAJEWgvonF2M6D6HHFFexhXdkoNP8Gf15f665M8z6KoK7u 5kaqFxJUkLtBqi/Rt9Xy0P9+8iK/gHuMmzl3I=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=onZuUxhG0qiV9Nols5wjOBhr9BwTg9DwHBf5LtfZWHqeca/f9xOFYQJTb6T3Fgbk7b cRVU7IqB72yewjE05BkKzvuyg7OR6QzT8blowXImvLwwOPjabeHz6813UaokqggrAo/y WgSq9oFzzDIkvCBnWuWk4aCCwwbkQ0tbUTeQI=
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
Hey all,

I'm trying to figure out how to re-size physical partitions in the Dom U.

I've read up what I can find on line and finally decided to have
Logical Volumes in the Dom 0 and pass them as physical volumes for use
in the Dom U.

Here's an example of what I'm doing.

To start in the Dom 0 I created the LV's with

lvcreate -n guest_boot -L 100M /dev/VG01
lvcreate -n guest_swap -L 512M /dev/VG01
lvcreate -n guest_root -L 4G   /dev/VG01

Then in the Dom U configuration file I added

disk=['phy:/dev/VG01/guest_boot,xvda,w','phy:/dev/VG01/guest_swap,xvdb,w','phy:/dev/VG01/guest_root,xvdc,w']

Then I set up the Dom U so

(hd0)   /dev/xvda  --------> mounts @ "/boot"
(hd1)   /dev/xvdb  --------> mounts @ "swap"
(hd2)   /dev/xvdc  --------> mounts @ "/"

So with this the Dom U gets started OK.  In the guest I see

df -H
Filesystem             Size   Used  Avail Use% Mounted on
/dev/xvdc1             4.3G   2.1G   2.0G  51% /
udev                   543M    78k   543M   1% /dev
/dev/xvda1              82M    19M    57M  14% /boot

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?

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 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.

Any kind of help or advice would be really appreciated a lot!

Thanks a bunch.

Bob

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