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 User-List <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] resizing filesystem in a VM
From: "Fajar A. Nugraha" <list@xxxxxxxxx>
Date: Thu, 11 Aug 2011 16:53:48 +0700
Delivery-date: Thu, 11 Aug 2011 02:55:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E43A398.2010307@xxxxxxxxx>
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: <4E43A398.2010307@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
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.

-- 
Fajar

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

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