Bug 601383

Summary: converting a redundant log mirror to core log with insufficient devs results in an over concerned warning
Product: Red Hat Enterprise Linux 6 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Jonathan Earl Brassow <jbrassow>
Status: CLOSED ERRATA QA Contact: Corey Marthaler <cmarthal>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: agk, coughlan, dwysocha, heinzm, jbrassow, joe.thornber, mbroz, prajnoha, prockai
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.82-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 14:25:59 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:

Description Corey Marthaler 2010-06-07 20:09:11 UTC
Description of problem:
All that happens in this convert case is that the command fails, and according to lvs and dmsetup, all is fine with the old mirror. However from the convert error, it sounds like you just corrupted your mirror and are now in trouble.

LV                          VG        Attr   LSize  Copy%   Devices
centi_base                  centipede mwi-a-  1.00g 100.00  centi_base_mimage_0(0),centi_base_mimage_1(0)
 [centi_base_mimage_0]      centipede iwi-ao  1.00g         /dev/sdh1(0)
 [centi_base_mimage_1]      centipede iwi-ao  1.00g         /dev/sdg1(0)
centi_base_mlog             centipede mwi---  4.00m         centi_base_mlog_mimage_0(0),centi_base_mlog_mimage_1(0)
 [centi_base_mlog_mimage_0] centipede Iwi---  4.00m         /dev/sdc1(0)
 [centi_base_mlog_mimage_1] centipede Iwi---  4.00m         /dev/sdb1(0)


Converting from 1 leg(s) mirrored log; to 4 leg(s) core log on taft-01
lvconvert --mirrorlog core -m 4 centipede/centi_base /dev/sde1 /dev/sdf1
  Not enough PVs with free space available for parallel allocation.
  Consider --alloc anywhere if desperate.
  Unable to allocate extents for mirror(s).
  ABORTING: Failed to remove temporary mirror layer centi_base_mimage_0.
  Manual cleanup with vgcfgrestore and dmsetup may be required.

A convert w/o any pvs listed then works fine:
[root@taft-01 ~]# lvconvert --mirrorlog core -m 4 centipede/centi_base
  centipede/centi_base: Converted: 0.4%
  centipede/centi_base: Converted: 26.6%
  centipede/centi_base: Converted: 52.0%
  centipede/centi_base: Converted: 77.0%
  centipede/centi_base: Converted: 100.0%


Version-Release number of selected component (if applicable):
2.6.32-25.el6.x86_64

lvm2-2.02.66-3.el6    BUILT: Tue Jun  1 07:38:22 CDT 2010
lvm2-libs-2.02.66-3.el6    BUILT: Tue Jun  1 07:38:22 CDT 2010
lvm2-cluster-2.02.66-3.el6    BUILT: Tue Jun  1 07:38:22 CDT 2010
device-mapper-1.02.48-3.el6    BUILT: Tue Jun  1 07:38:22 CDT 2010
device-mapper-libs-1.02.48-3.el6    BUILT: Tue Jun  1 07:38:22 CDT 2010
device-mapper-event-1.02.48-3.el6    BUILT: Tue Jun  1 07:38:22 CDT 2010
device-mapper-event-libs-1.02.48-3.el6    BUILT: Tue Jun  1 07:38:22 CDT 2010
cmirror-2.02.66-3.el6    BUILT: Tue Jun  1 07:38:22 CDT 2010


How reproducible:
Everytime

Comment 1 RHEL Program Management 2010-06-07 20:23:17 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 2 RHEL Program Management 2010-07-15 14:03:24 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 5 Jonathan Earl Brassow 2011-01-19 18:33:22 UTC
Just tested... seems to be fixed:

[root@bp-04 LVM2]# devices vg
  LV                 Copy%  Devices
  lv                 100.00 lv_mimage_0(0),lv_mimage_1(0)
  [lv_mimage_0]             /dev/sdb1(0)
  [lv_mimage_1]             /dev/sdc1(0)
  [lv_mlog]          100.00 lv_mlog_mimage_0(0),lv_mlog_mimage_1(0)
  [lv_mlog_mimage_0]        /dev/sdh1(0)
  [lv_mlog_mimage_1]        /dev/sdi1(0)
