Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1608067

Summary: RAID TAKEOVER: raid0|raid0_meta no longer able to convert directly to striped
Product: Red Hat Enterprise Linux 7 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Heinz Mauelshagen <heinzm>
lvm2 sub component: Mirroring and RAID QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: unspecified CC: agk, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, zkabelac
Version: 7.6Keywords: Regression
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.180-5.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 11:03:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Corey Marthaler 2018-07-24 22:02:35 UTC
Description of problem:
Latest lvm attempts a raid5_n now when requesting to go to striped.

# RHEL7.5 (3.10.0-862.el7.x86_64 lvm2-2.02.177-4.el7.x86_64)

[root@mckinley-04 ~]# lvcreate  --type raid0  -i 5 -n takeover -L 2.75G centipede2
  Using default stripesize 64.00 KiB.
  Rounding size 2.75 GiB (704 extents) up to stripe boundary size 2.75 GiB(705 extents).
  Logical volume "takeover" created.

[root@mckinley-04 ~]# lvs -a -o +devices,segtype
  LV                  VG         Attr       LSize     Cpy%Sync Devices                                                                                                  Type  
  takeover            centipede2  rwi-a-r---   2.75g           takeover_rimage_0(0),takeover_rimage_1(0),takeover_rimage_2(0),takeover_rimage_3(0),takeover_rimage_4(0) raid0 
  [takeover_rimage_0] centipede2  iwi-aor--- 564.00m           /dev/mapper/mpatha1(0)                                                                                   linear
  [takeover_rimage_1] centipede2  iwi-aor--- 564.00m           /dev/mapper/mpathb1(0)                                                                                   linear
  [takeover_rimage_2] centipede2  iwi-aor--- 564.00m           /dev/mapper/mpathc1(0)                                                                                   linear
  [takeover_rimage_3] centipede2  iwi-aor--- 564.00m           /dev/mapper/mpathd1(0)                                                                                   linear
  [takeover_rimage_4] centipede2  iwi-aor--- 564.00m           /dev/mapper/mpathe1(0)                                                                                   linear

[root@mckinley-04 ~]# lvconvert --yes   --type striped centipede2/takeover
  Logical volume centipede2/takeover successfully converted.

[root@mckinley-04 ~]# lvs -a -o +devices,segtype
  LV       VG            Attr       LSize  Cpy%Sync Convert Devices                                                                                                            Type   
  takeover centipede2    -wi-a----- 2.75g                   /dev/mapper/mpatha1(0),/dev/mapper/mpathb1(0),/dev/mapper/mpathc1(0),/dev/mapper/mpathd1(0),/dev/mapper/mpathe1(0) striped



# RHEL7.6 (3.10.0-925.el7.x86_64 lvm2-2.02.180-1.el7)

[root@host-073 ~]# lvs -a -o +devices
  LV                  VG          Attr       LSize    Cpy%Sync Devices                                                                                                 
  takeover            centipede2  rwi-a-r---   2.75g           takeover_rimage_0(0),takeover_rimage_1(0),takeover_rimage_2(0),takeover_rimage_3(0),takeover_rimage_4(0)
  [takeover_rimage_0] centipede2  iwi-aor--- 564.00m           /dev/sdd1(0)                                                                                            
  [takeover_rimage_1] centipede2  iwi-aor--- 564.00m           /dev/sdb1(0)                                                                                            
  [takeover_rimage_2] centipede2  iwi-aor--- 564.00m           /dev/sda1(0)                                                                                            
  [takeover_rimage_3] centipede2  iwi-aor--- 564.00m           /dev/sdc1(0)                                                                                            
  [takeover_rimage_4] centipede2  iwi-aor--- 564.00m           /dev/sdg1(0)                                                                                            

[root@host-073 ~]#  lvconvert --yes   --type striped centipede2/takeover
  Replaced LV type striped with possible type raid5_n.
  Repeat this command to convert to striped after an interim conversion has finished.
  Logical volume centipede2/takeover successfully converted.

