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 729712 - RFE: LVM RAID support
Summary: RFE: LVM RAID support
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jonathan Earl Brassow
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On:
Blocks: 729715 743047
TreeView+ depends on / blocked
 
Reported: 2011-08-10 15:29 UTC by Jonathan Earl Brassow
Modified: 2011-12-06 16:59 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.02.87-1.el6
Doc Type: Technology Preview
Doc Text:
Support for MD's RAID personalities has been added to LVM. Currently, on the most basic features are available. It is possible to create, display, rename, use, and remove RAID logical volumes. Automated fault tolerance is not yet available. It is possible to create RAID logical volumes by specifying the '--type <segtype>' argument. Here are a few examples: # Create a RAID1 array (this is a different implementation of RAID1 than LVM's "mirror" segment type) ~> lvcreate --type raid1 -m 1 -L 1G -n my_lv my_vg # Create a RAID5 array (3 stripes + 1 implicit parity) ~> lvcreate --type raid5 -i 3 -L 1G -n my_lv my_vg # Create a RAID6 array (3 stripes + 2 implicit parity) ~> lvcreate --type raid6 -i 3 -L 1G -n my_lv my_vg
Clone Of:
: 729715 (view as bug list)
Environment:
Last Closed: 2011-12-06 16:59:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
My basic LVM RAID testing script (4.75 KB, text/plain)
2011-08-10 16:30 UTC, Jonathan Earl Brassow
no flags Details
Patch to add "Tech Preview" warning when creating RAID logical volumes (1.20 KB, patch)
2011-08-11 20:04 UTC, Jonathan Earl Brassow
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1522 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2011-12-06 00:50:10 UTC

Description Jonathan Earl Brassow 2011-08-10 15:29:15 UTC
Support MD RAID personalities (RAID 1/4/5/6) in LVM.

This bug functions as the user-space side of bug 723010.

Comment 1 Jonathan Earl Brassow 2011-08-10 15:30:26 UTC
Tech Preview for RHEL6.2.

Comment 2 Jonathan Earl Brassow 2011-08-10 16:13:38 UTC
For tech preview in RHEL6.2, the following basic support should be tested:
1) Create
The new RAID types do not have a short-hand switch (e.g. '-m' for mirroring, '-s' for snapshot, etc).  You must specify the segment type you want explicitly using the '--type' argument.  Here are some examples:

Create a 2-way RAID1 array:
  #> lvcreate --type raid1 -m 1 -L 100M -n lv vg
The '-m' argument works exactly like it would for the 'mirror' segment type - it specifies the number of additional copies to the original.  If you change lvm.conf:activation/mirror_segtype_default to "raid1", then the '-m' argument will default to "raid1" type instead of "mirror" type.  This would allow the user to create a 2-way RAID1 array as follows:
  #> lvcreate -m 1 -L 100M -n lv vg

Create a 3-way stripe + 1 parity RAID4 array:
  # lvcreate --type raid4 -i 3 -L 100M -n lv vg
Note that you specify the number of stripes similar to how RAID0 (striping) works already - the correct number of parity drives are added automatically.

Create a 3-way stripe + 1 parity RAID5 array:
  # lvcreate --type raid5 -i 3 -L 100M -n lv vg

Create a 3-way stripe + 2 parity RAID6 array:
  # lvcreate --type raid6 -i 3 -L 100M -n lv vg

You should be able to create RAID1 arrays with different numbers of copies (i.e. adjust the '-m' argument).

You should be able to adjust the number of stripes ('-i' argument) for RAID 4/5/6 as well as the stripe_size ('-I' argument).

There will be a metadata device that is one extent in size for every data or parity device in the array.  Creating a 2-way RAID1 array should result in two metadata devices (lv_rmeta_[01]) and two data devices (lv_rimage_[01]).  Similarly, creating a 3-way stripe (plus 1 implicit parity dev) RAID4 should result in 4 metadata devices (lv_rmeta_[0123]) and 4 data devices (lv_rimage_[0123]).

2) [de]activate
Can you [lv|vg]change -an/-ay the volumes?

3) Remove
The arrays must remove cleanly with no residual LVM devices and no residual DM devices.

4) Display
'lvs' and other display commands should correctly report the name, size, and attributes of the LV and the sub-LVs.  RAID1 arrays should also show the %'age in-sync, similar to current mirrors.

