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 1439403 - RAID TAKEOVER: When attempting to convert to raid10, is raid6_n_6 sufficient?
Summary: RAID TAKEOVER: When attempting to convert to raid10, is raid6_n_6 sufficient?
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Heinz Mauelshagen
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-05 23:02 UTC by Corey Marthaler
Modified: 2021-09-03 12:38 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.02.171-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 21:52:19 UTC
Target Upstream Version:
Embargoed:


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 Corey Marthaler 2017-04-05 23:02:00 UTC
Description of problem:
Feel free to close this if this is the expected behavior.

[root@harding-03 ~]# lvcreate  --type raid4 -i 3 -n LV -L 500M VG
  Using default stripesize 64.00 KiB.
  Rounding size 500.00 MiB (125 extents) up to stripe boundary size 504.00 MiB(126 extents).
  Logical volume "LV" created.

[root@harding-03 ~]# lvconvert --yes --type raid10 VG/LV
  Using default stripesize 64.00 KiB.
  Replaced LV type raid10 with possible type raid6_n_6.
  Logical volume VG/LV successfully converted.


Version-Release number of selected component (if applicable):
3.10.0-643.el7.x86_64

lvm2-2.02.169-3.el7    BUILT: Wed Mar 29 09:17:46 CDT 2017
lvm2-libs-2.02.169-3.el7    BUILT: Wed Mar 29 09:17:46 CDT 2017
lvm2-cluster-2.02.169-3.el7    BUILT: Wed Mar 29 09:17:46 CDT 2017
device-mapper-1.02.138-3.el7    BUILT: Wed Mar 29 09:17:46 CDT 2017
device-mapper-libs-1.02.138-3.el7    BUILT: Wed Mar 29 09:17:46 CDT 2017
device-mapper-event-1.02.138-3.el7    BUILT: Wed Mar 29 09:17:46 CDT 2017
device-mapper-event-libs-1.02.138-3.el7    BUILT: Wed Mar 29 09:17:46 CDT 2017
device-mapper-persistent-data-0.7.0-0.1.rc6.el7    BUILT: Mon Mar 27 10:15:46 CDT 2017

Comment 2 Corey Marthaler 2017-04-05 23:11:08 UTC
# Already at 6_n_6
[root@harding-03 ~]# lvconvert --yes --type raid10 VG/LV
  Using default stripesize 64.00 KiB.
  Unable to convert LV VG/LV from raid6_n_6 to raid10.
  Converting VG/LV from raid6_n_6 is directly possible to the following layouts:
    raid0
    raid0_meta
    striped
    raid4
    raid5_n
    raid6_nc
    raid6_nr
    raid6_zr
    raid6_la_6
    raid6_ls_6
    raid6_ra_6
    raid6_rs_6
[root@harding-03 ~]# lvconvert --yes --type raid0 VG/LV
  Using default stripesize 64.00 KiB.
  Logical volume VG/LV successfully converted.
[root@harding-03 ~]# lvconvert --yes --type raid10 VG/LV
  Using default stripesize 64.00 KiB.
  Logical volume VG/LV successfully converted.

Comment 3 Heinz Mauelshagen 2017-04-06 19:54:19 UTC
Replacing a raid10 request with raid6 is an error.
Command should fail and list the possible types.

Comment 6 Corey Marthaler 2017-05-26 22:21:12 UTC
From comment #3:
"Replacing a raid10 request with raid6 is an error.
Command should fail and list the possible types."


[root@host-126 ~]# lvcreate  --type raid4 -i 3 -n LV -L 500M VG
  Using default stripesize 64.00 KiB.
  Rounding size 500.00 MiB (125 extents) up to stripe boundary size 504.00 MiB(126 extents).
  Logical volume "LV" created.
[root@host-126 ~]# lvs -a -o +devices,segtype
  LV            VG  Attr       LSize   Cpy%Sync Devices                                                     Type  
  LV            VG  rwi-a-r--- 504.00m 100.00   LV_rimage_0(0),LV_rimage_1(0),LV_rimage_2(0),LV_rimage_3(0) raid4 
  [LV_rimage_0] VG  iwi-aor--- 168.00m          /dev/sda1(1)                                                linear
  [LV_rimage_1] VG  iwi-aor--- 168.00m          /dev/sdb1(1)                                                linear
  [LV_rimage_2] VG  iwi-aor--- 168.00m          /dev/sdc1(1)                                                linear
  [LV_rimage_3] VG  iwi-aor--- 168.00m          /dev/sdd1(1)                                                linear
  [LV_rmeta_0]  VG  ewi-aor---   4.00m          /dev/sda1(0)                                                linear
  [LV_rmeta_1]  VG  ewi-aor---   4.00m          /dev/sdb1(0)                                                linear
  [LV_rmeta_2]  VG  ewi-aor---   4.00m          /dev/sdc1(0)                                                linear
  [LV_rmeta_3]  VG  ewi-aor---   4.00m          /dev/sdd1(0)                                                linear

