Bug 202826 - vgsplit is broken with mirrors
Summary: vgsplit is broken with mirrors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Milan Broz
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-16 16:47 UTC by Corey Marthaler
Modified: 2013-03-01 04:04 UTC (History)
5 users (show)

Fixed In Version: RHBA-2007-0287
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-08 00:05:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed fix (2.02 KB, patch)
2007-01-26 22:46 UTC, Milan Broz
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0287 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2007-04-28 19:01:34 UTC

Description Corey Marthaler 2006-08-16 16:47:15 UTC
Description of problem:
[root@taft-04 ~]# lvs -a -o +devices
  LV                VG         Attr   LSize   Origin Snap%  Move Log        
Copy%  Devices
  LogVol00          VolGroup00 -wi-ao  19.53G                                  
    /dev/sda2(0)
  LogVol01          VolGroup00 -wi-ao   1.94G                                  
    /dev/sda2(625)
  mirror            vg         mwi-a- 100.00M                    mirror_mlog
100.00 mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] vg         iwi-ao 100.00M                                  
    /dev/sdd2(0)
  [mirror_mimage_1] vg         iwi-ao 100.00M                                  
    /dev/sdb1(0)
  [mirror_mlog]     vg         lwi-ao   4.00M                                  
    /dev/sdc1(0)
[root@taft-04 ~]# vgsplit vg vg_new /dev/sdd2
  Logical volumes in "vg" must be inactive
[root@taft-04 ~]# lvscan
  ACTIVE            '/dev/vg/mirror' [100.00 MB] inherit
  ACTIVE            '/dev/VolGroup00/LogVol00' [19.53 GB] inherit
  ACTIVE            '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
[root@taft-04 ~]# lvchange -an /dev/vg/mirror
[root@taft-04 ~]# lvscan
  inactive          '/dev/vg/mirror' [100.00 MB] inherit
  ACTIVE            '/dev/VolGroup00/LogVol00' [19.53 GB] inherit
  ACTIVE            '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
[root@taft-04 ~]# vgsplit vg vg_new /dev/sdd2
  Unrecognised mirror log in segment start_extent.
  Couldn't read all logical volumes for volume group vg_new.
  Unrecognised mirror log in segment start_extent.
  Couldn't read all logical volumes for volume group vg_new.
  Volume group "vg_new" became inconsistent: please fix manually
[root@taft-04 ~]# lvs
  Unrecognised mirror log in segment start_extent.
  Couldn't read all logical volumes for volume group vg_new.
  Unrecognised mirror log in segment start_extent.
  Couldn't read all logical volumes for volume group vg_new.
  Volume group "vg_new" not found
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%
  LogVol00 VolGroup00 -wi-ao 19.53G
  LogVol01 VolGroup00 -wi-ao  1.94G

[root@taft-04 ~]# vgscan
  Reading all physical volumes.  This may take a while...
  Unrecognised mirror log in segment start_extent.
  Couldn't read all logical volumes for volume group vg_new.
  Unrecognised mirror log in segment start_extent.
  Couldn't read all logical volumes for volume group vg_new.
  Volume group "vg_new" not found
  Found volume group "vg" using metadata type lvm2
  Found volume group "VolGroup00" using metadata type lvm2
[root@taft-04 ~]# pvscan
  Unrecognised mirror log in segment start_extent.
  Couldn't read all logical volumes for volume group vg_new.
  Unrecognised mirror log in segment start_extent.
  Couldn't read all logical volumes for volume group vg_new.
  PV /dev/sdb1   VG vg           lvm2 [272.45 GB / 272.36 GB free]
  PV /dev/sdc1   VG vg           lvm2 [272.45 GB / 272.45 GB free]
  PV /dev/sda2   VG VolGroup00   lvm2 [68.12 GB / 46.66 GB free]
  PV /dev/sdd1                   lvm2 [930.89 GB]
  Total: 4 [1.51 TB] / in use: 3 [613.03 GB] / in no VG: 1 [930.89 GB]


Version-Release number of selected component (if applicable):
[root@taft-04 ~]# rpm -q lvm2
lvm2-2.02.06-6.0.RHEL4
[root@taft-04 ~]# rpm -q device-mapper
device-mapper-1.02.07-4.0.RHEL4

Comment 1 Alasdair Kergon 2006-08-16 16:50:34 UTC
needs special handling adding for mirrors - similar to the existing special
handling for snapshots

Comment 2 RHEL Program Management 2006-08-18 14:38:40 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 Nate Straz 2006-10-03 22:16:16 UTC
I hit this several times during RHEL4 U4 errata testing.  I had the same packages
as listed above.  Seems pretty easy to reproduce.

Comment 4 Milan Broz 2007-01-26 22:46:07 UTC
Created attachment 146726 [details]
Proposed fix

testing patch for lvm2 2.02.20, sent upstream...

Comment 5 Alasdair Kergon 2007-01-29 23:09:00 UTC
to be included in lvm2-2.02.21-1.el4 

Comment 8 Red Hat Bugzilla 2007-05-08 00:05:14 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 the 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-2007-0287.html


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