[root@bp-04 LVM2]# lvconvert --mirrorlog core vg/lv /dev/sd[ef]1
  Logical volume lv converted.
[root@bp-04 LVM2]# lvconvert --mirrorlog mirrored vg/lv /dev/sd[hi]1
  Logical volume lv converted.
[root@bp-04 LVM2]# devices vg
  LV                 Copy%  Devices
  lv                 100.00 lv_mimage_0(0),lv_mimage_1(0)
  [lv_mimage_0]             /dev/sdb1(0)
  [lv_mimage_1]             /dev/sdc1(0)
  [lv_mlog]          100.00 lv_mlog_mimage_0(0),lv_mlog_mimage_1(0)
  [lv_mlog_mimage_0]        /dev/sdh1(0)
  [lv_mlog_mimage_1]        /dev/sdi1(0)
[root@bp-04 LVM2]# lvconvert --mirrorlog core vg/lv /dev/sd[hf]1
  Logical volume lv converted.

Upstream version <= 2.02.82

Comment 7 Peter Rajnoha 2011-01-27 15:21:01 UTC
Also:

  LV                    Devices                                      
  lvol0                 lvol0_mimage_0(0),lvol0_mimage_1(0)          
  [lvol0_mimage_0]      /dev/sdb(0)                                  
  [lvol0_mimage_1]      /dev/sdc(0)                                  
  [lvol0_mlog]          lvol0_mlog_mimage_0(0),lvol0_mlog_mimage_1(0)
  [lvol0_mlog_mimage_0] /dev/sdi(0)                                  
  [lvol0_mlog_mimage_1] /dev/sdj(0) 

[root@node-b ~]# lvconvert --mirrorlog core -m 4 vg/lvol0 /dev/sdd /dev/sde
  Cannot both allocate and free extents when specifying physical volumes to use.
  Please specify the operation in two steps.

[root@node-b ~]# lvconvert --mirrorlog core -m 4 vg/lvol0
  vg/lvol0: Converted: 100,0%


 lvol0        lvol0_mimage_0(0),lvol0_mimage_1(0),lvol0_mimage_2(0),lvol0_mimage_3(0),lvol0_mimage_4(0)
 [lvol0_mimage_0] /dev/sdb(0)
 [lvol0_mimage_1] /dev/sdc(0)
 [lvol0_mimage_2] /dev/sdd(0) 
 [lvol0_mimage_3] /dev/sde(0) 
 [lvol0_mimage_4] /dev/sdf(0)

Comment 9 Corey Marthaler 2011-03-16 20:14:44 UTC
Operation is no longer allowed, marking verified in the latest rpms.

2.6.32-114.0.1.el6.x86_64

lvm2-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
lvm2-libs-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
lvm2-cluster-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
udev-147-2.33.el6    BUILT: Wed Feb  9 09:56:24 CST 2011
device-mapper-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
device-mapper-libs-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
device-mapper-event-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
device-mapper-event-libs-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
cmirror-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011


[root@grant-02 ~]# lvs -a -o +devices
  LV                         Attr   LSize   Log             Copy%  Devices
  centi_base                 mwi-a- 500.00m centi_base_mlog 100.00 centi_base_mimage_0(0),centi_base_mimage_1(0)
  [centi_base_mimage_0]      iwi-ao 500.00m                        /dev/sdb1(0)
  [centi_base_mimage_1]      iwi-ao 500.00m                        /dev/sdb2(0)
  [centi_base_mlog]          mwi-ao   4.00m                 100.00 centi_base_mlog_mimage_0(0),centi_base_mlog_mimage_1(0)
  [centi_base_mlog_mimage_0] iwi-ao   4.00m                        /dev/sdc3(0)
  [centi_base_mlog_mimage_1] iwi-ao   4.00m                        /dev/sdc4(0)

[root@grant-02 ~]# lvconvert --mirrorlog core -m 4 centipede/centi_base /dev/sdc1 /dev/sdc2
  Cannot both allocate and free extents when specifying physical volumes to use.
  Please specify the operation in two steps.

Comment 10 errata-xmlrpc 2011-05-19 14:25:59 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-2011-0772.html