Re: expanding virtual disk based on lvm

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

 



On Tue, Aug 28, 2012 at 2:33 PM, Matthew Patton <mpatton@xxxxxxxxxxxxx> wrote:
> On Tue, 28 Aug 2012 16:26:38 -0400, Ross Boylan <ross@xxxxxxxxxxxxxxxx>
> wrote:
>
>> What do I need to so that the space will be recognized?
>
> your partition table for hd{a,b} within the guest is also now wrong. the
> "correct" way to add more space is to add another disk and then use LVM
> inside the guest to add space to filesystems.

For "incorrect" definitions of "correct".  :)  Or, at least,
convoluted definitions.  Now you have a filesystem on top of guest-LVM
on top of multiple virtual disks on top of host-LVM on top of multiple
disks.  Instead of just filesystem on virtual disk on LVM on physical
disk(s).

The following has worked for us since the KVM-60-something days:
  Stop the VM.
  Expand the LVM LV used by the VM (on the host side).
  Boot the VM to a LiveCD.
  Modify partition table to use all the extra space in the virtual disk.
  Grow the filesystem to use all the extra space (we only use XFS with
ext3 for /boot, so they expand nicely).
  Boot the VM.
  Enjoy all the extra space.

And, for our Xen boxes that use LVM LV directly (no partition table),
it's possible to do the expansion "live" with only a single reboot to
pick up the larger disk size:
  Expand the LVM LV used by the VM (on the host side).
  Reboot to get the larger disk size.
  Expand the filesystem live or via single-user mode boot (again, XFS
works wonderfully)

-- 
Freddie Cash
fjwcash@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux