Re: resizing Xen para-virtualized guest partition

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

 



On Sat, 16 Jun 2007 09:30:27 -0400
Kanwar Ranbir Sandhu <m3freak@xxxxxxxxxxxxxxxxxx> wrote:

> On Mon, 2007-05-07 at 15:07 -0400, Paul Wouters wrote:
> > You do not need LVM for that provided you have the disk space on the dom0:
> > 
> > dd if=/dev/zero bs=1M count=1024 >> /var/lib/xen/images/guest.dsk
> > e2fsck -f /var/lib/xen/images/guest.dsk
> > resize2fs /var/lib/xen/images/guest.dsk
> > e2fsck -f /var/lib/xen/images/guest.dsk
> 
> How do you do this if one installs the domU in a LV on dom0?  I thought
> I could simply lvextend the dom0 LV, boot the domU, and then lv/vg/pv
> extend inside the domU, but that didn't work.
> 
> Regards,
> 
> Ranbir

So your entire xen disk is a LV in dom0, and the domU is using that
disk for the /boot partition and a PV for its own VG...

Resize the LV in dom0:

root@dom0# lvresize -L +5G /dev/VolGroup00/xendisk

...boot the domU. Run fdisk or some other partitioning utility in the
domU. Resize the partition there:

root@domU# fdisk /dev/xvda

...reboot the domU, since it'll still be in use. When it comes back, it
should see the new partition table. Now (assuming the PV for the domU
volgroup is /dev/xvda2):

root@domU# pvresize /dev/xvda2

...now the volgroup in the domU should see the new PE's. Resize the
LV's and extend the filesystem in the domU as you normally would.

I've done this several times and it's worked fine for me. There should
be no reason to import the VG into the dom0, unless you want to shrink
the domU root partition or something.

-- 
Jeff Layton <jlayton@xxxxxxxxxx>

--
Fedora-xen mailing list
Fedora-xen@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-xen

[Index of Archives]     [Fedora General]     [Fedora Music]     [Linux Kernel]     [Fedora Desktop]     [Fedora Directory]     [PAM]     [Big List of Linux Books]     [Gimp]     [Yosemite News]

  Powered by Linux