5) Usage
Ensure the devices are usable.  Can you put a file system on it?  Is there any data corruption?  Can you deactivate and reactivate an LV and have the contents be preserved.

Comment 3 Jonathan Earl Brassow 2011-08-10 16:30:22 UTC
Created attachment 517654 [details]
My basic LVM RAID testing script

Be careful - hardcoded values exist in this script.

Comment 4 Jonathan Earl Brassow 2011-08-10 16:35:10 UTC
Output from my unit testing:
[root@bp-01 ~]# ./raid_test_lvm.sh 
Do basic tests? (y/n) y
Performing basic tests
        lvcreate --type raid1 -m 3  -L 100M -n lv vg
        lvcreate --type raid4  -i 4 -L 100M -n lv vg
        lvcreate --type raid5  -i 4 -L 100M -n lv vg
        lvcreate --type raid5_ls  -i 4 -L 100M -n lv vg
        lvcreate --type raid5_la  -i 4 -L 100M -n lv vg
        lvcreate --type raid5_rs  -i 4 -L 100M -n lv vg
        lvcreate --type raid5_ra  -i 4 -L 100M -n lv vg
        lvcreate --type raid6  -i 4 -L 100M -n lv vg
        lvcreate --type raid6_zr  -i 4 -L 100M -n lv vg
        lvcreate --type raid6_nr  -i 4 -L 100M -n lv vg
        lvcreate --type raid6_nc  -i 4 -L 100M -n lv vg
Attempting to create devices with protected names
###  You don't need to test beyond this point at this stage...

Comment 5 Corey Marthaler 2011-08-10 16:42:01 UTC
Adding QA ack for 6.2 Tech Preview testing.

Comment 6 Jonathan Earl Brassow 2011-08-11 03:31:30 UTC
Might want to also test renaming RAID LVs - just fixed a bug there as well.

Comment 7 Siddharth Nagar 2011-08-11 18:13:59 UTC
Jonathan, can you please provide a short summary of this new functionality for including in our technical notes?

Comment 9 Jonathan Earl Brassow 2011-08-11 20:04:04 UTC
Created attachment 517886 [details]
Patch to add "Tech Preview" warning when creating RAID logical volumes

Comment 11 Jonathan Earl Brassow 2011-08-11 20:22:52 UTC
    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:
Support for MD's RAID personalities has been added to LVM.  Currently, on the most basic features are available.  It is possible to create, display, rename, use, and remove RAID logical volumes.  Automated fault tolerance is not yet available.

It is possible to create RAID logical volumes by specifying the '--type <segtype>' argument.  Here are a few examples:

# Create a RAID1 array (this is a different implementation of RAID1 than LVM's "mirror" segment type)
~> lvcreate --type raid1 -m 1 -L 1G -n my_lv my_vg

# Create a RAID5 array (3 stripes + 1 implicit parity)
~> lvcreate --type raid5 -i 3 -L 1G -n my_lv my_vg

# Create a RAID6 array (3 stripes + 2 implicit parity)
~> lvcreate --type raid6 -i 3 -L 1G -n my_lv my_vg

Comment 13 Corey Marthaler 2011-08-18 15:23:42 UTC
Just a note that testing is currently blocked until the dm_raid target shows up in an official kernel build.