[root@host-073 ~]# lvs -a -o +devices,segtype
  LV                  VG          Attr       LSize    Cpy%Sync Devices                                                                                                                       Type     
  takeover            centipede2  rwi-a-r---   2.75g  17.24    takeover_rimage_0(0),takeover_rimage_1(0),takeover_rimage_2(0),takeover_rimage_3(0),takeover_rimage_4(0),takeover_rimage_5(0) raid5_n  
  [takeover_rimage_0] centipede2  iwi-aor--- 564.00m           /dev/sdd1(0)                                                                                                                  linear   
  [takeover_rimage_1] centipede2  iwi-aor--- 564.00m           /dev/sdb1(0)                                                                                                                  linear   
  [takeover_rimage_2] centipede2  iwi-aor--- 564.00m           /dev/sda1(0)                                                                                                                  linear   
  [takeover_rimage_3] centipede2  iwi-aor--- 564.00m           /dev/sdc1(0)                                                                                                                  linear   
  [takeover_rimage_4] centipede2  iwi-aor--- 564.00m           /dev/sdg1(0)                                                                                                                  linear   
  [takeover_rimage_5] centipede2  Iwi-aor--- 564.00m           /dev/sdh1(1)                                                                                                                  linear   
  [takeover_rmeta_0]  centipede2  ewi-aor---   4.00m           /dev/sdd1(141)                                                                                                                linear   
  [takeover_rmeta_1]  centipede2  ewi-aor---   4.00m           /dev/sdb1(141)                                                                                                                linear   
  [takeover_rmeta_2]  centipede2  ewi-aor---   4.00m           /dev/sda1(141)                                                                                                                linear   
  [takeover_rmeta_3]  centipede2  ewi-aor---   4.00m           /dev/sdc1(141)                                                                                                                linear   
  [takeover_rmeta_4]  centipede2  ewi-aor---   4.00m           /dev/sdg1(141)                                                                                                                linear   
  [takeover_rmeta_5]  centipede2  ewi-aor---   4.00m           /dev/sdh1(0)                                                                                                                  linear   


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

lvm2-2.02.180-1.el7    BUILT: Fri Jul 20 12:21:35 CDT 2018
lvm2-libs-2.02.180-1.el7    BUILT: Fri Jul 20 12:21:35 CDT 2018
lvm2-cluster-2.02.180-1.el7    BUILT: Fri Jul 20 12:21:35 CDT 2018
lvm2-python-boom-0.9-4.el7    BUILT: Fri Jul 20 12:23:30 CDT 2018
cmirror-2.02.180-1.el7    BUILT: Fri Jul 20 12:21:35 CDT 2018
device-mapper-1.02.149-1.el7    BUILT: Fri Jul 20 12:21:35 CDT 2018
device-mapper-libs-1.02.149-1.el7    BUILT: Fri Jul 20 12:21:35 CDT 2018
device-mapper-event-1.02.149-1.el7    BUILT: Fri Jul 20 12:21:35 CDT 2018
device-mapper-event-libs-1.02.149-1.el7    BUILT: Fri Jul 20 12:21:35 CDT 2018
device-mapper-persistent-data-0.7.3-3.el7    BUILT: Tue Nov 14 05:07:18 CST 2017


How reproducible:
Everytime

Comment 3 Corey Marthaler 2018-07-24 22:25:50 UTC
It appears all the other raid0 -> direct options still work properly ("raid0_meta","raid4","raid5_n","raid6_n_6","raid10","raid10_near")

Comment 4 Corey Marthaler 2018-07-25 15:36:35 UTC
Same issue w/ raid0_meta -> striped.

Comment 5 Jonathan Earl Brassow 2018-08-07 14:22:19 UTC
commit bd7cdd0b09ba123b064937fddde08daacbed7dab introduced this regression.

