[Fedora-xen] Expanding a VBD in FC5

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

 



Okay... I think I've figured out how to do this..

Problem:  I created a volume backed DomU on a 3G logical volume. The DomU itself
used LVM to manage disks. I needed to expand the disk (i.e., the LVM on the Dom0).

The previous workaround was to add another LV in the Dom0 and assign it to the DomU.
This created a second xvdb in the domU. I used standard LVM tools to create a PV and
assign it to the original volume group.  E.g.:

My xm-fc5-005 initially contained:
  name = "xm-fc5-005"
  memory = "256"
  disk = [ 'phy:/dev/rootvg/xm-fc4-005_lv,xvda,w']
  vif = [ 'mac=00:16:3e:20:48:ae' ]
  bootloader="/usr/bin/pygrub"

I added another disk by creating a new LV in dom0 and assigning with:

 disk = [ 'phy:/dev/rootvg/xm-fc4-005_lv,xvda,w',\
          'phy:/dev/rootvg/xm-fc5-005_lv2,xvdb,w' ]

The above works fine, and is probably no less efficient than the method that
follows, but it felt kind of kludgey to add space that way. The second method is to
lvresize the original VBD and use pvresize in the domU:

  lvresize -L +1G /dev/rootvg/xm-fc4-005_lv

Then in the domU:
First, determine the PV device by running pvdisplay and getting the PV Name. In this
case, xvda2. Next resize it:

  pvresize --setphysicalvolumesize 4G /dev/xvda2

pvresize appears to only be available in FC5... alas.

If you're not running LVMs inside the domU, you'd use parted (or qparted) to resize.



-- 
* The Digital Hermit   http://www.digitalhermit.com
* Unix and Linux Solutions   kwan@xxxxxxxxxxxxxxxxx


[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