Bug 732462 - RFE: LVM RAID - Support RAID1 down-convert
RFE: LVM RAID - Support RAID1 down-convert
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.2
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Jonathan Earl Brassow
Corey Marthaler
: FutureFeature
Depends On:
Blocks: 732458 749672 756082
  Show dependency treegraph
 
Reported: 2011-08-22 10:35 EDT by Jonathan Earl Brassow
Modified: 2012-08-27 10:54 EDT (History)
10 users (show)

See Also:
Fixed In Version: lvm2-2.02.95-1.el6
Doc Type: Enhancement
Doc Text:
New Feature to 6.3. No documentation required. Bug 732458 is the bug that requires a release note for the RAID features. Other documentation is found in the LVM manual. Operational bugs need no documentation because they are being fixed before their initial release.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 10:52:09 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 Jonathan Earl Brassow 2011-08-22 10:35:26 EDT
Support ability to down-convert RAID1 logical volumes, including:
1) n-way -> m-way
1) n-way -> linear
Comment 1 Jonathan Earl Brassow 2011-08-22 10:41:34 EDT
Release criteria (test requirements):

Ensure that the number of images can be reduced and that both the metadata and data sub-lvs (e.g. *_rimage_*, *_rmeta_*) are removed together with no residual device-mapper devices.

If the LV is down-converted to a linear LV, then all the metadata sub-lvs should have been removed.  There also should be no *_rimage_* sub-lvs either, since the final remaining raid1 image should be the top-level linear LV.
Comment 2 Jonathan Earl Brassow 2011-08-22 10:59:20 EDT
Further requirements:

The format of the command (while not given above) is the same as that for the
"mirror" segment type:
~> lvconvert -m <new_absolute_count> vg/lv [removable_PVs]
~> lvconvert -m -<num_fewer_images> vg/lv [removable_PVs]

The user should be able to specify which devices will be removed from the RAID array.  This should be validated.

Additionally, when an image (and it's metadata LV) are removed, any higher numbered images will be "shifted down" to fill the slot.  That is, a 3-way RAID1 array with lv_rimage_[012] sub_lvs that has lv_rimage_1 removed should result in lv_rimage_[01] as the final sub-lvs.  lv_rimage_2 will be renamed and take over the empty slot, becoming lv_rimage_1.
Comment 3 Corey Marthaler 2011-08-31 14:43:17 EDT
Adding QA ack for 6.3.

Devel will need to provide unit testing results however before this bug can be
ultimately verified by QA.
Comment 5 Jonathan Earl Brassow 2011-11-30 00:23:13 EST
changes upstream in version 2.02.89
Comment 6 Jonathan Earl Brassow 2012-01-12 12:42:01 EST
Bug is covered by LVM testsuite (lvconvert-raid.sh).

CLI demonstration:
[root@bp-01 ~]# devices vg
  LV            Copy%  Devices                                     
  lv            100.00 lv_rimage_0(0),lv_rimage_1(0),lv_rimage_2(0)
  [lv_rimage_0]        /dev/sde1(1)                                
  [lv_rimage_1]        /dev/sdf1(1)                                
  [lv_rimage_2]        /dev/sdg1(1)                                
  [lv_rmeta_0]         /dev/sde1(0)                                
  [lv_rmeta_1]         /dev/sdf1(0)                                
  [lv_rmeta_2]         /dev/sdg1(0)                                
[root@bp-01 ~]# lvconvert -m1 vg/lv
[root@bp-01 ~]# devices vg
  LV            Copy%  Devices                      
  lv            100.00 lv_rimage_0(0),lv_rimage_1(0)
  [lv_rimage_0]        /dev/sde1(1)                 
  [lv_rimage_1]        /dev/sdf1(1)                 
  [lv_rmeta_0]         /dev/sde1(0)                 
  [lv_rmeta_1]         /dev/sdf1(0)                 
[root@bp-01 ~]# lvconvert -m0 vg/lv
[root@bp-01 ~]# devices vg
  LV   Copy%  Devices     
  lv          /dev/sde1(1)
[root@bp-01 ~]# dmsetup ls | grep vg-
vg-lv   (253, 9)
Comment 7 Steven J. Levine 2012-02-10 13:54:18 EST
In comment 6, I don't see an example that specifies which devices are to be removed (the removable_PVs option). Is there an example of this?
Comment 8 Jonathan Earl Brassow 2012-02-10 17:32:45 EST
Steve,

The example in comment #6 could have been:

#> lvconvert -m 1 vg/lv /dev/sdg1

IOW, (as eluded to in comment 2) if you want specific devices removed, you can specify them at the end of the command.
Comment 12 Corey Marthaler 2012-04-16 12:18:19 EDT
The basic raid1 downconvert cases work. Marking this feature verified in the
latest rpms.

2.6.32-251.el6.x86_64

lvm2-2.02.95-4.el6    BUILT: Wed Apr 11 09:03:19 CDT 2012
lvm2-libs-2.02.95-4.el6    BUILT: Wed Apr 11 09:03:19 CDT 2012
lvm2-cluster-2.02.95-4.el6    BUILT: Wed Apr 11 09:03:19 CDT 2012
udev-147-2.40.el6    BUILT: Fri Sep 23 07:51:13 CDT 2011
device-mapper-1.02.74-4.el6    BUILT: Wed Apr 11 09:03:19 CDT 2012
device-mapper-libs-1.02.74-4.el6    BUILT: Wed Apr 11 09:03:19 CDT 2012
device-mapper-event-1.02.74-4.el6    BUILT: Wed Apr 11 09:03:19 CDT 2012
device-mapper-event-libs-1.02.74-4.el6    BUILT: Wed Apr 11 09:03:19 CDT 2012
cmirror-2.02.95-4.el6    BUILT: Wed Apr 11 09:03:19 CDT 2012
Comment 13 Jonathan Earl Brassow 2012-04-23 14:18:53 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:
New Feature to 6.3.  No documentation required.

Bug 732458 is the bug that requires a release note for the RAID features.  Other documentation is found in the LVM manual.

Operational bugs need no documentation because they are being fixed before their initial release.
Comment 15 errata-xmlrpc 2012-06-20 10:52:09 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0962.html

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