Bug 602748 - mirror leg down conversion during log up conversion leads to issues when specifying devs to be removed
mirror leg down conversion during log up conversion leads to issues when spec...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.0
All Linux
medium Severity high
: rc
: ---
Assigned To: Jonathan Earl Brassow
Corey Marthaler
:
Depends On:
Blocks: 640051
  Show dependency treegraph
 
Reported: 2010-06-10 12:13 EDT by Corey Marthaler
Modified: 2011-05-19 10:26 EDT (History)
10 users (show)

See Also:
Fixed In Version: lvm2-2.02.82-1.el6
Doc Type: Bug Fix
Doc Text:
When converting a mirror in such a way that adds devices - either to the image count or log - there must be enough devices available to make the change or the command will fail. This is especially pertinent when specifying devices (PVs) to be used for the conversion. Specified PVs are treated in the following manor when converting: Up-converting (adding devices to the mirror or its log): When PVs are specified, they are treated as the only available source for allocation. You must specify enough PVs to satisfy the request. Down-converting (removing devices from the mirror or its log): When PVs are specified, they are treated as the preferential devices to be removed. If there are more images to be removed than PVs specified, the remaining images are chosen by LVM.
Story Points: ---
Clone Of:
: 640051 (view as bug list)
Environment:
Last Closed: 2011-05-19 10:26:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0772 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2011-05-18 14:08:31 EDT

  None (edit)
Description Corey Marthaler 2010-06-10 12:13:07 EDT
Description of problem:

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG        Attr   LSize   Log Copy%  Convert Devices
  mirror            centipede mwi-a- 100.00m     100.00         mirror_mimage_0(0),mirror_mimage_1(0),mirror_mimage_2(0)
  [mirror_mimage_0] centipede iwi-ao 100.00m                    /dev/sdh2(0)
  [mirror_mimage_1] centipede iwi-ao 100.00m                    /dev/sdh1(0)
  [mirror_mimage_2] centipede iwi-ao 100.00m                    /dev/sdg2(0)

Converting from 3 leg(s) core log; to 1 leg(s) mirrored log on grant-01
lvconvert --mirrorlog mirrored -m 1 centipede/centi_base /dev/sdc3
  Not enough PVs with free space available for parallel allocation.
  Consider --alloc anywhere if desperate.
  Unable to allocate extents for mirror log.

# This leaves the mirror in "limbo" with a deactivated 3rd mirror leg, but it's not removed. 

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG        Attr   LSize   Log Copy%  Convert Devices
  mirror            centipede mwi-a- 100.00m     100.00         mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] centipede iwi-ao 100.00m                    /dev/sdh2(0)
  [mirror_mimage_1] centipede iwi-ao 100.00m                    /dev/sdh1(0)
  mirror_mimage_2   centipede -wi--- 100.00m                    /dev/sdg2(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 Corey Marthaler 2010-06-10 12:21:07 EDT
This operation works when converting from 3-way core log to 2-way disk log, since both the down and up convert use the one device specified.

[root@taft-01 ~]# lvcreate -n mirror -L 100M -m 2 --mirrorlog core centipede
  Logical volume "mirror" created

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG        Attr   LSize   Log Copy%  Convert Devices
  mirror            centipede mwi-a- 100.00m     100.00         mirror_mimage_0(0),mirror_mimage_1(0),mirror_mimage_2(0)
  [mirror_mimage_0] centipede iwi-ao 100.00m                    /dev/sdh2(0)
  [mirror_mimage_1] centipede iwi-ao 100.00m                    /dev/sdh1(0)
  [mirror_mimage_2] centipede iwi-ao 100.00m                    /dev/sdg2(0)

[root@taft-01 ~]# lvconvert --mirrorlog disk -m 1 centipede/mirror /dev/sdg2
  Logical volume mirror converted.

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG        Attr   LSize   Log         Copy%  Convert Devices
  mirror            centipede mwi-a- 100.00m mirror_mlog 100.00         mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] centipede iwi-ao 100.00m                            /dev/sdh2(0)
  [mirror_mimage_1] centipede iwi-ao 100.00m                            /dev/sdh1(0)
  [mirror_mlog]     centipede lwi-ao   4.00m                            /dev/sdg2(0)
Comment 2 RHEL Product and Program Management 2010-06-10 12:23:21 EDT
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 3 Corey Marthaler 2010-06-15 16:47:45 EDT
This issue also happens when dealing with the fact you can't yet up convert mirror logs.

[root@taft-01 ~]# lvs -a -o +devices
  LV                    VG        Attr   LSize   Log             Copy%  Convert Devices
  centi_base            centipede mwi-a- 700.00m centi_base_mlog 100.00         centi_base_mimage_0(0),centi_base_mimage_1(0),centi_base_mimage_2(0)
  [centi_base_mimage_0] centipede iwi-ao 700.00m                                /dev/sdh2(0)
  [centi_base_mimage_1] centipede iwi-ao 700.00m                                /dev/sdh1(0)
  [centi_base_mimage_2] centipede iwi-ao 700.00m                                /dev/sdg2(0)
  [centi_base_mlog]     centipede lwi-ao   4.00m                                /dev/sde1(0)