[root@taft-01 ~]#  lvcreate --type raid5 -i 3 -L 100M -n lv taft
FATAL: Module dm_raid not found.
  /sbin/modprobe failed: 1
  raid5: Required device-mapper target(s) not detected in your kernel
  Run `lvcreate --help' for more information.



2.6.32-188.el6.x86_64

lvm2-2.02.87-1.el6    BUILT: Fri Aug 12 06:11:57 CDT 2011
lvm2-libs-2.02.87-1.el6    BUILT: Fri Aug 12 06:11:57 CDT 2011
lvm2-cluster-2.02.87-1.el6    BUILT: Fri Aug 12 06:11:57 CDT 2011
udev-147-2.37.el6    BUILT: Wed Aug 10 07:48:15 CDT 2011
device-mapper-1.02.66-1.el6    BUILT: Fri Aug 12 06:11:57 CDT 2011
device-mapper-libs-1.02.66-1.el6    BUILT: Fri Aug 12 06:11:57 CDT 2011
device-mapper-event-1.02.66-1.el6    BUILT: Fri Aug 12 06:11:57 CDT 2011
device-mapper-event-libs-1.02.66-1.el6    BUILT: Fri Aug 12 06:11:57 CDT 2011
cmirror-2.02.87-1.el6    BUILT: Fri Aug 12 06:11:57 CDT 2011

Comment 14 Corey Marthaler 2011-09-01 15:05:10 UTC
This feature appears to be in the latest kernel, however, attempting the first case listed in comment #4 caused major issues (bug 735124).

Comment 15 Corey Marthaler 2011-09-01 16:10:25 UTC
It appears to be just the raid1 create attempt that causes problems. The other cases in comment #4 appear to work.

Comment 16 Corey Marthaler 2011-09-01 21:40:19 UTC
No change in bahavior with the scratch kernel (2.6.32-193.el6.bz735124.x86_64), this bug still exists.

Comment 18 Corey Marthaler 2011-09-15 16:44:51 UTC
The bug associated with the first test case in comment #4 (bug 735124) stills exists in the latest kernel/scratch rpms.


2.6.32-195.el6.x86_64

lvm2-2.02.87-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
lvm2-libs-2.02.87-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
lvm2-cluster-2.02.87-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
udev-147-2.38.el6    BUILT: Fri Sep  9 16:25:50 CDT 2011
device-mapper-1.02.66-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
device-mapper-libs-1.02.66-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
device-mapper-event-1.02.66-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
device-mapper-event-libs-1.02.66-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
cmirror-2.02.87-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011

Comment 19 Corey Marthaler 2011-09-16 20:49:15 UTC
All the test cases in comment #4 now pass with the latest kernel and scratch built rpms.

2.6.32-198.el6.x86_64

lvm2-2.02.87-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
lvm2-libs-2.02.87-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
lvm2-cluster-2.02.87-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
udev-147-2.38.el6    BUILT: Fri Sep  9 16:25:50 CDT 2011
device-mapper-1.02.66-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
device-mapper-libs-1.02.66-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
device-mapper-event-1.02.66-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
device-mapper-event-libs-1.02.66-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011
cmirror-2.02.87-2.1.el6    BUILT: Wed Sep 14 09:44:16 CDT 2011



[root@taft-01 ~]# lvcreate --type raid1 -m 3  -L 100M -n lv vg
  WARNING:  RAID segment types are considered Tech Preview
  For more information on Tech Preview features, visit:
  https://access.redhat.com/support/offerings/techpreview/
  Logical volume "lv" created
[root@taft-01 ~]# lvremove -f vg
  Logical volume "lv" successfully removed

[root@taft-01 ~]# lvcreate --type raid4  -i 4 -L 100M -n lv vg
  Using default stripesize 64.00 KiB
  WARNING:  RAID segment types are considered Tech Preview
  For more information on Tech Preview features, visit:
  https://access.redhat.com/support/offerings/techpreview/
  Rounding size (25 extents) up to stripe boundary size (28 extents)
  Logical volume "lv" created
[root@taft-01 ~]# lvremove -f vg
  Logical volume "lv" successfully removed

[root@taft-01 ~]# lvcreate --type raid5  -i 4 -L 100M -n lv vg
  Using default stripesize 64.00 KiB
  WARNING:  RAID segment types are considered Tech Preview
  For more information on Tech Preview features, visit:
  https://access.redhat.com/support/offerings/techpreview/
  Rounding size (25 extents) up to stripe boundary size (28 extents)
  Logical volume "lv" created
[root@taft-01 ~]# lvremove -f vg
  Logical volume "lv" successfully removed

[root@taft-01 ~]# lvcreate --type raid5_ls  -i 4 -L 100M -n lv vg
  Using default stripesize 64.00 KiB
  WARNING:  RAID segment types are considered Tech Preview
  For more information on Tech Preview features, visit:
  https://access.redhat.com/support/offerings/techpreview/
  Rounding size (25 extents) up to stripe boundary size (28 extents)
  Logical volume "lv" created
[root@taft-01 ~]# lvremove -f vg
  Logical volume "lv" successfully removed

[root@taft-01 ~]# lvcreate --type raid5_la  -i 4 -L 100M -n lv vg
  Using default stripesize 64.00 KiB
  WARNING:  RAID segment types are considered Tech Preview
  For more information on Tech Preview features, visit:
  https://access.redhat.com/support/offerings/techpreview/
  Rounding size (25 extents) up to stripe boundary size (28 extents)
  Logical volume "lv" created
[root@taft-01 ~]# lvremove -f vg
  Logical volume "lv" successfully removed

[root@taft-01 ~]# lvcreate --type raid5_rs  -i 4 -L 100M -n lv vg
  Using default stripesize 64.00 KiB
  WARNING:  RAID segment types are considered Tech Preview
  For more information on Tech Preview features, visit:
  https://access.redhat.com/support/offerings/techpreview/
  Rounding size (25 extents) up to stripe boundary size (28 extents)
  Logical volume "lv" created
[root@taft-01 ~]# lvremove -f vg
  Logical volume "lv" successfully removed

[root@taft-01 ~]# lvcreate --type raid5_ra  -i 4 -L 100M -n lv vg
  Using default stripesize 64.00 KiB
  WARNING:  RAID segment types are considered Tech Preview
  For more information on Tech Preview features, visit:
  https://access.redhat.com/support/offerings/techpreview/
  Rounding size (25 extents) up to stripe boundary size (28 extents)
  Logical volume "lv" created
[root@taft-01 ~]# lvremove -f vg
  Logical volume "lv" successfully removed

[root@taft-01 ~]# lvcreate --type raid6  -i 4 -L 100M -n lv vg
  Using default stripesize 64.00 KiB
  WARNING:  RAID segment types are considered Tech Preview
  For more information on Tech Preview features, visit:
  https://access.redhat.com/support/offerings/techpreview/
  Rounding size (25 extents) up to stripe boundary size (28 extents)
  Logical volume "lv" created
[root@taft-01 ~]# lvremove -f vg
  Logical volume "lv" successfully removed

[root@taft-01 ~]# lvcreate --type raid6_zr  -i 4 -L 100M -n lv vg
  Using default stripesize 64.00 KiB
  WARNING:  RAID segment types are considered Tech Preview
  For more information on Tech Preview features, visit:
  https://access.redhat.com/support/offerings/techpreview/
  Rounding size (25 extents) up to stripe boundary size (28 extents)
  Logical volume "lv" created
[root@taft-01 ~]# lvremove -f vg
  Logical volume "lv" successfully removed

[root@taft-01 ~]# lvcreate --type raid6_nr  -i 4 -L 100M -n lv vg
  Using default stripesize 64.00 KiB
  WARNING:  RAID segment types are considered Tech Preview
  For more information on Tech Preview features, visit:
  https://access.redhat.com/support/offerings/techpreview/
  Rounding size (25 extents) up to stripe boundary size (28 extents)
  Logical volume "lv" created
[root@taft-01 ~]# lvremove -f vg
  Logical volume "lv" successfully removed

[root@taft-01 ~]# lvcreate --type raid6_nc  -i 4 -L 100M -n lv vg
  Using default stripesize 64.00 KiB
  WARNING:  RAID segment types are considered Tech Preview
  For more information on Tech Preview features, visit:
  https://access.redhat.com/support/offerings/techpreview/
  Rounding size (25 extents) up to stripe boundary size (28 extents)
  Logical volume "lv" created
[root@taft-01 ~]# lvremove -f vg
  Logical volume "lv" successfully removed

Comment 22 Corey Marthaler 2011-09-22 15:21:50 UTC
All the create test cases continue to work in the official build. Marking verified. Note: Only create cases were attempted for this feature, no conversion or failure cases were, since they are not supported.

2.6.32-198.el6.x86_64

lvm2-2.02.87-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
lvm2-libs-2.02.87-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
lvm2-cluster-2.02.87-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
udev-147-2.38.el6    BUILT: Fri Sep  9 16:25:50 CDT 2011
device-mapper-1.02.66-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
device-mapper-libs-1.02.66-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
device-mapper-event-1.02.66-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
device-mapper-event-libs-1.02.66-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
cmirror-2.02.87-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011

Comment 23 errata-xmlrpc 2011-12-06 16:59:38 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.

http://rhn.redhat.com/errata/RHBA-2011-1522.html


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