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] howto grow a domU disk image

To: Joe Linoff <jlinoff@xxxxxxxxxx>
Subject: Re: [Xen-users] howto grow a domU disk image
From: "Fajar A. Nugraha" <list@xxxxxxxxx>
Date: Mon, 31 Jan 2011 00:40:01 +0700
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 30 Jan 2011 09:41:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <8AD4194C251EC74CB897E261038F44787266B3@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>
References: <8AD4194C251EC74CB897E261038F44787266B3@xxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, Jan 31, 2011 at 12:23 AM, Joe Linoff <jlinoff@xxxxxxxxxx> wrote:
> My particular image had two
> partitions: ext3 for /sda1 (/boot) and lvm2 for /sda2 (/, swap, etc.)
> for the rest. Tools like gparted don't work with lvm (yet).

You DO know that you can just add a new disk image to domU and add it
to the LVM, right?

>   % # Create a new image of the correct size, in this case 16GB.
>   % dd if=/dev/zero of=newdisk bs=1GB count=16
>
>   % # Resize.
>   % virt-resize --expand /dev/sda2 vm01.img newdisk

I'm guessing virt-resize will copy the data from the old disk to the
new, bigger one.
If so, it'd create I/O load to the disk which might not be desirable
if you have other domUs running.

Adding a second disk to the LVM set has the benefit of:
- doesn't require copying existing data
- can be done live without shutting down domU

>   % mv vm01.img{,.too-small}

Good trick, I didn't know you can do that.

Glad to hear you were able to solve your problem.

-- 
Fajar

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

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