RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 602748 - mirror leg down conversion during log up conversion leads to issues when specifying devs to be removed
Summary: mirror leg down conversion during log up conversion leads to issues when spec...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.0
Hardware: All
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Jonathan Earl Brassow
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On:
Blocks: 640051
TreeView+ depends on / blocked
 
Reported: 2010-06-10 16:13 UTC by Corey Marthaler
Modified: 2011-05-19 14:26 UTC (History)
10 users (show)

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.
Clone Of:
: 640051 (view as bug list)
Environment:
Last Closed: 2011-05-19 14:26:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0772 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2011-05-18 18:08:31 UTC

Description Corey Marthaler 2010-06-10 16:13:07 UTC
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 16:21:07 UTC
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 Program Management 2010-06-10 16:23:21 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 3 Corey Marthaler 2010-06-15 20:47:45 UTC
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 16:28:40 UTC
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 17:12:20 UTC
(granted it's easily hacked around but still)

Comment 6 RHEL Program Management 2010-07-15 14:12:08 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 9 Jonathan Earl Brassow 2010-08-26 16:11:22 UTC
    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 21:17:25 UTC
    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 15:36:29 UTC
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 21:57:02 UTC
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 14:26:07 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


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