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 1573255 - RAID TAKEOVER: When attempting to convert raid5 -> raid10, lvm should take the first step to raid5_n automatically
Summary: RAID TAKEOVER: When attempting to convert raid5 -> raid10, lvm should take th...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Heinz Mauelshagen
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-30 15:37 UTC by Corey Marthaler
Modified: 2021-09-03 12:38 UTC (History)
7 users (show)

Fixed In Version: lvm2-2.02.179-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 11:02:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3193 0 None None None 2018-10-30 11:03:20 UTC

Description Corey Marthaler 2018-04-30 15:37:25 UTC
Description of problem:
According to the verification criteria in bugs 1439403 and 1525661, LVM should have automatically taken "the first step" towards raid10 instead of just giving the user a list of possible options. 


[root@host-086 ~]# lvcreate --type raid5 -i 3 -L 100M -n lv vg
  Using default stripesize 64.00 KiB.
  Rounding size 100.00 MiB (25 extents) up to stripe boundary size 108.00 MiB(27 extents).
  Logical volume "lv" created.

# This cmd should prompt the user and go to raid5_n as the "first step"
[root@host-086 ~]# 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.
  Unable to convert LV vg/lv from raid5 to raid0_meta.
  Converting vg/lv from raid5 (same as raid5_ls) is directly possible to the following layouts:
    raid5_n
    raid5_la
    raid5_ra
    raid5_rs
    raid6_ls_6

[root@host-086 ~]# 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.
  Unable to convert LV vg/lv from raid5 to raid0_meta.
  Converting vg/lv from raid5 (same as raid5_ls) is directly possible to the following layouts:
    raid5_n
    raid5_la
    raid5_ra
    raid5_rs
    raid6_ls_6

[root@host-086 ~]# lvconvert --yes --type raid5_n vg/lv
  Using default stripesize 64.00 KiB.
  Converting raid5 (same as raid5_ls) LV vg/lv to raid5_n.
  Logical volume vg/lv successfully converted.

## Now, it takes the "first step" (raid0_meta) automatically
[root@host-086 ~]# 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-086 ~]# lvs -a -o +devices,segtype
  LV            VG  Attr       LSize   Cpy%Sync Convert Devices                                      Type      
  lv            vg  rwi-a-r--- 108.00m                  lv_rimage_0(0),lv_rimage_1(0),lv_rimage_2(0) raid0_meta
  [lv_rimage_0] vg  iwi-aor---  36.00m                  /dev/sda1(2)                                 linear    
  [lv_rimage_1] vg  iwi-aor---  36.00m                  /dev/sdb1(2)                                 linear    
  [lv_rimage_2] vg  iwi-aor---  36.00m                  /dev/sdc1(2)                                 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    

## Repeat like told to do in the prior output and convert is complete
[root@host-086 ~]# lvconvert --yes --type raid10 vg/lv
  Using default stripesize 64.00 KiB.
  Logical volume vg/lv successfully converted.

