[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] howto grow a domU disk image



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.