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 684929

Summary: Part II - RFE: add PV cling feature for mirror creation and conversion
Product: Red Hat Enterprise Linux 6 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
Status: CLOSED DUPLICATE QA Contact: Corey Marthaler <cmarthal>
Severity: high Docs Contact:
Priority: high    
Version: 6.1CC: agk, dwysocha, heinzm, jbrassow, mbroz, prajnoha, prockai, syeghiay, thornber, zkabelac
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-15 17:57:16 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 2011-03-14 20:10:28 UTC
Description of problem:
This feature may just need better documentation for better understanding. Howeve, the way I understand this feature, the following set up should produce a mirror with each leg using devices with only similarly tagged devices.

# This is the cling config in lvm.conf:
     cling_tag_list = [ "A", "B" ]

[root@taft-03 ~]# pvs -a -o +pv_tags /dev/sd[bcdefgh]1
  PV         VG   Fmt  Attr PSize   PFree   PV Tags
  /dev/sdb1  taft lvm2 a-   135.66g 135.66g A
  /dev/sdc1  taft lvm2 a-   135.66g 135.66g B
  /dev/sdd1  taft lvm2 a-   135.66g 135.66g B
  /dev/sde1  taft lvm2 a-   135.66g 135.66g C
  /dev/sdf1  taft lvm2 a-   135.66g 135.66g C
  /dev/sdg1  taft lvm2 a-   135.66g 135.66g A
  /dev/sdh1  taft lvm2 a-   135.66g 135.66g A


[root@taft-03 ~]# lvcreate --alloc cling -m 1 -n mirror -L 200G --nosync taft
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  Logical volume "mirror" created


[root@taft-03 ~]# lvs -a -o +devices
 LV                VG        Attr   LSize   Log         Copy%  Devices
 mirror            taft      Mwl-a- 200.00g mirror_mlog 100.00 mirror_mimage_0(0),mirror_mimage_1(0)
 [mirror_mimage_0] taft      iwi-ao 200.00g                    /dev/sdb1(0)
 [mirror_mimage_0] taft      iwi-ao 200.00g                    /dev/sdc1(0)
 [mirror_mimage_1] taft      iwi-ao 200.00g                    /dev/sdd1(0)
 [mirror_mimage_1] taft      iwi-ao 200.00g                    /dev/sde1(0)
 [mirror_mlog]     taft      lwl-ao   4.00m                    /dev/sdc1(16470)

Shouldn't the above leg mimage_0 have been made up of devices with tag "A" (/dev/sd[bgh]1) and leg mimage_1 of devices with tag "B" (/dev/sd[cd]1)? 


Version-Release number of selected component (if applicable):
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


How reproducible:
Everytime

Comment 1 Corey Marthaler 2011-03-14 21:16:32 UTC
After talking with agk, I learned that only the extension of already created mirrors currently work with cling tags. Conversion and creation is not yet checked-in.

Comment 2 Corey Marthaler 2011-03-15 17:57:16 UTC
Closing this as a dup of 687919 since that has more info in it.

*** This bug has been marked as a duplicate of bug 687919 ***