Bug 494414

Summary: vgcfgrestore can segfault if some PV is missing
Product: Red Hat Enterprise Linux 5 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Milan Broz <mbroz>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: high    
Version: 5.3CC: agk, cmarthal, dwysocha, edamato, heinzm, jbrassow, mbroz, prockai, pvrabec, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 491902 Environment:
Last Closed: 2009-09-02 11:56:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 491902    
Bug Blocks:    

Comment 2 Milan Broz 2009-04-06 20:01:20 UTC
+++ This bug was initially created as a clone of Bug #491902 +++

Description of problem:

# pvcreate /dev/sd[bc]
  Physical volume "/dev/sdb" successfully created
  Physical volume "/dev/sdc" successfully created
# vgcreate vg_test /dev/sd[bc]
  Volume group "vg_test" successfully created
# vgcfgbackup -f vg_test vg_test
  Volume group "vg_test" successfully backed up.

now some PV is lost...

# pvremove -ff /dev/sdb
...
  Labels on physical volume "/dev/sdb" successfully wiped

# vgcfgrestore -f vg_test vg_test
  Couldn't find device with uuid 'jYyR3Q-G601-hQYa-XLuB-z3Bb-nP1s-Bx8dYd'.
Segmentation fault

Comment 4 Milan Broz 2009-05-21 09:22:22 UTC
Fix in version lvm2-2.02.46-1.el5.

Comment 6 Corey Marthaler 2009-07-01 17:24:34 UTC
Fix verified in lvm2-2.02.46-8.el5.

[root@grant-01 ~]# vgcfgrestore -f vg_test vg_test
  Couldn't find device with uuid 'rCJ1rb-9NJr-beHf-FST8-7UAw-9EQ7-8ILI48'.
  Cannot restore Volume Group vg_test with 1 PVs marked as missing.
  Restore failed.

Comment 8 errata-xmlrpc 2009-09-02 11:56:39 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1393.html