Bug 433768 - [RFE] mirror allocation policies for multiple storage systems
[RFE] mirror allocation policies for multiple storage systems
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2 (Show other bugs)
5.0
All Linux
medium Severity medium
: beta
: ---
Assigned To: Alasdair Kergon
Cluster QE
: FutureFeature, Reopened, Triaged
Depends On:
Blocks: 554476 504871 687919
  Show dependency treegraph
 
Reported: 2008-02-21 07:01 EST by Bryn M. Reeves
Modified: 2011-07-21 08:28 EDT (History)
15 users (show)

See Also:
Fixed In Version: lvm2-2.02.84-1
Doc Type: Enhancement
Doc Text:
This field is the basis of the errata or release note for this bug. It can also be used for change logs. The Technical Note template, known as CCFR, is as follows: Cause What actions or circumstances cause this bug to present. Consequence What happens when the bug presents. Fix What was done to fix the bug. Result What now happens when the actions or circumstances above occur. Note: this is not the same as the bug doesn’t present anymore.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-21 06:51:00 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)

  None (edit)
Description Bryn M. Reeves 2008-02-21 07:01:14 EST
Description of problem:
LVM2 already enforces the constraint that the images within a mirror be stored
on distinct PVs.

In an environment with multiple PVs that may or may not be part of the same
failure domain (e.g. multiple SAN enclosures) it is useful to also enforce the
constraint that images be stored across multiple domains (enclosures).

For e.g. in a two-way mirror consisting of three linear segments:

    +---+---+---+
    | a | b | c |
    +---+---+---+
    | d | e | f |
    +---+---+---+

If two independent storage enclosures are available, ideally, (a,b,c) and
(d,e,f) should be placed on different enclosures. This allows one whole SAN to
fail without compromising the mirror.

Currently this allocation policy has to be specified manually via PV command
line arguments. It would be advantageous to be able to tag PVs as belonging to
the same failure domain allowing the allocation policy for lvcreate/lvconvert to
automatically allocate images to independent physical storage.

Version-Release number of selected component (if applicable):
lvm2-2.02.27-2.el4

Additional info:
Comment 7 Alasdair Kergon 2008-07-24 08:09:06 EDT
What I had in mind was
  1. Tag PVs to group them  - can already be done - no code change required.

  2. New allocation policy that comes after 'cling' and only considers devices
that have a PV tag matching every PV used so far in the stripe;

  3. New allocation policy that follows 2 above and only considers devices that
have a PV tag matching the last PV used in the stripe.

The code already supports repeated allocation attempts with looser selection
criteria, and within the allocation loop, we'd just be adding a tag-matching check.

Don't know if we need both 2 and 3, but the decision can be shaped when we look
at the code - one of them could turn out harder to do: I think there is existing
code structure to match the last PV used in the stripe, but I'm not sure about
matching the whole of it.
Comment 12 RHEL Product and Program Management 2008-10-06 15:23:04 EDT
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.
Comment 14 Daniel Riek 2009-10-07 10:30:05 EDT
This enhancement request was evaluated by Red Hat Product Management for inclusion a Red Hat Enterprise Linux minor update release.

Red Hat does not currently plan to provide this enhanced functionality in a Red Hat Enterprise Linux minor update for currently deployed products.

With the goal of minimizing risk of change for deployed systems, and in response to customer and partner requirements, Red Hat takes a conservative approach when evaluating enhancements for inclusion in minor updates for currently deployed products. The primary objectives of update releases are to enable new hardware platform support and to resolve critical defects.

For more information on Red Hat Enterprise Linux maintenance policies, please consult: http://www.redhat.com/security/updates/errata/

Red Hat values your feedback and will take this enhancement request into consideration for future major releases of Red Hat Enterprise Linux.
Comment 20 RHEL Product and Program Management 2010-08-10 04:40:38 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Unfortunately, Red Hat is unable to address this request in the
current release.  Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 21 Alasdair Kergon 2010-11-03 21:50:04 EDT
Refining this a little, a new lvm.conf setting allocation/cling_by_tag_list.  If undefined, code functions like now.  If set, a new 'cling_by_tag' policy kicks in after 'cling' which requires that each stripe being extended on a PV that has one or more PV tags that match the ones in the list (incl wildcards) only extends the stripe into space on a PV with a matching PV tag.  Exact details to be determined when writing the code, choosing the easiest-to-code options.
Comment 22 Alasdair Kergon 2010-11-05 20:12:29 EDT
This seems to make sense as a straightforward extension of 'cling'.  It will only look at the preceding segment when matching tags, which should be fine for people using it in the way intended where there'll be a common tag through all the PV segments.  Although implemented as a separate 'cling_by_tag' policy, it is entirely internal to the tools and comes automatically if you use 'cling' and have the config file setting defined: you can't select it and it never appears in report/xxdisplay output.
Comment 23 Alasdair Kergon 2010-11-09 07:48:15 EST
See bug 504871 for details.
Comment 25 RHEL Product and Program Management 2011-01-11 14:52:56 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 26 RHEL Product and Program Management 2011-01-11 18:04:08 EST
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.
Comment 27 Alasdair Kergon 2011-02-09 15:57:25 EST
2.02.77
Comment 29 Milan Broz 2011-03-01 10:58:26 EST
Fixed in lvm2-2.02.84-1.el5
Comment 32 Corey Marthaler 2011-05-12 16:27:48 EDT
Here is a list of 9 cling/cling_by_tags cases that I tested on both 5.7 and 6.1 and their results.

