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] resizing filesystem in a VM

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] resizing filesystem in a VM
From: Alexandre Chapellon <a.chapellon@xxxxxxxxx>
Date: Thu, 11 Aug 2011 12:39:27 +0200
Delivery-date: Thu, 11 Aug 2011 03:41:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CAG1y0scxdFMiKeaXXEz+KRVFyCC8Hu2yGSfVsr9AY50T5OiC+A@xxxxxxxxxxxxxx>
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: horoa
References: <4E43A398.2010307@xxxxxxxxx> <CAG1y0scxdFMiKeaXXEz+KRVFyCC8Hu2yGSfVsr9AY50T5OiC+A@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110624 Thunderbird/5.0


Le 11/08/2011 11:53, Fajar A. Nugraha a écrit :
On Thu, Aug 11, 2011 at 4:40 PM, Alexandre Chapellon
<a.chapellon@xxxxxxxxx> wrote:
Hello,

I am using Xen 4.0.1 and Xen 3.2.1 dom0 with Debian Lenny and Squeeze dom0s.
I have a bunch of virtual machines running , all using LVM as backend storage.
Mostly, an LVM logical volume is mapped to a partition in the VM (eg: xvda1)
I have tried to hot resize the filesystem in the VM without umounting it but it just do not work... Here is what I did:

 - lvextend on the dom0,
 - resize2fs on the VM

Doing so, the kernel of the virtual machine seems not to see the space available for the partition has changed and resize2fs returns: "xvda already has xxxxxxxxx blocks, Nothing to do"

This last until I hot remove the disk from the VM using xm block-detach and re-attach it using xm block attach.
After re-attaching  the disk I can resize2fs as expected.

That is expected behaviour.

Is there anything I can do to avoid detaching the block device from the VM to let the kernel know the partition has a new size?
What are the bests practices in Xen to achieve hot resize of filesystem in the VM?
Newer version of xen and domU kernel allows domU to detect block
device change without having to detach/reboot. Try using domU kernel
form Jeremy's git tree.
I got it working using a debian xen kernel instead of the default xen kernel.

In which kernel version did this feature appeared in mainstream?


    

--

Attachment: a_chapellon.vcf
Description: Vcard

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>