Bug 773312 - up converting an inactive mirror with insufficient devs results in an over concerned warning
Summary: up converting an inactive mirror with insufficient devs results in an over co...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2
Version: 5.8
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jonathan Earl Brassow
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 807971 848599 928849
TreeView+ depends on / blocked
 
Reported: 2012-01-11 13:47 UTC by Corey Marthaler
Modified: 2013-10-01 00:27 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.02.88-11.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 848599 (view as bug list)
Environment:
Last Closed: 2013-10-01 00:27:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1352 0 normal SHIPPED_LIVE lvm2 bug fix update 2013-09-30 21:12:36 UTC

Description Corey Marthaler 2012-01-11 13:47:31 UTC
Description of problem:
This appears to be a remaining case left over from bug 582251 and similar to bug 601383. Note that the device being used in the upconvert is already in the mirror.

SCENARIO - [inactive_insufficient_upconvert_attempt]
Create a mirror, deactivate it, and then attempt an up convert w/o sufficient space
grant-01: lvcreate -m 1 -n insufficient_inactive_upconvert -L 500M mirror_sanity
Waiting until all mirrors become fully syncd...
   1/1 mirror(s) are fully synced: ( 100.00% )

Deactivate mirror
Attempt to add an additional leg, but w/o sufficient space
grant-01: lvconvert -m+1 mirror_sanity/insufficient_inactive_upconvert /dev/sdc1

[root@grant-01 ~]# lvs -a -o +devices
  LV                                         Attr   LSize   Log                                  Copy%  Devices
  insufficient_inactive_upconvert            mwi--- 500.00M insufficient_inactive_upconvert_mlog        insufficient_inactive_upconvert_mimage_0(0),insufficient_inactive_upconvert_mimage_1(0)
  [insufficient_inactive_upconvert_mimage_0] Iwi--- 500.00M                                             /dev/sdc1(0)
  [insufficient_inactive_upconvert_mimage_1] Iwi--- 500.00M                                             /dev/sdc2(0)
  [insufficient_inactive_upconvert_mlog]     lwi---   4.00M                                             /dev/sdb6(0)

[root@grant-01 ~]# lvconvert -m+1 mirror_sanity/insufficient_inactive_upconvert /dev/sdc1
  Insufficient suitable allocatable extents for logical volume : 125 more required
  Unable to allocate extents for mirror(s).
  ABORTING: Failed to remove temporary mirror layer insufficient_inactive_upconvert_mimagetmp_2.
  Manual cleanup with vgcfgrestore and dmsetup may be required.


Version-Release number of selected component (if applicable):
2.6.18-301.el5

lvm2-2.02.88-5.el5    BUILT: Fri Dec  2 12:25:45 CST 2011
lvm2-cluster-2.02.88-5.el5    BUILT: Fri Dec  2 12:48:37 CST 2011
device-mapper-1.02.67-2.el5    BUILT: Mon Oct 17 08:31:56 CDT 2011
device-mapper-event-1.02.67-2.el5    BUILT: Mon Oct 17 08:31:56 CDT 2011
cmirror-1.1.39-14.el5    BUILT: Wed Nov  2 17:25:33 CDT 2011
kmod-cmirror-0.1.22-3.el5    BUILT: Tue Dec 22 13:39:47 CST 2009


How reproducible:
Everytime

Comment 1 RHEL Program Management 2012-04-02 10:35:13 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 2 Nenad Peric 2012-08-23 14:08:26 UTC
The same error is still present in the newest lvm for 5.9

The device /dev/sdc1 is already present in the synchornized but inactive mirror. 

(09:09:31) [root@r5-node01:~]$ lvchange -an insufficient/inactive
(09:09:39) [root@r5-node01:~]$ lvconvert -m+1 insufficient/inactive /dev/sdc1
  Insufficient suitable allocatable extents for logical volume : 125 more required
  Unable to allocate extents for mirror(s).
  ABORTING: Failed to remove temporary mirror layer inactive_mimagetmp_3.
  Manual cleanup with vgcfgrestore and dmsetup may be required.

lvm2-cluster-2.02.88-9.el5
lvm2-2.02.88-9.el5

Comment 5 Jonathan Earl Brassow 2013-04-10 21:50:43 UTC
Fixed by the following upstream commit (which applies cleanly to 2.02.88 release):
commit cbcbb677313aa8a4116bcfd13ceccef05fb1f9a9
Author: Jonathan Brassow <jbrassow>
Date:   Wed Apr 10 16:47:04 2013 -0500

    mirror:  Fix overly-concerning warning on mirror up-convert failure.
    
    Attempting to up-convert an inactive mirror when there is insufficient
    space leads to the following message:
      Unable to allocate extents for mirror(s).
      ABORTING: Failed to remove temporary mirror layer inactive_mimagetmp_3.
      Manual cleanup with vgcfgrestore and dmsetup may be required.
    This is caused by a failure to execute the 'deactivate_lv' function in
    the error condition.  The deactivate returns an error because the LV is
    already inactive.  This patch checks if the LV is activate and calls
    deactivate_lv only if it is.  This allows the error cleanup code to work
    properly in this condition.
    
    It wasn't that big of a deal anyway, since there was no previous vg_commit
    that needed to be reverted.  IOW, no harm was done if the allocation failed.
    The message was scary and useless.

UNIT TEST:
[root@bp-01 lvm2]# vgs vg
  VG   #PV #LV #SN Attr   VSize VFree
  vg     7   2   0 wz--n- 5.72t 5.71t
[root@bp-01 lvm2]# lvs --segments vg
  LV     VG   Attr      #Str Type   SSize  
  lv     vg   rwi-a-r--    2 raid1    1.00g
  mirror vg   mwi---m--    7 mirror 500.00m
[root@bp-01 lvm2]# lvconvert -m +1 vg/mirror
  Insufficient suitable allocatable extents for logical volume : 125 more required
  Unable to allocate extents for mirror(s).

Comment 8 Nenad Peric 2013-05-16 09:30:33 UTC
The warning is downscaled in the new package:

(04:26:33) [root@r5-node02:~]$ lvconvert -m+1 mirror/insufficient_inactive_upconvert /dev/sdc1
  Insufficient suitable allocatable extents for logical volume : 125 more required
  Unable to allocate extents for mirror(s).

(the scenario mention in the OP is passing without issues).

Tested on lvm version:


lvm2-2.02.88-11.el5

Comment 10 Nenad Peric 2013-06-04 13:58:14 UTC
Marking verified with:

lvm2-2.02.88-11.el5

Comment 11 errata-xmlrpc 2013-10-01 00:27:16 UTC
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/RHBA-2013-1352.html


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