Based on comment #19 of 6.1 bug 504871, further development for this feature is to be done for 6.2 and 5.8 (like adding lvconverts and lvcreates).

### Cases 1-7 were done with the following cling tag list in lvm.conf:
     cling_tag_list = [ "@A", "@B" ]

### Case 1. Mirror created w/ --alloc flag and enough PVs with tags for the extension to work
[root@taft-01 ~]# pvs -a -o +pv_tags /dev/sd[bcdefgh]1
  PV         VG   Fmt  Attr PSize   PFree   PV Tags
  /dev/sdb1  taft lvm2 a-   135.66G      0  A
  /dev/sdc1  taft lvm2 a-   135.66G      0  B
  /dev/sdd1  taft lvm2 a-   135.66G  71.33G 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  71.33G A
  /dev/sdh1  taft lvm2 a-   135.66G 135.66G A

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

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwl-a- 100.00G mirror_mlog 100.00  mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] taft iwi-ao 100.00G                     /dev/sdb1(0)
Comment 33 Corey Marthaler 2011-05-12 16:32:42 EDT
[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwl-a- 100.00G mirror_mlog 100.00  mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] taft iwi-ao 100.00G                     /dev/sdb1(0)
  [mirror_mimage_1] taft iwi-ao 100.00G                     /dev/sdc1(0)
  [mirror_mlog]     taft lwl-ao   4.00M                     /dev/sdh1(0)

[root@taft-01 ~]# lvextend --alloc cling_by_tags -L +100G taft/mirror
  Extending 2 mirror images.
  Extending logical volume mirror to 200.00 GB
  Logical volume mirror successfully resized

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwl-a- 200.00G mirror_mlog  50.11  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/sdg1(0)
  [mirror_mimage_1] taft Iwi-ao 200.00G                     /dev/sdc1(0)
  [mirror_mimage_1] taft Iwi-ao 200.00G                     /dev/sdd1(0)
  [mirror_mlog]     taft lwl-ao   4.00M                     /dev/sdh1(0)


### Case 2. Mirror created w/ --alloc flag and *not* enough PVs with tags for the extension to work
[root@taft-01 ~]# 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 C
  /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 C
  /dev/sdh1  taft lvm2 a-   135.66G 135.66G C

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

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwl-a- 100.00G mirror_mlog 100.00  mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] taft iwi-ao 100.00G                     /dev/sdb1(0)
  [mirror_mimage_1] taft iwi-ao 100.00G                     /dev/sdc1(0)
  [mirror_mlog]     taft lwl-ao   4.00M                     /dev/sdh1(0)

[root@taft-01 ~]# lvextend --alloc cling -L +100G taft/mirror
  Extending 2 mirror images.
  Extending logical volume mirror to 200.00 GB
  Insufficient suitable allocatable extents for logical volume mirror: 32940 more required

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwl-a- 100.00G mirror_mlog 100.00  mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] taft iwi-ao 100.00G                     /dev/sdb1(0)
  [mirror_mimage_1] taft iwi-ao 100.00G                     /dev/sdc1(0)
  [mirror_mlog]     taft lwl-ao   4.00M                     /dev/sdh1(0)

[root@taft-01 ~]# lvextend --alloc cling_by_tags -L +100G taft/mirror
  Extending 2 mirror images.
  Extending logical volume mirror to 200.00 GB
  Insufficient suitable allocatable extents for logical volume mirror: 32940 more required

[root@taft-01 ~]# lvextend  -L +100G taft/mirror
  Extending 2 mirror images.
  Extending logical volume mirror to 200.00 GB
  Insufficient suitable allocatable extents for logical volume mirror: 32940 more required


