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/
Home Products Support Community News


Re: [Xen-users] about lvm filesystem...........

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] about lvm filesystem...........
From: "J. Roeleveld" <joost@xxxxxxxxxxxx>
Date: Fri, 4 Jun 2010 08:57:02 +0200
Delivery-date: Thu, 03 Jun 2010 23:59:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTimybRzw8VGRUpjpXIsxDu06dnwO2pdglJQmYSrM@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>
References: <AANLkTilSk0v61_PWtw6NDr_1oI7KpfEPiczjgjsSj_sZ@xxxxxxxxxxxxxx> <4C07A532.1060304@xxxxxxxxxxxxxxxx> <AANLkTimybRzw8VGRUpjpXIsxDu06dnwO2pdglJQmYSrM@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.12.4 (Linux/2.6.30-gentoo-r5; KDE/4.3.5; x86_64; ; )
On Thursday 03 June 2010 22:54:04 Mauro wrote:
> On 3 June 2010 14:50, Miles Fidelman <mfidelman@xxxxxxxxxxxxxxxx> wrote:
> >  Mauro wrote:
> >> Sorry for my ignorance.
> >> When I create xen virtual machines on lvm I need to create a
> >> filesystem on lvm container?
> >
> > assuming you're using LVs as your root and swap devices, yes
> I'm italian and my english is very bad.
> If I've understood well xen-tools create the LV, then the filesystem
> on it and then put the VM image.
> So if I set, for example, 50G for my VM disk space and later I need
> more space I simply do lvextend on the LV and then resize2fs, then
> change the parameter on the VM config file, for example 100G, and
> simply restart the VM.
> Is it wrong?


I would do a different sequence here.
I would suggest you do:
1) stop VM
2) use "lvextend" to increase the LV
3) use "resize2fs" to increate the filesystem
4) start the VM

Do NOT resize the filesystem if the VM is not aware of the new change, weird 
things WILL happen this way.

Also, "resize2fs" is for EXT2 and EXT3 filesystems. If you use a different 
filesystem (for example: XFS, Reiserfs,...) you will need to use a different 

Also, recent XEN-versions (xen-kernels) support "online" resizing of LVs.
This means, that when you "lvextend" the LV, the DomU (VM) is informed of the 
new size.
You can then "resize2fs" the filesystem from within the DomU.


Xen-users mailing list