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

Re: [Xen-users] Expanding a virtual block device

On 05/02/2011 10:07 AM, Vivien Bernet-Rollande wrote:
> in my case the domU resides in a lv at the dom0 too, i've used
>> lvextend instead of  vdi-resize
>>   Dom0#  lvextend -L +5G /dev/vg_r710/vol_xyz
>> and followed the remaining steps from this link
>> http://www.michelem.org/2009/01/16/how-to-resize-a-disk-partition-on-a-xen-guest-linux-host/
>> at the end  used  resizefs
>> DomU# resize2fs /dev/vg_vm/lv_root
> The solution you are offering requires a reboot of the VM, which I'm
> trying to avoid. I know how to resize a LV and filesystem.
> I want to resize my disk, and have Xen and the domU notice it, without
> having to reboot the domU.
> Is this actually possible with Xen ?

I tried this and it's actually not a Xen issue. A resized volume in dom0
(even on DRBD :) ) is noticed by the domU.
So if your disk was 100G before and you add another 100G, fdisk(in domU)
will report a 200G disk after the resize in dom0.

If you have lvm set up in the domU too, you have some options:
- create a partition on the free disk space and add the pv to the volume
group - no reboot required
- delete the pv and recreate it with bigger dimensions - reboot required

If you have no volume management in the domU you have to recreate the
partition with the new dimensions before you run resizefs - reboot required.

hth, Mark

Xen-users mailing list



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