Bug 505143

Summary: Automatic recovery of inconsistent volume groups fails when PVs are missing.
Product: Red Hat Enterprise Linux 5 Reporter: Petr Rockai <prockai>
Component: lvm2Assignee: Petr Rockai <prockai>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: low    
Version: 5.4CC: agk, cmarthal, dwysocha, edamato, heinzm, jbrassow, mbroz, prockai, syeghiay
Target Milestone: beta   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 11:57:42 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:    
Bug Blocks: 504699    
Attachments:
Description Flags
recovery-partial.diff none

Description Petr Rockai 2009-06-10 19:39:18 UTC
Created attachment 347281 [details]
recovery-partial.diff

QA testing of lvm2 uncovered that when a failed PV is re-added to a VG, lvm commands fail due to a failure in automatic inconsistency recovery (see comment #3 is bug #504699). This affects mirror recovery process. A preliminary patch is available to address this issue (attached).

Comment 1 Petr Rockai 2009-06-10 20:00:25 UTC
I have verified that the proposed patch fixes the problem (test for this is now in the upstream LVM testsuite).

Nevertheless, I have encountered a different bug, which we probably want to fix, although this is not as critical right now. This is that vgreduce --removemissing does not update metadata on the PV(s) it is removing, so we wind up with inconsistent copies again. I guess the right behaviour would be for vgreduce --removemissing to try fixing metadata on the bad PV as well, in case it has been restored already. For now, the workaround is to use vgreduce vg bad_pv,  which works as expected. The PV can then be put back in the VG. We cannot automatically take the PV back as non-missing, since this could lead to nasty corner cases.

Comment 5 Milan Broz 2009-06-12 09:05:48 UTC
Patch in lvm2-2_02_46-6_el5.

Comment 10 errata-xmlrpc 2009-09-02 11:57:42 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