#567966 libvirt-bin: can't use striped LVs for LVM storage pool

Package:
libvirt-bin
Source:
libvirt
Submitter:
Anders Andersson
Date:
2023-04-17 15:57:43 UTC
Severity:
normal
Tags:
#567966#5
Date:
2010-02-01 15:18:20 UTC
From:
To:
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.

(This is most probably an upstream problem, but upstream encourages us to
report it for our separate distribution)

#567966#10
Date:
2010-02-02 16:25:58 UTC
From:
To:
Hi Anders,
On Mon, Feb 01, 2010 at 04:18:20PM +0100, Anders Andersson wrote:
[..snip..]
Thanks for the detailed report. I've forwarded it upstream.
Cheers,
 -- Guido