Description of problem (from http://bugs.debian.org/567966): When I tried to use an already existing volume group as a storage pool for libvirt, it failed with "internal error lvs command failed". After tracking this down a bit, I find that there is a problem in how libvirt is parsing the output from the 'lvs' command. It fails if a logical volume is striped over more than one physical volume. The function virStorageBackendLogicalFindLVs() as defined in src/storage/storage_backend_logical.c to be more precise. Since it assumes there is only one physical volume listed in the lvs output, it fails with this error later on: error : virStorageBackendUpdateVolTargetInfo:784 : cannot open volume '/dev/vgcrypt/autobahn-root,,VpmDC9-f9zt-13JG-ftRE-1VeE-PILT-pMAaLC': No such file or directory The output from my lvs, that is fed to libvirt, is: # lvs --separator , --noheadings --units b --unbuffered --nosuffix --options lv_name,origin,uuid,devices,seg_size,vg_extent_size autobahn-root,,VpmDC9-f9zt-13JG-ftRE-1VeE-PILT-pMAaLC,/dev/block/254:4(0),/dev/block/254:5(0),/dev/block/254:3(0),6442450944,4194304 The regex does not allow for more than one device, so it thinks that the whole UUID belongs to the LV name as well. Version-Release number of selected component (if applicable): 0.7.5-5
Also raised on mailing list http://www.redhat.com/archives/libvir-list/2010-January/msg00501.html
Looks like I just found a new situation where this comma parsing problem rears its ugly head. I've got three LVM physical volumes in one volume group, that has logical volumes striped across those three physical volumes. Compare: # lvs --separator , --noheadings --units b --unbuffered --nosuffix --options lv_name,origin,uuid,devices,seg_size,vg_extent_size somename,,w5cyWP-0jY3-QAce-JUMH-GGz0-fEjG-Whfdgg,/dev/md127(67094),/dev/md125(33762),/dev/md126(19415),1696579190784,33554432 to: # lvs --separator \# --noheadings --units b --unbuffered --nosuffix --options lv_name,origin,uuid,devices,seg_size,vg_extent_size somename##w5cyWP-0jY3-QAce-JUMH-GGz0-fEjG-Whfdgg#/dev/md127(67094),/dev/md125(33762),/dev/md126(19415)#1696579190784#33554432 It looks like libvirt is choking on the commas inside the devices field. Any chance the libvirt separater character can be changed to something lvs doesn't internally use?
Oops, didn't realise I found a bug for the exact problem; I thought I was reading bug 640807.
This bug was fixeda long time back commit 82c1740ab92682d69ec8f02adb36b13e1902acd1 Author: Osier Yang <jyang> Date: Mon Oct 10 20:34:59 2011 +0800 storage: Do not use comma as seperator for lvs output