Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 748248 - libvirt should use vgchange -aly/-aln instead of vgchange -ay/-an for clustered volume groups
libvirt should use vgchange -aly/-aln instead of vgchange -ay/-an for cluster...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.1
Unspecified Unspecified
medium Severity high
: rc
: ---
Assigned To: Osier Yang
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-23 10:58 EDT by Roman
Modified: 2012-06-20 02:35 EDT (History)
7 users (show)

See Also:
Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 02:35:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 15:31:38 EDT

  None (edit)
Description Roman 2011-10-23 10:58:02 EDT
Description of problem:
libvirt should use vgchange -aly/-aln instead of vgchange -ay/-an for clustered volume groups

Version-Release number of selected component (if applicable):
libvirt-0.8.7-18.el6_1.1

How reproducible:
always

Steps to Reproduce:
1. Build 2-node cluster
2. Create clustered volume group
3. Create logical storage pool in libvirt
4. Open/mount any volume on the first node
5. Try to destroy storage pool on the second node
  
Actual results:
# virsh pool-destroy vg
error: Failed to destroy pool vg
error: internal error '/sbin/vgchange -an vg' exited with non-zero status 5 and signal 0:   Error locking on node node1: LV vg/lv1 in use: not deactivating

Expected results:
# virsh pool-destroy vg
Pool vg destroyed

Additional info:
Comment 2 Eric Blake 2011-10-24 11:34:08 EDT
see also bug 748437 for a proposed patch
Comment 4 Osier Yang 2011-12-12 09:02:31 EST
Patch committed to upstream.

commit 95ab4154178e41f92ebb16a2379c1ac6f99e6a89
Author: Rommer <rommer@active.by>
Date:   Mon Dec 12 15:40:52 2011 +0800

    storage: Activate/deactivate logical volumes only on local node
    
    Current "-ay | -an" has problems on pool starting/refreshing if
    the volumes are clustered. Rommer has posted a patch to list 2
    months ago.
    
    https://www.redhat.com/archives/libvir-list/2011-October/msg01116.html
    
    But IMO we shouldn't skip the inactived vols. So this is a squashed
    patch by Rommer.
    
    Signed-off-by: Rommer <rommer@active.by>
Comment 5 Osier Yang 2011-12-13 09:39:23 EST
*** Bug 748282 has been marked as a duplicate of this bug. ***
Comment 7 Huang Wenlong 2012-01-10 03:22:28 EST
Verify this bug with : 

libvirt-0.9.9-1.el6.x86_64


1) host1 and host2  use the same lvm via iscsi 

2) add lvm in the libvirt pool two hosts
<pool type='logical'>
  <name>vg</name>
  <uuid>7092394e-d5ee-301d-f2cc-21c0c0bb51a1</uuid>
  <capacity>1044381696</capacity>
  <allocation>104857600</allocation>
  <available>939524096</available>
  <source>
    <device path='/dev/sdf1'/>
    <name>vg</name>
    <format type='lvm2'/>
  </source>
  <target>
    <path>/dev/vg</path>
    <permissions>
      <mode>0700</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>


3)  start and create a lv 

#virsh vol-list vg
Name                 Path                                    
-----------------------------------------
ctest                /dev/vg/ctest  


4) in the host1  mount it 
#mount  /dev/vg/ctest  /media 

5) in the host2  destroy the pool 
# virsh pool-destroy vg
Pool vg destroyed

check the lv status is NOT available
# lvs
  LV      VG            Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  ctest   vg            -wi--- 100.00m    

in the host1  check the lv status is available
# lvs
  LV      VG              Attr   LSize    Origin Snap%  Move Log Copy%  Convert
  ctest   vg              -wi-ao  100.00m
Comment 8 Osier Yang 2012-05-04 06:16:26 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.
Comment 10 errata-xmlrpc 2012-06-20 02:35:31 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0748.html

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