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

Re: [Fedora-xen] xen and lvm

----- "Augusto Castelan Carlson" <accarlson gmail com> wrote:
> On 11/5/07, Richard W.M. Jones <rjones redhat com> wrote:
> > The advantages of LVM when combined with virtualisation or Xen are
> that
> > you can create guest partitions easily and flexibly, that they can
> have
> > nice names, and that you can resize and also delete them simply. 
> > also lets you do this flexibly across physical disks, add extra
> physical
> > disks if you run out of space, and so on.
> > So the basic command you need is:
> >
> >    lvcreate -L 10G -n myguest VolGroup00
> >
> > which would create a 10 GB partition called /dev/VolGroup00/myguest
> > within an existing volume group called VolGroup00.  (This isn't
> going to
> > be a tutorial about LVM - there are plenty out there, go and use
> Google).
> >
> > With the partition created above, just use the name of the
> partition
> > directly within the virt-manager creation dialog.  Forthcoming
> versions
> > of virt-manager will be able to do the provisioning of LVM storage
> more
> > automatically.  If you want to follow this work, take a look at
> libvir-list.
> >
> > This doesn't address directly your problem "to be able to borrow
> unused
> > space from one guest to be used in another one".  All that you'll
> get
> > with basic LVM is the ability to resize one guest down and another
> guest up.
> I pointed /dev/VolGroup00/myguest within virt-manager and installed
> the guest.
> Suppose that I need to add an extra physical disk or instead of
> borrow, only resize one guest down and another guest up.
> I did a lvextend to add 1G to myguest, but how can I make my guest
> see
> that change?
> In lvm How To they use the command resize2fs to resize the
> filesystem,
> but I do not realize how to apply that changes to guests using LVM or
> partitioned by the guest installer.
> I tried to use the guest drive partitioned as /dev/xvda1 (boot),
> /dev/xvda2 (/) and /dev/xvda3 (/home) and also with LVM.
> How can I make the guest see that change?

If I understand... You created a LV called myguest in dom0 and within your domU you have used fdisk to partition /dev/xvda and layered LVM on top of one of those partitions. Now you've expanded myguest and want to see that space gain in the domU.

I think what you should have done is turn /dev/xvda into a PV inside your domU. At that point you can use pvresize in your domU to take advantage of any space you may add to the myguest LV in dom0. I'm not sure how you'd account for a change in /dev/xvda otherwise. Someone else may know.

In your domU, you are working at the device level below the filesystem level. Resizefs doesn't immediately come into play.
Dale Bewley - Unix Administrator - Shields Library - UC Davis
GPG: 0xB098A0F3 0D5A 9AEB 43F4 F84C 7EFD  1753 064D 2583 B098 A0F3

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