Bug 552452 - Can't create logical type storage pool from xml
Summary: Can't create logical type storage pool from xml
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.5
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-05 06:05 UTC by Alex Jia
Modified: 2010-01-07 08:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-07 07:58:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alex Jia 2010-01-05 06:05:55 UTC
Description of problem:
Can't create logical type storage pool from xml

Version-Release number of selected component (if applicable):
[root@dhcp-66-70-62 ~]# uname -a
Linux dhcp-66-70-62.nay.redhat.com 2.6.18-183.el5 #1 SMP Mon Dec 21 18:37:42 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
[root@dhcp-66-70-62 ~]# lsmod|grep kvm
kvm_intel              86664  0 
kvm                   223648  2 ksm,kvm_intel
[root@dhcp-66-70-62 ~]# rpm -qa|grep libvirt
libvirt-0.6.3-28.el5
libvirt-debuginfo-0.6.3-28.el5
libvirt-python-0.6.3-28.el5
[root@dhcp-66-70-62 ~]# rpm -qa|grep kvm
kvm-tools-83-140.el5
kvm-qemu-img-83-140.el5
etherboot-zroms-kvm-5.4.4-13.el5
kvm-83-140.el5
etherboot-roms-kvm-5.4.4-13.el5
kmod-kvm-83-140.el5


How reproducible:
always

Steps to Reproduce:
1.editor logical type pool xml file, such as pool-logical.xml
2.virsh pool-create pool-logical.xml
  
Actual results:
error: Failed to create pool from pool-logical.xml
error: internal error '/usr/sbin/vgchange -ay HostVG' exited with non-zero status 5 and signal 0:   Volume group "HostVG" not found

Expected results:
logical type pool can be create correctly.

Additional info:[root@dhcp-66-70-62 storagepoolschemadata]# cat pool-logical.xml 
<pool type='logical'>
  <name>HostVG</name>
  <uuid>1c13165a-d0f4-3aee-b447-30fb38789091</uuid>
  <capacity>99891544064</capacity>
  <allocation>99220455424</allocation>
  <available>671088640</available>
  <source>
    <name>HostVG</name>
    <format type='lvm2'/>
  </source>
  <target>
    <path>/dev/HostVG</path>
    <permissions>
      <mode>0700</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>
[root@dhcp-66-70-62 storagepoolschemadata]# virt-xml-validate pool-logical.xml 
pool-logical.xml validates
[root@dhcp-66-70-62 storagepoolschemadata]# virsh pool-create pool-logical.xml
error: Failed to create pool from pool-logical.xml
error: internal error '/usr/sbin/vgchange -ay HostVG' exited with non-zero status 5 and signal 0:   Volume group "HostVG" not found

Comment 1 Lawrence Lim 2010-01-05 06:53:28 UTC
Raising an exception as its a test blocker for Bug 509979 (5.5 approved).

Comment 2 Daniel Veillard 2010-01-06 13:43:30 UTC
The report doesn't indicate if the LVM already exists. The
pool-create operation won't build the volume group you need to use
the pool-build operation to actually construct the VG,

Daniel

Comment 3 Cole Robinson 2010-01-06 14:16:41 UTC
I don't think this is blocking any testing (I've put my reasoning in 509979).

Comment 4 Alex Jia 2010-01-07 07:53:59 UTC
(In reply to comment #3)
> I don't think this is blocking any testing (I've put my reasoning in 509979).  

Hi,Cole,you are right,this can't block bug 509979.thank you.

Alex

Comment 5 Alex Jia 2010-01-07 07:57:46 UTC
(In reply to comment #2)
> The report doesn't indicate if the LVM already exists. The
> pool-create operation won't build the volume group you need to use
> the pool-build operation to actually construct the VG,
> 
> Daniel  

Hi,Daniel,it's my wrong,I missed vg creation process and I retest it,the result is successful.

Comment 6 Alex Jia 2010-01-07 07:58:41 UTC
I retest it,logical type pool can be created successfully,so this bug isn't a bug,thank you.


Steps to Reproduce:
1.create a new partition - such as fdisk /dev/sda
2.initialize a disk or partition - such as pvcreate /dev/sda10
3.create a volume group HostVG - such as vgcreate HostVG /dev/sda10
4.editor pool-logical xml
5.virsh pool-create pool-logical.xml

[root@dhcp-66-70-173 storagepoolschemadata]# virsh pool-create pool-logical.xml
Pool HostVG created from pool-logical.xml

[root@dhcp-66-70-173 storagepoolschemadata]# virsh pool-list --all
Name                 State      Autostart
-----------------------------------------
HostVG               active     no

[root@dhcp-66-70-173 storagepoolschemadata]# virsh pool-dumpxml HostVG
<pool type='logical'>
  <name>HostVG</name>
  <uuid>1c13165a-d0f4-3aee-b447-30fb38789091</uuid>
  <capacity>1027604480</capacity>
  <allocation>0</allocation>
  <available>1027604480</available>
  <source>
    <name>HostVG</name>
    <format type='lvm2'/>
  </source>
  <target>
    <path>/dev/HostVG</path>
    <permissions>
      <mode>0700</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>


Version-Release number of selected component (if applicable):
[root@dhcp-66-70-173 ~]# uname -a
Linux dhcp-66-70-173.nay.redhat.com 2.6.18-183.el5 #1 SMP Mon Dec 21 18:37:42 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
[root@dhcp-66-70-173 ~]# lsmod|grep kvm
kvm_intel              86664  0
kvm                   223648  2 ksm,kvm_intel
[root@dhcp-66-70-173 ~]# rpm -qa|grep libvirt
libvirt-debuginfo-0.6.3-29.el5
libvirt-python-0.6.3-29.el5
libvirt-0.6.3-29.el5
[root@dhcp-66-70-173 ~]# rpm -qa|grep kvm
kvm-tools-83-140.el5
kvm-qemu-img-83-140.el5
kmod-kvm-83-140.el5


Note You need to log in before you can comment on or make changes to this bug.