### Case 3. Mirror created w/o --alloc flag and *not* enough PVs with tags for the extension to work
[root@taft-01 ~]# 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 C
  /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 C
  /dev/sdh1  taft lvm2 a-   135.66G 135.66G C

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

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwi-a- 100.00G mirror_mlog 100.00  mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] taft iwi-ao 100.00G                     /dev/sdb1(0)
  [mirror_mimage_1] taft iwi-ao 100.00G                     /dev/sdc1(0)
  [mirror_mlog]     taft lwi-ao   4.00M                     /dev/sdh1(0)

[root@taft-01 ~]# lvextend  -L +100G --alloc cling taft/mirror
  Extending 2 mirror images.
  Extending logical volume mirror to 200.00 GB
  Insufficient suitable allocatable extents for logical volume mirror: 32940 more required

[root@taft-01 ~]# lvextend  -L +100G --alloc cling_by_tags taft/mirror
  Extending 2 mirror images.
  Extending logical volume mirror to 200.00 GB
  Insufficient suitable allocatable extents for logical volume mirror: 32940 more required

[root@taft-01 ~]# lvextend  -L +100G taft/mirror
  Extending 2 mirror images.
  Extending logical volume mirror to 200.00 GB
  Logical volume mirror successfully resized

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwi-a- 200.00G mirror_mlog  50.15  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/sdd1(0)
  [mirror_mimage_1] taft Iwi-ao 200.00G                     /dev/sdc1(0)
  [mirror_mimage_1] taft Iwi-ao 200.00G                     /dev/sde1(0)
  [mirror_mlog]     taft lwi-ao   4.00M                     /dev/sdh1(0)


### Case 4. Mirror created w/ --alloc flag and enough PVs with tags for the extension to work
[root@taft-01 ~]# 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-01 ~]# lvcreate --alloc cling -n mirror -L 100G --nosync -m 1 taft
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  Logical volume "mirror" created

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwl-a- 100.00G mirror_mlog 100.00  mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] taft iwi-ao 100.00G                     /dev/sdb1(0)
  [mirror_mimage_1] taft iwi-ao 100.00G                     /dev/sdc1(0)
  [mirror_mlog]     taft lwl-ao   4.00M                     /dev/sdh1(0)

[root@taft-01 ~]# lvextend  -L +100G --alloc cling taft/mirror
  Extending 2 mirror images.
  Extending logical volume mirror to 200.00 GB
  Logical volume mirror successfully resized

[root@taft-01 ~]# lvextend  -L +100G --alloc cling_by_tags taft/mirror
  Extending 2 mirror images.
  Extending logical volume mirror to 300.00 GB
  Insufficient suitable allocatable extents for logical volume mirror: 14680 more required

[root@taft-01 ~]#  lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwl-a- 200.00G mirror_mlog  51.04  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/sdg1(0)
  [mirror_mimage_1] taft Iwi-ao 200.00G                     /dev/sdc1(0)
  [mirror_mimage_1] taft Iwi-ao 200.00G                     /dev/sdd1(0)
  [mirror_mlog]     taft lwl-ao   4.00M                     /dev/sdh1(0)


### Case 5. Mirror created w/o --alloc flag and enough PVs with tags for the extension to work
[root@taft-01 ~]# 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-01 ~]# lvcreate -m 1 -n mirror --nosync -L 100G taft
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  Logical volume "mirror" created

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwi-a- 100.00G mirror_mlog 100.00  mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] taft iwi-ao 100.00G                     /dev/sdb1(0)
  [mirror_mimage_1] taft iwi-ao 100.00G                     /dev/sdc1(0)
  [mirror_mlog]     taft lwi-ao   4.00M                     /dev/sdh1(0)

[root@taft-01 ~]# lvextend --alloc cling -L +100G taft/mirror
  Extending 2 mirror images.
  Extending logical volume mirror to 200.00 GB
  Logical volume mirror successfully resized

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwi-a- 200.00G mirror_mlog  50.20  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/sdg1(0)
  [mirror_mimage_1] taft Iwi-ao 200.00G                     /dev/sdc1(0)
  [mirror_mimage_1] taft Iwi-ao 200.00G                     /dev/sdd1(0)
  [mirror_mlog]     taft lwi-ao   4.00M                     /dev/sdh1(0)


### Case 6. Simple creation w/ --alloc flag and enough PVs with tags for the creation to work
[root@taft-01 ~]# 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 C
  /dev/sde1  taft lvm2 a-   135.66G 135.66G B
  /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-01 ~]# lvcreate -m 1 --alloc cling -L 200G --nosync -n mirror taft
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  Logical volume "mirror" created

# Note that the PV tags were ignored
[root@taft-01 ~]# 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)


### Case 7. Simple creation w/ --alloc flag and enough PVs with tags for the creation to work
[root@taft-01 ~]# 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 C
  /dev/sde1  taft lvm2 a-   135.66G 135.66G B
  /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-01 ~]# lvcreate -m 1 --alloc cling_by_tags -L 200G --nosync -n mirror taft
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  Logical volume "mirror" created

