Bug 1369961

Summary: linear -> raid10 convert no longer supported?
Product: Red Hat Enterprise Linux 7 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
lvm2 sub component: Mirroring and RAID QA Contact: cluster-qe <cluster-qe>
Status: CLOSED NOTABUG Docs Contact:
Severity: medium    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, prockai, zkabelac
Version: 7.3   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-24 22:27:05 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:

Description Corey Marthaler 2016-08-24 21:39:44 UTC
Description of problem:
This worked in rhel7.2 (lvm2-2.02.130-5.el7_2.5) as well as up to rhel7.3 (lvm2-2.02.162-1.el7) and was then turned off in lvm2-2.02.163-1.el7.



lvm2-2.02.162-1.el7    BUILT: Fri Jul 29 02:26:36 CDT 2016
lvm2-libs-2.02.162-1.el7    BUILT: Fri Jul 29 02:26:36 CDT 2016
lvm2-cluster-2.02.162-1.el7    BUILT: Fri Jul 29 02:26:36 CDT 2016


[root@host-116 ~]# lvcreate -L 10M -n convert test
  Rounding up size to full physical extent 12.00 MiB
  Logical volume "convert" created.

[root@host-116 ~]# lvs -a -o +devices
  LV      VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices
  convert test          -wi-a-----  12.00m                                                     /dev/sda1(0)

[root@host-116 ~]# lvconvert --type raid10 -m 1 -i 2 test/convert
[root@host-116 ~]# lvs -a -o +devices
  LV                 VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices
  convert            test          rwi-a-r---  12.00m                                    100.00           convert_rimage_0(0),convert_rimage_1(0)
  [convert_rimage_0] test          iwi-aor---  12.00m                                                     /dev/sda1(0)
  [convert_rimage_1] test          iwi-aor---  12.00m                                                     /dev/sdb1(1)
  [convert_rmeta_0]  test          ewi-aor---   4.00m                                                     /dev/sda1(3)
  [convert_rmeta_1]  test          ewi-aor---   4.00m                                                     /dev/sdb1(0)






lvm2-2.02.163-1.el7    BUILT: Wed Aug 10 06:53:21 CDT 2016
lvm2-libs-2.02.163-1.el7    BUILT: Wed Aug 10 06:53:21 CDT 2016
lvm2-cluster-2.02.163-1.el7    BUILT: Wed Aug 10 06:53:21 CDT 2016

[root@host-116 ~]# lvcreate -L 10M -n convert test
  Using default stripesize 64.00 KiB.
  Rounding up size to full physical extent 12.00 MiB
  Logical volume "convert" created.

[root@host-116 ~]# lvs -a -o +devices
  LV      VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices
  convert test          -wi-a-----  12.00m                                                     /dev/sda1(0)

[root@host-116 ~]# lvconvert --type raid10 -m 1 -i 2 test/convert
  Using default stripesize 64.00 KiB.
  Conversion operation not yet supported.

Comment 2 Heinz Mauelshagen 2016-08-24 22:27:05 UTC
In RHEL-7.2, the -i2 option was silently ignored and a raid1 mapping was created with 2 legs. We are aiming at avoiding such implicit layouts, so this is a known decision. The error message you see "Conversion operation..." is a result of this direction we're following.
What should really happen is resulting in a raid10_near layout (raid10 being an acronym for raid10_near) with 2 stripes across 2 mirror groups with 2 legs each.
For that to occur, agk will review/integrate more takeover code I have aiming
at RHEL-7.4.

"lvconvert -m1 -lN [--ty raid1 -nLV] VG" should be used instead to get the raid1 layout explicitely