Bug 1459566 - Upconverting linear to RAID1 does not work with older kernels anymore (tested with dm-raid v1.7.0)
Summary: Upconverting linear to RAID1 does not work with older kernels anymore (tested...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: 2.02.172
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Heinz Mauelshagen
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-07 13:12 UTC by Marian Csontos
Modified: 2022-07-07 15:30 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-07-07 15:30:51 UTC
Embargoed:
rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)

Description Marian Csontos 2017-06-07 13:12:18 UTC
Commit acaf3a5d47fd65b2e385a516544f8e6ec8d89b2d caused a regression with older kernels.

https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=acaf3a5d47fd65b2e385a516544f8e6ec8d89b2d

Description of problem:

With this change applied, older kernels (7.2, RHEL6.x, F21) upconverting linear to RAID1 now fails:

#lvchange-raid.sh:132+ lvconvert -y --type raid1 -m 1 @PREFIX@vg/LV1 /dev/mapper/@PREFIX@pv2
device-mapper: raid: Device 1 specified for rebuild: Clearing superblock
device-mapper: raid: 'rebuild' devices cannot be injected into an array with other first-time devices
device-mapper: table: 253:10: raid: Unable to assemble array: Invalid superblocks
device-mapper: ioctl: error adding target to table
device-mapper: reload ioctl on  (253:10) failed: Invalid argument
  Failed to lock logical volume @PREFIX@vg/LV1.

Version-Release number of selected component (if applicable):
upstream LVM2 (future 2.02.172 release)
dm-raid v1.7.0

How reproducible:
100%

Steps to Reproduce:
1. lvcreate -n LV -L 100M VG
2. lvconvert -y -m 1 --type raid1 VG/LV

Comment 1 Jonathan Earl Brassow 2018-04-04 20:18:27 UTC
It is ok if it says "Can't convert, upgrade your kernel!".  It is not ok to attempt and have the kernel fail and be left with an unusable device.

We'll need to add a kernel version check to this type of operation.

Comment 2 Jonathan Earl Brassow 2021-11-22 19:22:44 UTC
How hard to add this check and fix this bug?  I'm very tempted just to close.

Comment 3 Heinz Mauelshagen 2022-07-07 15:30:51 UTC
Closing, it's working on newer RHEL, e.g. 7.7


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