# Note that the PV tags were ignored
[root@taft-01 ~]# 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)


### Cases 8-9 were done with *no* cling tag list in lvm.conf:

### Case 8. Mirror created w/o --alloc flag and enough PVs with tags for the extension to work
[root@taft-01 ~]# pvs -a -o +pv_tags /dev/sd[bcdefgh]1
  PV         VG   Fmt  Attr PSize   PFree   PV Tags
  /dev/sdb1  taft lvm2 a-   135.66G      0  A
  /dev/sdc1  taft lvm2 a-   135.66G      0  B
  /dev/sdd1  taft lvm2 a-   135.66G  71.33G B
  /dev/sde1  taft lvm2 a-   135.66G  71.33G 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-01 ~]# lvcreate -m 1 -n mirror --nosync -L 100G taft
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  Logical volume "mirror" created

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwi-a- 100.00G mirror_mlog 100.00  mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] taft iwi-ao 100.00G                     /dev/sdb1(0)
  [mirror_mimage_1] taft iwi-ao 100.00G                     /dev/sdc1(0)
  [mirror_mlog]     taft lwi-ao   4.00M                     /dev/sdh1(0)

# Should this have worked without matching tagged legs?
[root@taft-01 ~]# lvextend --alloc cling_by_tags -L +100G taft/mirror
  Extending 2 mirror images.
  Extending logical volume mirror to 200.00 GB
  Logical volume mirror successfully resized

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwi-a- 200.00G mirror_mlog  50.10  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/sdd1(0)
  [mirror_mimage_1] taft Iwi-ao 200.00G                     /dev/sdc1(0)
  [mirror_mimage_1] taft Iwi-ao 200.00G                     /dev/sde1(0)
  [mirror_mlog]     taft lwi-ao   4.00M                     /dev/sdh1(0)


### Case 9. Mirror created w/ --alloc flag and enough PVs with tags for the extension to work
[root@taft-01 ~]# lvcreate -m 1 -n mirror --alloc cling --nosync -L 100G taft
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  Logical volume "mirror" created

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwl-a- 100.00G mirror_mlog 100.00  mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] taft iwi-ao 100.00G                     /dev/sdb1(0)
  [mirror_mimage_1] taft iwi-ao 100.00G                     /dev/sdc1(0)
  [mirror_mlog]     taft lwl-ao   4.00M                     /dev/sdh1(0)

[root@taft-01 ~]# pvs -a -o +pv_tags /dev/sd[bcdefgh]1
  PV         VG   Fmt  Attr PSize   PFree   PV Tags
  /dev/sdb1  taft lvm2 a-   135.66G  35.66G A
  /dev/sdc1  taft lvm2 a-   135.66G  35.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

# Should this have worked?
[root@taft-01 ~]# lvextend --alloc cling -L +100G taft/mirror
  Extending 2 mirror images.
  Extending logical volume mirror to 200.00 GB
  Logical volume mirror successfully resized

[root@taft-01 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize   Log         Copy%   Devices
  mirror            taft Mwl-a- 200.00G mirror_mlog  50.11  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/sdd1(0)
  [mirror_mimage_1] taft Iwi-ao 200.00G                     /dev/sdc1(0)
  [mirror_mimage_1] taft Iwi-ao 200.00G                     /dev/sde1(0)
  [mirror_mlog]     taft lwl-ao   4.00M                     /dev/sdh1(0)
Comment 34 Corey Marthaler 2011-05-12 16:34:40 EDT
Marking verified for 5.7 even though this feature is not yet complete.
Comment 35 Florian Nadge 2011-05-26 10:55:03 EDT
Hi,
am assigned to edit the errata that describes this bugzilla entry and need you
to briefly state the cause, consequence, fix, result for this bug.

If possible, use the Technical Notes field at the top of of this bugzilla
entry. Try to use the already copied Cause, Consequence, Fix, Result, Structure. Just skip what you think unnecessary.

Many thanks,

Florian
Comment 36 Florian Nadge 2011-05-26 10:55:03 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:
This field is the basis of the errata or release note for this bug. It can also be used for change logs.

The Technical Note template, known as CCFR, is as follows:

Cause
    What actions or circumstances cause this bug to present.
Consequence
    What happens when the bug presents.
Fix
    What was done to fix the bug.
Result
    What now happens when the actions or circumstances above occur.
    Note: this is not the same as the bug doesn’t present anymore.
Comment 37 errata-xmlrpc 2011-07-21 06:51:00 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-1071.html
Comment 38 errata-xmlrpc 2011-07-21 08:28:38 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-1071.html

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