[CentOS] interesting kvm lvm collision issue

Mon Oct 25 21:33:02 UTC 2010
Iain Morris <iain.t.morris at gmail.com>

On Mon, Oct 25, 2010 at 2:18 PM, Gordon Messmer <yinyang at eburg.com> wrote:

> Which block devices are you exporting to your guest?  Post the libvirt
> configuration file for it.

See below.  It's specifically the second volume group that collides between
virtual and physical systems.  Both dom0 and U have identical VolGroup00
VGs, but these do not collide.

Renaming the VG used by the domU within the domU removes the collision, but
the newly-renamed VG still shows up in dom0 as a useable VG with space to be

Here is the pvdisplay output from dom0.  Interestingly, it shows
/dev/VolGroup01/lv-sys1-data as "physical volume"  when it's obviously just
an LV in the original VolGroup01 VG.  And this only happens with the
_second_ Volume Group created.  VolGroup00 is not an issue on this or any
other systems I've used:

[root at iain2 qemu]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/VolGroup01/lv-sys1-data
  VG Name               vg-sys1
  PV Size               40.00 GB / not usable 4.00 MB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              10239
  Free PE               0
  Allocated PE          10239
  PV UUID               FTA4QU-ydZ7-e2Yy-nBsi-t4st-3jj7-IAkQH8

  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               VolGroup00
  PV Size               39.06 GB / not usable 29.77 MB
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              1249
  Free PE               0
  Allocated PE          1249
  PV UUID               tTViks-3lBM-HGzV-mnN9-zRsT-fFT0-ZsJRse

  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup01
  PV Size               240.31 GB / not usable 25.75 MB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              7689
  Free PE               5129
  Allocated PE          2560
  PV UUID               ZE5Io3-WYIO-EfOQ-h03q-zGdF-Frpa-tm63fX

[root at iain2 qemu]# cat sys1.xml
<domain type='kvm'>
    <type arch='x86_64' machine='rhel5.4.0'>hvm</type>
    <boot dev='hd'/>
  <clock offset='utc'/>
    <disk type='block' device='disk'>
      <driver name='qemu' cache='none'/>
      <source dev='/dev/VolGroup01/lv-sys1'/>
      <target dev='vda' bus='virtio'/>
    <disk type='block' device='cdrom'>
      <target dev='hdc' bus='ide'/>
    <disk type='block' device='disk'>
      <source dev='/dev/VolGroup01/lv-sys1-data'/>
      <target dev='vdb' bus='virtio'/>
    <interface type='network'>
      <mac address='54:52:00:3b:4a:f5'/>
      <source network='default'/>
      <model type='virtio'/>
    <serial type='pty'>
      <source path='/dev/pts/3'/>
      <target port='0'/>
    <console type='pty' tty='/dev/pts/3'>
      <source path='/dev/pts/3'/>
      <target port='0'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>

-- -
Iain Morris
iain.t.morris at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20101025/1d213c0a/attachment-0004.html>