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

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



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?

Mauro,

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 
tool.

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.

--
Joost

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


 


Rackspace

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