Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1376212

Summary: lvconvert splits allocation unnecessarily for legacy "mirror" segment type - take 3
Product: Red Hat Enterprise Linux 7 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Heinz Mauelshagen <heinzm>
lvm2 sub component: Mirroring and RAID QA Contact: cluster-qe <cluster-qe>
Status: CLOSED WONTFIX Docs Contact:
Severity: low    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, zkabelac
Version: 7.3   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-28 21:14:17 UTC Type: Bug
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 2016-09-14 21:39:05 UTC
Description of problem:
This is a follow up to the remaining issues in bug 1158172.

Scenario 1 in comment #26 of bug 1158172

### Scenario 1: No tags in lvm.conf, No alloc flags used in convert
[root@host-117 ~]# lvconvert -m1 --type mirror mirror_sanity/span
  Logical volume mirror_sanity/span being converted.
  mirror_sanity/span: Converted: 1.00%
  mirror_sanity/span: Converted: 100.00%

[root@host-117 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize    Log         Cpy%Sync Devices                          
  span            mirror_sanity mwi-a-m--- 400.00m  [span_mlog] 100.00   span_mimage_0(0),span_mimage_1(0)
  [span_mimage_0] mirror_sanity iwi-aom--- 400.00m                       /dev/sdf1(100)                   
  [span_mimage_0] mirror_sanity iwi-aom--- 400.00m                       /dev/sdd2(100)                   
  [span_mimage_1] mirror_sanity iwi-aom--- 400.00m                       /dev/sdd2(149)                   
  [span_mimage_1] mirror_sanity iwi-aom--- 400.00m                       /dev/sdf1(151)                   
  [span_mlog]     mirror_sanity lwi-aom---   4.00m                       /dev/sda1(0)
# This appears wrong as it's not redundant


Other questions remaining for tagged/cling scenarios in comment #26 of bug 1158172:
   - should tagged PVs take precedence over untagged PVs when choosing, even if smaller?
    - should normal allocation take account of PVs used by other segments when selecting parallel space?
      so a new mirror leg should avoid all PVs used by all segments of the LV already thereby avoiding A-B / B-A layouts




Version-Release number of selected component (if applicable):
3.10.0-501.el7.x86_64

lvm2-2.02.165-2.el7    BUILT: Wed Sep 14 09:01:43 CDT 2016
lvm2-libs-2.02.165-2.el7    BUILT: Wed Sep 14 09:01:43 CDT 2016
lvm2-cluster-2.02.165-2.el7    BUILT: Wed Sep 14 09:01:43 CDT 2016
device-mapper-1.02.134-2.el7    BUILT: Wed Sep 14 09:01:43 CDT 2016
device-mapper-libs-1.02.134-2.el7    BUILT: Wed Sep 14 09:01:43 CDT 2016
device-mapper-event-1.02.134-2.el7    BUILT: Wed Sep 14 09:01:43 CDT 2016
device-mapper-event-libs-1.02.134-2.el7    BUILT: Wed Sep 14 09:01:43 CDT 2016
device-mapper-persistent-data-0.6.3-1.el7    BUILT: Fri Jul 22 05:29:13 CDT 2016