[root@taft-01 ~]# lvconvert --mirrorlog mirrored -m 1 centipede/centi_base /dev/sdh2 /dev/sdf2
  Adding log redundancy not supported yet.
  Try converting the log to 'core' first.

[root@taft-01 ~]# lvs -a -o +devices
  LV                    VG        Attr   LSize   Log             Copy%  Convert Devices
  centi_base            centipede mwi-a- 700.00m centi_base_mlog 100.00         centi_base_mimage_1(0),centi_base_mimage_2(0)
  centi_base_mimage_0   centipede -wi--- 700.00m                                /dev/sdh2(0)
  [centi_base_mimage_1] centipede iwi-ao 700.00m                                /dev/sdh1(0)
  [centi_base_mimage_2] centipede iwi-ao 700.00m                                /dev/sdg2(0)
  [centi_base_mlog]     centipede lwi-ao   4.00m                                /dev/sde1(0)
Comment 4 Corey Marthaler 2010-06-16 12:28:40 EDT
This bug is going to lead to issues when running standard regression tests because the "goofied" legs don't get deleted when they're supposed to, so after awhile you need up running of of free devs.

  LV                         VG        Attr   LSize    Log             Copy%   Devices
  centi_base                 centipede mwi-a- 700.00m  centi_base_mlog 100.00  centi_base_mimage_30(0),centi_base_mimage_31(0)
  centi_base_mimage_12       centipede -wi--- 700.00m                          /dev/sdg2(350)
  centi_base_mimage_16       centipede -wi--- 700.00m                          /dev/sdg1(175)
  centi_base_mimage_19       centipede -wi--- 700.00m                          /dev/sdg2(525)
  centi_base_mimage_2        centipede -wi--- 700.00m                          /dev/sdg2(0)
  centi_base_mimage_22       centipede -wi--- 700.00m                          /dev/sdg2(700)
  centi_base_mimage_25       centipede -wi--- 700.00m                          /dev/sdg2(875)
  centi_base_mimage_29       centipede -wi--- 700.00m                          /dev/sdg1(350)
  [centi_base_mimage_30]     centipede iwi-ao 700.00m                          /dev/sdh2(0)
  [centi_base_mimage_31]     centipede iwi-ao 700.00m                          /dev/sdh1(0)
  centi_base_mimage_5        centipede -wi--- 700.00m                          /dev/sdg2(175)
  centi_base_mimage_9        centipede -wi--- 700.00m                          /dev/sdg1(0)
  [centi_base_mlog]          centipede mwi-ao   4.00m                  100.00  centi_base_mlog_mimage_0(0),centi_base_mlog_mimage_1(0)
  [centi_base_mlog_mimage_0] centipede iwi-ao   4.00m                          /dev/sde2(0)
  [centi_base_mlog_mimage_1] centipede iwi-ao   4.00m                          /dev/sde1(0)
Comment 5 Corey Marthaler 2010-06-16 13:12:20 EDT
(granted it's easily hacked around but still)
Comment 6 RHEL Product and Program Management 2010-07-15 10:12:08 EDT
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 9 Jonathan Earl Brassow 2010-08-26 12:11:22 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When converting a mirror is such a way that adds devices - either to the image count or log - there must be enough devices available to make the change or the command will fail.  This is especially pertinent when specifying devices (PVs) to be used for the conversion.  

Specified PVs are treated in the following manor when converting:
Up-converting (adding devices to the mirror or its log):
When PVs are specified, they are treated as the only available source for allocation.  You must specify enough PVs to satisfy the request.

Down-converting (removing devices from the mirror or its log):
When PVs are specified, they are treated as the preferential devices to be removed.  If there are more images to be removed than PVs specified, the remaining images are chosen  by LVM.
Comment 12 Jonathan Earl Brassow 2010-11-12 16:17:25 EST
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,4 +1,4 @@
-When converting a mirror is such a way that adds devices - either to the image count or log - there must be enough devices available to make the change or the command will fail.  This is especially pertinent when specifying devices (PVs) to be used for the conversion.  
+When converting a mirror in such a way that adds devices - either to the image count or log - there must be enough devices available to make the change or the command will fail.  This is especially pertinent when specifying devices (PVs) to be used for the conversion.  
 
 Specified PVs are treated in the following manor when converting:
 Up-converting (adding devices to the mirror or its log):
Comment 13 Jonathan Earl Brassow 2011-01-10 10:36:29 EST
It is no longer possible to add/remove a log device while removing/adding a mirror image while specifying PVs.
Comment 17 Corey Marthaler 2011-03-11 16:57:02 EST
This operation is no longer allowed. Marking verified.

[root@taft-02 ~]# lvconvert -m 3 --mirrorlog core taft/mirror /dev/sde1 /dev/sdh1
  Cannot both allocate and free extents when specifying physical volumes to use.
  Please specify the operation in two steps.


2.6.32-94.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.31.el6    BUILT: Wed Jan 26 05:39:15 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
Comment 18 errata-xmlrpc 2011-05-19 10:26:07 EDT
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

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