Comment 6 Jonathan Earl Brassow 2018-08-07 14:57:42 UTC
(In reply to Jonathan Earl Brassow from comment #5)
> commit bd7cdd0b09ba123b064937fddde08daacbed7dab introduced this regression.

Gonna need to let Heinz fix this one... conversion code gets pretty messy.

Comment 9 Heinz Mauelshagen 2018-08-21 15:33:40 UTC
lvm2 upstream commit 4578411633a40c8c9068ff439ef3c33cbe78d25a

Comment 11 Corey Marthaler 2018-08-27 20:08:20 UTC
Fix verified in the latest rpms.

Not sure about the additional warnings however:
  --stripes not allowed for LV centipede2/takeover when converting from raid0 to striped.
  -R/--regionsize not allowed for LV centipede2/takeover when converting from raid0 to striped.



3.10.0-937.el7.x86_64

lvm2-2.02.180-6.el7    BUILT: Fri Aug 24 08:52:19 CDT 2018
lvm2-libs-2.02.180-6.el7    BUILT: Fri Aug 24 08:52:19 CDT 2018
lvm2-cluster-2.02.180-6.el7    BUILT: Fri Aug 24 08:52:19 CDT 2018
lvm2-lockd-2.02.180-6.el7    BUILT: Fri Aug 24 08:52:19 CDT 2018
lvm2-python-boom-0.9-9.el7    BUILT: Fri Aug 24 08:52:54 CDT 2018
cmirror-2.02.180-6.el7    BUILT: Fri Aug 24 08:52:19 CDT 2018
device-mapper-1.02.149-6.el7    BUILT: Fri Aug 24 08:52:19 CDT 2018
device-mapper-libs-1.02.149-6.el7    BUILT: Fri Aug 24 08:52:19 CDT 2018
device-mapper-event-1.02.149-6.el7    BUILT: Fri Aug 24 08:52:19 CDT 2018
device-mapper-event-libs-1.02.149-6.el7    BUILT: Fri Aug 24 08:52:19 CDT 2018
device-mapper-persistent-data-0.7.3-3.el7    BUILT: Tue Nov 14 05:07:18 CST 2017



# raid0
[root@hayes-01 ~]# lvcreate  --type raid0  -i 5 -n takeover -L 2.75G centipede2
  Using default stripesize 64.00 KiB.
  Rounding size 2.75 GiB (704 extents) up to stripe boundary size 2.75 GiB(705 extents).
  Logical volume "takeover" created.
[root@hayes-01 ~]# lvs -a -o +devices,segtype
  LV                  VG         Attr       LSize    Devices                                                                                                  Type  
  takeover            centipede2 rwi-a-r---   2.75g  takeover_rimage_0(0),takeover_rimage_1(0),takeover_rimage_2(0),takeover_rimage_3(0),takeover_rimage_4(0) raid0 
  [takeover_rimage_0] centipede2 iwi-aor--- 564.00m  /dev/sdb1(0)                                                                                             linear
  [takeover_rimage_1] centipede2 iwi-aor--- 564.00m  /dev/sdc1(0)                                                                                             linear
  [takeover_rimage_2] centipede2 iwi-aor--- 564.00m  /dev/sdd1(0)                                                                                             linear
  [takeover_rimage_3] centipede2 iwi-aor--- 564.00m  /dev/sde1(0)                                                                                             linear
  [takeover_rimage_4] centipede2 iwi-aor--- 564.00m  /dev/sdf1(0)                                                                                             linear

[root@hayes-01 ~]# lvconvert --yes   --type striped centipede2/takeover
  --stripes not allowed for LV centipede2/takeover when converting from raid0 to striped.
  -R/--regionsize not allowed for LV centipede2/takeover when converting from raid0 to striped.
  Logical volume centipede2/takeover successfully converted.

[root@hayes-01 ~]# lvs -a -o +devices,segtype
  LV       VG         Attr       LSize  Devices                                                          Type   
  takeover centipede2 -wi-a----- 2.75g  /dev/sdb1(0),/dev/sdc1(0),/dev/sdd1(0),/dev/sde1(0),/dev/sdf1(0) striped




# raid0_meta
[root@hayes-01 ~]# lvcreate  --type raid0_meta  -i 2 -n takeover -L 2.75G centipede2
  Using default stripesize 64.00 KiB.
  Logical volume "takeover" created.
[root@hayes-01 ~]# lvs -a -o +devices,segtype
  LV                  VG         Attr       LSize   Devices                                   Type      
  takeover            centipede2 rwi-a-r---  2.75g  takeover_rimage_0(0),takeover_rimage_1(0) raid0_meta
  [takeover_rimage_0] centipede2 iwi-aor--- <1.38g  /dev/sdb1(1)                              linear    
  [takeover_rimage_1] centipede2 iwi-aor--- <1.38g  /dev/sdc1(1)                              linear    
  [takeover_rmeta_0]  centipede2 ewi-aor---  4.00m  /dev/sdb1(0)                              linear    
  [takeover_rmeta_1]  centipede2 ewi-aor---  4.00m  /dev/sdc1(0)                              linear    

[root@hayes-01 ~]# lvconvert --yes   --type striped centipede2/takeover
  --stripes not allowed for LV centipede2/takeover when converting from raid0_meta to striped.
  -R/--regionsize not allowed for LV centipede2/takeover when converting from raid0_meta to striped.
  Logical volume centipede2/takeover successfully converted.

[root@hayes-01 ~]# lvs -a -o +devices,segtype
  LV       VG         Attr       LSize  Devices                   Type   
  takeover centipede2 -wi-a----- 2.75g  /dev/sdb1(1),/dev/sdc1(1) striped

Comment 14 errata-xmlrpc 2018-10-30 11:03:51 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