[root@host-126 ~]# lvconvert --yes --type raid10 VG/LV
  Using default stripesize 64.00 KiB.
  Replaced LV type raid10 (same as raid10_near) with possible type raid5_n.
  Repeat this command to convert to raid10 after an interim conversion has finished.
  Converting raid4 LV VG/LV to raid5_n.
  Logical volume VG/LV successfully converted.

[root@host-126 ~]# lvs -a -o +devices,segtype
  LV            VG  Attr       LSize   Cpy%Sync Devices                                                     Type   
  LV            VG  rwi-a-r--- 504.00m 100.00   LV_rimage_0(0),LV_rimage_1(0),LV_rimage_2(0),LV_rimage_3(0) raid5_n
  [LV_rimage_0] VG  iwi-aor--- 172.00m          /dev/sda1(1)                                                linear 
  [LV_rimage_1] VG  iwi-aor--- 172.00m          /dev/sdb1(1)                                                linear 
  [LV_rimage_2] VG  iwi-aor--- 172.00m          /dev/sdc1(1)                                                linear 
  [LV_rimage_3] VG  iwi-aor--- 172.00m          /dev/sdd1(1)                                                linear 
  [LV_rmeta_0]  VG  ewi-aor---   4.00m          /dev/sda1(0)                                                linear 
  [LV_rmeta_1]  VG  ewi-aor---   4.00m          /dev/sdb1(0)                                                linear 
  [LV_rmeta_2]  VG  ewi-aor---   4.00m          /dev/sdc1(0)                                                linear 
  [LV_rmeta_3]  VG  ewi-aor---   4.00m          /dev/sdd1(0)                                                linear

Comment 7 Heinz Mauelshagen 2017-05-31 13:21:45 UTC
(In reply to Corey Marthaler from comment #6)
> From comment #3:
> "Replacing a raid10 request with raid6 is an error.
> Command should fail and list the possible types."
> 
> 
> [root@host-126 ~]# lvcreate  --type raid4 -i 3 -n LV -L 500M VG
>   Using default stripesize 64.00 KiB.
>   Rounding size 500.00 MiB (125 extents) up to stripe boundary size 504.00
> MiB(126 extents).
>   Logical volume "LV" created.
> [root@host-126 ~]# lvs -a -o +devices,segtype
>   LV            VG  Attr       LSize   Cpy%Sync Devices                     
> Type  
>   LV            VG  rwi-a-r--- 504.00m 100.00  
> LV_rimage_0(0),LV_rimage_1(0),LV_rimage_2(0),LV_rimage_3(0) raid4 
>   [LV_rimage_0] VG  iwi-aor--- 168.00m          /dev/sda1(1)                
> linear
>   [LV_rimage_1] VG  iwi-aor--- 168.00m          /dev/sdb1(1)                
> linear
>   [LV_rimage_2] VG  iwi-aor--- 168.00m          /dev/sdc1(1)                
> linear
>   [LV_rimage_3] VG  iwi-aor--- 168.00m          /dev/sdd1(1)                
> linear
>   [LV_rmeta_0]  VG  ewi-aor---   4.00m          /dev/sda1(0)                
> linear
>   [LV_rmeta_1]  VG  ewi-aor---   4.00m          /dev/sdb1(0)                
> linear
>   [LV_rmeta_2]  VG  ewi-aor---   4.00m          /dev/sdc1(0)                
> linear
>   [LV_rmeta_3]  VG  ewi-aor---   4.00m          /dev/sdd1(0)                
> linear
> 
> [root@host-126 ~]# lvconvert --yes --type raid10 VG/LV
>   Using default stripesize 64.00 KiB.
>   Replaced LV type raid10 (same as raid10_near) with possible type raid5_n.
>   Repeat this command to convert to raid10 after an interim conversion has
> finished.
>   Converting raid4 LV VG/LV to raid5_n.
>   Logical volume VG/LV successfully converted.
> 
> [root@host-126 ~]# lvs -a -o +devices,segtype
>   LV            VG  Attr       LSize   Cpy%Sync Devices                     
> Type   
>   LV            VG  rwi-a-r--- 504.00m 100.00  
> LV_rimage_0(0),LV_rimage_1(0),LV_rimage_2(0),LV_rimage_3(0) raid5_n
>   [LV_rimage_0] VG  iwi-aor--- 172.00m          /dev/sda1(1)                
> linear 
>   [LV_rimage_1] VG  iwi-aor--- 172.00m          /dev/sdb1(1)                
> linear 
>   [LV_rimage_2] VG  iwi-aor--- 172.00m          /dev/sdc1(1)                
> linear 
>   [LV_rimage_3] VG  iwi-aor--- 172.00m          /dev/sdd1(1)                
> linear 
>   [LV_rmeta_0]  VG  ewi-aor---   4.00m          /dev/sda1(0)                
> linear 
>   [LV_rmeta_1]  VG  ewi-aor---   4.00m          /dev/sdb1(0)                
> linear 
>   [LV_rmeta_2]  VG  ewi-aor---   4.00m          /dev/sdc1(0)                
> linear 
>   [LV_rmeta_3]  VG  ewi-aor---   4.00m          /dev/sdd1(0)                
> linear

Corey,

converting from raid4 to raid involves raid4 -> raid5_n -> raid0_meta -> raid10(_near), i.e. a 3 step conversion process.
Hence the new code replaces the LV type with the next possible one raid5_n in this examples)and asks the user to repeat the initial command
("lvconvert --yes --type raid10 VG/LV" in this case).
So the functionality goes beyond what I stated and you copies in comment #6.

