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] Expanding a virtual block device

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Expanding a virtual block device
From: Mark Dokter <dokter@xxxxxxxxxxxxx>
Date: Mon, 02 May 2011 12:44:09 +0200
Delivery-date: Mon, 02 May 2011 03:45:57 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tugraz.at; s=mailrelay; t=1304333051; i=@xxxxxxxxxxxxx; bh=fzp3K3KSKAAHi7FSG/IThoO5QuaMsEP6xYf3sg73RlE=; h=Message-ID:Date:From:Reply-To:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=WcDTdtqkC9fG5LS+h6k7f2bCff4xlxnq6xlHN+jSVp6uyhfGPRNphZzKzPy8PyhR8 /dBARnCcQYSCvr+JiIto5IOUF/2CqknAUCKdwWqcAcYoV/uLQCR5zTTDF94CxVje9F a31pqEQcmK1XvfmIXzthlr18ZJdgFnRaSLIkvAg4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DBE6629.6000208@xxxxxxxxxxxxxxxxx>
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>
Organization: Institute for Computer Graphics and Vision
References: <4DB95EAF.2040502@xxxxxxxxxxxxxxxxx> <BANLkTikRxrb1ANDpy6fDA1emd_hYnH7NNQ@xxxxxxxxxxxxxx> <4DBE6629.6000208@xxxxxxxxxxxxxxxxx>
Reply-to: dokter@xxxxxxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110419 Lightning/1.0b2 Thunderbird/3.1.9
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
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users