[root@host-086 ~]# lvs -a -o +devices,segtype
  LV            VG  Attr       LSize   Cpy%Sync Convert Devices                                                                                   Type  
  lv            vg  rwi-a-r--- 108.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---  36.00m                  /dev/sda1(2)                                                                              linear
  [lv_rimage_1] vg  iwi-aor---  36.00m                  /dev/sdb1(2)                                                                              linear
  [lv_rimage_2] vg  iwi-aor---  36.00m                  /dev/sdc1(2)                                                                              linear
  [lv_rimage_3] vg  iwi-aor---  36.00m                  /dev/sdd1(1)                                                                              linear
  [lv_rimage_4] vg  iwi-aor---  36.00m                  /dev/sde1(1)                                                                              linear
  [lv_rimage_5] vg  iwi-aor---  36.00m                  /dev/sdf1(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
  [lv_rmeta_4]  vg  ewi-aor---   4.00m                  /dev/sde1(0)                                                                              linear
  [lv_rmeta_5]  vg  ewi-aor---   4.00m                  /dev/sdf1(0)                                                                              linear


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

lvm2-2.02.177-4.el7    BUILT: Fri Feb 16 13:22:31 CET 2018
lvm2-libs-2.02.177-4.el7    BUILT: Fri Feb 16 13:22:31 CET 2018
lvm2-cluster-2.02.177-4.el7    BUILT: Fri Feb 16 13:22:31 CET 2018
lvm2-lockd-2.02.177-4.el7    BUILT: Fri Feb 16 13:22:31 CET 2018
lvm2-python-boom-0.8.5-4.el7    BUILT: Fri Feb 16 13:37:10 CET 2018
cmirror-2.02.177-4.el7    BUILT: Fri Feb 16 13:22:31 CET 2018
device-mapper-1.02.146-4.el7    BUILT: Fri Feb 16 13:22:31 CET 2018
device-mapper-libs-1.02.146-4.el7    BUILT: Fri Feb 16 13:22:31 CET 2018
device-mapper-event-1.02.146-4.el7    BUILT: Fri Feb 16 13:22:31 CET 2018
device-mapper-event-libs-1.02.146-4.el7    BUILT: Fri Feb 16 13:22:31 CET 2018
device-mapper-persistent-data-0.7.3-3.el7    BUILT: Tue Nov 14 12:07:18 CET 2017
sanlock-3.6.0-1.el7    BUILT: Tue Dec  5 18:47:21 CET 2017
sanlock-lib-3.6.0-1.el7    BUILT: Tue Dec  5 18:47:21 CET 2017
vdo-6.1.0.149-16    BUILT: Fri Feb 16 17:55:58 CET 2018
kmod-kvdo-6.1.0.153-15.el7    BUILT: Tue Feb 27 16:49:26 CET 2018

Comment 2 Heinz Mauelshagen 2018-06-05 14:27:15 UTC
lvm2 upstream commit bd7cdd0b09ba123b064937fddde08daacbed7dab

Comment 5 Corey Marthaler 2018-08-13 16:36:11 UTC
Fix verified in the latest rpms. LVM now takes the interim steps automatically instead of just offering the user possible interim steps.

3.10.0-931.el7.x86_64
lvm2-2.02.180-2.el7    BUILT: Wed Aug  1 11:22:48 CDT 2018
lvm2-libs-2.02.180-2.el7    BUILT: Wed Aug  1 11:22:48 CDT 2018
lvm2-cluster-2.02.180-2.el7    BUILT: Wed Aug  1 11:22:48 CDT 2018
device-mapper-1.02.149-2.el7    BUILT: Wed Aug  1 11:22:48 CDT 2018
device-mapper-libs-1.02.149-2.el7    BUILT: Wed Aug  1 11:22:48 CDT 2018
device-mapper-event-1.02.149-2.el7    BUILT: Wed Aug  1 11:22:48 CDT 2018
device-mapper-event-libs-1.02.149-2.el7    BUILT: Wed Aug  1 11:22:48 CDT 2018
device-mapper-persistent-data-0.7.3-3.el7    BUILT: Tue Nov 14 05:07:18 CST 2017


[root@host-093 ~]# pvscan
  PV /dev/sda1   VG vg    lvm2 [<24.99 GiB / <24.95 GiB free]
  PV /dev/sdb1   VG vg    lvm2 [<24.99 GiB / <24.95 GiB free]
  PV /dev/sdc1   VG vg    lvm2 [<24.99 GiB / <24.95 GiB free]
  PV /dev/sdd1   VG vg    lvm2 [<24.99 GiB / <24.95 GiB free]
  PV /dev/sde1   VG vg    lvm2 [<24.99 GiB / <24.95 GiB free]
  PV /dev/sdf1   VG vg    lvm2 [<24.99 GiB / <24.95 GiB free]
  PV /dev/sdg1   VG vg    lvm2 [<24.99 GiB / <24.99 GiB free]
  PV /dev/sdh1   VG vg    lvm2 [<24.99 GiB / <24.99 GiB free]

[root@host-093 ~]# lvcreate --type raid5 -i 3 -L 100M -n lv vg
  Using default stripesize 64.00 KiB.
  Rounding size 100.00 MiB (25 extents) up to stripe boundary size 108.00 MiB(27 extents).
  Logical volume "lv" created.

[root@host-093 ~]# lvs -a -o +devices,segtype
  LV            VG  Attr       LSize    Cpy%Sync Convert Devices                                                     Type     
  lv            vg  rwi-a-r--- 108.00m  100.00           lv_rimage_0(0),lv_rimage_1(0),lv_rimage_2(0),lv_rimage_3(0) raid5    
  [lv_rimage_0] vg  iwi-aor---  36.00m                   /dev/sda1(1)                                                linear   
  [lv_rimage_1] vg  iwi-aor---  36.00m                   /dev/sdb1(1)                                                linear   
  [lv_rimage_2] vg  iwi-aor---  36.00m                   /dev/sdc1(1)                                                linear   
  [lv_rimage_3] vg  iwi-aor---  36.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-093 ~]# 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 raid5 (same as raid5_ls) LV vg/lv to raid5_n.
  Logical volume vg/lv successfully converted.

[root@host-093 ~]# lvs -a -o +devices,segtype
  LV            VG  Attr       LSize    Cpy%Sync Devices                                                     Type
  lv            vg  rwi-a-r--- 108.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---  40.00m           /dev/sda1(1)                                                linear
  [lv_rimage_1] vg  iwi-aor---  40.00m           /dev/sdb1(1)                                                linear
  [lv_rimage_2] vg  iwi-aor---  40.00m           /dev/sdc1(1)                                                linear
  [lv_rimage_3] vg  iwi-aor---  40.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-093 ~]# 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-093 ~]# lvs -a -o +devices,segtype
  LV            VG  Attr       LSize    Cpy%Sync Devices                                      Type
  lv            vg  rwi-a-r--- 108.00m           lv_rimage_0(0),lv_rimage_1(0),lv_rimage_2(0) raid0_meta
  [lv_rimage_0] vg  iwi-aor---  36.00m           /dev/sda1(2)                                 linear
  [lv_rimage_1] vg  iwi-aor---  36.00m           /dev/sdb1(2)                                 linear
  [lv_rimage_2] vg  iwi-aor---  36.00m           /dev/sdc1(2)                                 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

[root@host-093 ~]# lvconvert --yes --type raid10 vg/lv
  Using default stripesize 64.00 KiB.
  Logical volume vg/lv successfully converted.

[root@host-093 ~]# lvs -a -o +devices,segtype
  LV            VG  Attr       LSize    Cpy%Sync Devices                                                                                   Type
  lv            vg  rwi-a-r--- 108.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---  36.00m           /dev/sda1(2)                                                                              linear
  [lv_rimage_1] vg  iwi-aor---  36.00m           /dev/sdb1(2)                                                                              linear
  [lv_rimage_2] vg  iwi-aor---  36.00m           /dev/sdc1(2)                                                                              linear
  [lv_rimage_3] vg  iwi-aor---  36.00m           /dev/sdd1(1)                                                                              linear
  [lv_rimage_4] vg  iwi-aor---  36.00m           /dev/sde1(1)                                                                              linear
  [lv_rimage_5] vg  iwi-aor---  36.00m           /dev/sdf1(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
  [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 7 errata-xmlrpc 2018-10-30 11:02:26 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-2018:3193


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