Please reevaluate and perfrom the multi-step conversions.

Comment 9 Corey Marthaler 2017-06-22 22:43:56 UTC
Marking verified based on new expectations listed in comment #7.

3.10.0-685.el7.x86_64
lvm2-2.02.171-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
lvm2-libs-2.02.171-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
lvm2-cluster-2.02.171-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
device-mapper-1.02.140-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
device-mapper-libs-1.02.140-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
device-mapper-event-1.02.140-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
device-mapper-event-libs-1.02.140-7.el7    BUILT: Thu Jun 22 08:35:15 CDT 2017
device-mapper-persistent-data-0.7.0-0.1.rc6.el7    BUILT: Mon Mar 27 10:15:46 CDT 2017



[root@host-092 ~]# lvcreate  --type raid4 -i 3 -n LV -L 500M VG
  Using default stripesize 64.00 KiB.
  Rounding size 500.00 MiB (125 extents) up to stripe boundary size 504.00 MiB(126 extents).         
  Logical volume "LV" created.
  
[root@host-092 ~]#  lvs -a -o +devices
  LV            VG  Attr       LSize   Cpy%Sync Devices                                              
  LV            VG  rwi-a-r--- 504.00m 100.00   LV_rimage_0(0),LV_rimage_1(0),LV_rimage_2(0),LV_rimage_3(0)
  [LV_rimage_0] VG  iwi-aor--- 168.00m          /dev/sda1(1)                                         
  [LV_rimage_1] VG  iwi-aor--- 168.00m          /dev/sdb1(1)                                         
  [LV_rimage_2] VG  iwi-aor--- 168.00m          /dev/sdc1(1)                                         
  [LV_rimage_3] VG  iwi-aor--- 168.00m          /dev/sdd1(1)                                         
  [LV_rmeta_0]  VG  ewi-aor---   4.00m          /dev/sda1(0)                                         
  [LV_rmeta_1]  VG  ewi-aor---   4.00m          /dev/sdb1(0)                                         
  [LV_rmeta_2]  VG  ewi-aor---   4.00m          /dev/sdc1(0)
  [LV_rmeta_3]  VG  ewi-aor---   4.00m          /dev/sdd1(0)
  
[root@host-092 ~]# lvconvert --yes --type raid10 VG/LV
  Using default stripesize 64.00 KiB. 
  Replaced LV type raid10 (same as raid10_near) with possible type raid0_meta.
  Repeat this command to convert to raid10 after an interim conversion has finished.
  Logical volume VG/LV successfully converted.
  
[root@host-092 ~]# lvconvert --yes --type raid10 VG/LV
  Using default stripesize 64.00 KiB. 
  Logical volume VG/LV successfully converted.
  
[root@host-092 ~]# lvs -a -o +devices,segtype
  LV            VG  Attr       LSize   Cpy%Sync Devices                                                                                   Type
  LV            VG  rwi-a-r--- 504.00m 100.00   LV_rimage_0(0),LV_rimage_3(0),LV_rimage_1(0),LV_rimage_4(0),LV_rimage_2(0),LV_rimage_5(0) raid10
  [LV_rimage_0] VG  iwi-aor--- 168.00m          /dev/sdb1(1)                                                                              linear
  [LV_rimage_1] VG  iwi-aor--- 168.00m          /dev/sdc1(1)                                                                              linear
  [LV_rimage_2] VG  iwi-aor--- 168.00m          /dev/sdd1(1)                                                                              linear
  [LV_rimage_3] VG  iwi-aor--- 168.00m          /dev/sda1(1)                                                                              linear
  [LV_rimage_4] VG  iwi-aor--- 168.00m          /dev/sde1(1)                                                                              linear
  [LV_rimage_5] VG  iwi-aor--- 168.00m          /dev/sdf1(1)                                                                              linear
  [LV_rmeta_0]  VG  ewi-aor---   4.00m          /dev/sdb1(0)                                                                              linear
  [LV_rmeta_1]  VG  ewi-aor---   4.00m          /dev/sdc1(0)                                                                              linear
  [LV_rmeta_2]  VG  ewi-aor---   4.00m          /dev/sdd1(0)                                                                              linear
  [LV_rmeta_3]  VG  ewi-aor---   4.00m          /dev/sda1(0)                                                                              linear
  [LV_rmeta_4]  VG  ewi-aor---   4.00m          /dev/sde1(0)                                                                              linear
  [LV_rmeta_5]  VG  ewi-aor---   4.00m          /dev/sdf1(0)                                                                              linear

Comment 10 errata-xmlrpc 2017-08-01 21:52:19 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.