Bug 1191978 - LVM RAID - Add support to add/remove devices to/from existing raid sets
Summary: LVM RAID - Add support to add/remove devices to/from existing raid sets
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Heinz Mauelshagen
QA Contact: cluster-qe@redhat.com
Steven J. Levine
URL:
Whiteboard:
Depends On:
Blocks: 1189124 1346081 1385242 1394039 1411727 1465623
TreeView+ depends on / blocked
 
Reported: 2015-02-12 10:30 UTC by Heinz Mauelshagen
Modified: 2021-09-03 12:38 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.02.169-1.el7
Doc Type: Release Note
Doc Text:
Support for adding and removing devices from existing RAID logical volumes You can now use the `lvconvert` command to add or remove devices from existing RAID logical volumes. When you add or remove a device from a RAID volume, the size of the RAID volume changes, since the capacity of a RAID logical volume is always the number of data stripes times the data image size. When removing images from a RAID volume, the "--force" option is mandatory because shrinking a volume comes with the inherent danger of data loss.
Clone Of:
: 1465623 (view as bug list)
Environment:
Last Closed: 2017-08-01 21:47:18 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2222 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2017-08-01 18:42:41 UTC

Description Heinz Mauelshagen 2015-02-12 10:30:38 UTC
Description of problem:
lvm2 tools don't support conversions to add/remove devices
to/from existing raid sets, e.g.:
'raid5' with 3 devices -> 'raid5' with 5 devices (i.e. from 2 stripes to 4 stripes)

In addition, restriping conversions from 'striped' with 2 stripes <-> 'raid4/5/6' with 4 stripes and back to 'striped' with now 4 stripes shall be supported.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. "lvconvert -i 4 $LV" on a 'striped' $LV

Actual results:
Error

Expected results:
Success

Additional info:
Changing the number of stripes on a 'striped' logical volume is not possible directly without the risk of data loss. It needs to be converted to at least 'raid4' or 'raid5' ('raid6' optionally) in order to take advantage of the resilient functionality in md raid and convert back to 'striped' after the addition of devices has finished reshaping. On the step from 'striped', a suitable number of raid image/metadata internal logical volume pairs have to be allocated for the additional stripes _and_ for the raid parity (plus for the q syndrome in case raid6 is being used to do the conversion).
The same shall be possible for 'raid0' once supported (see respective bzs)

Comment 2 Heinz Mauelshagen 2016-07-06 14:16:28 UTC
Code's done and being reviewed/integrated.

Comment 5 Heinz Mauelshagen 2017-03-08 13:07:09 UTC
Upstream commits e2354ea344c2 to 34caf8317243

Comment 7 Steven J. Levine 2017-05-23 15:09:19 UTC
Heinz:

For the release notes for 7.4, is it enough to say that you can now use the lvconvert command to add or remove devices from existing RAID logical volumes? Is there anything else a user needs to know here?

Comment 8 Heinz Mauelshagen 2017-05-26 14:00:57 UTC
Steven,

it's worth mentioning that the size of a RaidLV changes doing so.

I.e. the capacity always is 'N data stripes * image size' (lvconvert prompts and tells the user as much _before_ it converts adding/removing devices unless --yes is provided).

In case of image removal, --force is mandatory because shrinking comes with the inherent danger of data loss (user gets information of size before/after disk removal and he can lvextend before removing images unless he provided --force _and_ --yes when the conversion is carried out without prompting).

Comment 9 Steven J. Levine 2017-06-19 19:29:20 UTC
Heinz:

Could you review the release note description in the doc text?  I didn't mention the prompts this command produces and how to avoid them, for the purposes of a release note summary.

Steven

Comment 10 Heinz Mauelshagen 2017-06-19 21:37:18 UTC
(In reply to Steven J. Levine from comment #9)
> Heinz:
> 
> Could you review the release note description in the doc text?  I didn't
> mention the prompts this command produces and how to avoid them, for the
> purposes of a release note summary.
> 
> Steven

Good as a release note. Not mentioning prompting is fine because we have -y/--yes globally described in the lvm man page.

Comment 12 errata-xmlrpc 2017-08-01 21:47:18 UTC
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.

https://access.redhat.com/errata/RHBA-2017:2222


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