This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 729712 - RFE: LVM RAID support
RFE: LVM RAID support
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jonathan Earl Brassow
Corey Marthaler
: FutureFeature, TechPreview
Depends On:
Blocks: 729715 743047
  Show dependency treegraph
 
Reported: 2011-08-10 11:29 EDT by Jonathan Earl Brassow
Modified: 2011-12-06 11:59 EST (History)
10 users (show)

See Also:
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
Story Points: ---
Clone Of:
: 729715 (view as bug list)
Environment:
Last Closed: 2011-12-06 11:59:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Jonathan Earl Brassow 2011-08-10 11:29:15 EDT
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 11:30:26 EDT
Tech Preview for RHEL6.2.
Comment 2 Jonathan Earl Brassow 2011-08-10 12:13:38 EDT
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 12:30:22 EDT
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 12:35:10 EDT
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 12:42:01 EDT
Adding QA ack for 6.2 Tech Preview testing.
Comment 6 Jonathan Earl Brassow 2011-08-10 23:31:30 EDT
Might want to also test renaming RAID LVs - just fixed a bug there as well.
Comment 7 Siddharth Nagar 2011-08-11 14:13:59 EDT
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 16:04:04 EDT
Created attachment 517886 [details]
Patch to add "Tech Preview" warning when creating RAID logical volumes
Comment 11 Jonathan Earl Brassow 2011-08-11 16:22:52 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:
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 11:23:42 EDT
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 11:05:10 EDT
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 12:10:25 EDT
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 17:40:19 EDT
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 12:44:51 EDT
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 16:49:15 EDT
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 11:21:50 EDT
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 11:59:38 EST
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.