Bug 640807 - libvirt fails on LVM volume groups with mirrored volumes
Summary: libvirt fails on LVM volume groups with mirrored volumes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On: 561077
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-06 20:08 UTC by Nuutti Kotivuori
Modified: 2015-07-28 15:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-28 15:05:18 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 727474 0 high CLOSED creating libvirt storage pools fails for lvm volume groups with striped volumes 2021-02-22 00:41:40 UTC

Internal Links: 727474

Description Nuutti Kotivuori 2010-10-06 20:08:58 UTC
Description of problem:
libvirt fails on LVM volume groups with even a single mirrored volume. This is because it cannot parse the "lvs" command output after this. The parsing fails, because libvirt is using "," as a field separator, and "lvs" is using "," as a separator for listing multiple parts of the mirror. The offending piece of code is in src/storage/storage_backend_logical.c, function virStorageBackendLogicalFindLVs. An example of a lvs output line for a volume with mirrors:

  xxx-2,,NeqcV6-OwR6-iHUQ-vQ8I-2FX2-t0Ti-rYKLnA,xxx-2_mimage_0(0),xxx-2_mimage_1(0),21474836480,4194304

Version-Release number of selected component (if applicable):
All versions, including 0.8.4

How reproducible:
Fully reproducible.

Steps to Reproduce:
1. Configure a volume group for libvirt usage.
2. Create a volume in the volume group.
3. Configure volume to be mirrored: lvconvert -m 1 <logicalvolume>
4. Attempt to start the storage pool in libvirt.
  
Actual results:
Storage pool does not start because of lvs command error.

Expected results:
Storage pool works as expected.

Comment 1 Nuutti Kotivuori 2010-10-06 20:17:41 UTC
This is essentially the same bug as #561077, but since the path specification for mirrored volumed is different from striped volumes, I believe this bug should be left open until it can be confirmed that libvirt works for mirrored volumes as well.

Comment 2 Ján Tomko 2015-07-28 15:05:18 UTC
Fixed upstream by:
commit 82c1740ab92682d69ec8f02adb36b13e1902acd1
Author:     Osier Yang <jyang>
AuthorDate: 2011-10-10 20:34:59 +0800
Commit:     Osier Yang <jyang>
CommitDate: 2011-10-10 20:34:59 +0800

    storage: Do not use comma as seperator for lvs output
    
    RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=727474

git describe: v0.9.6-89-g82c1740 contains: v0.9.7-rc1~172


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