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 1579072 - raid1 volumes with outstanding tracked split off images should probably be locked down from type conversion
Summary: raid1 volumes with outstanding tracked split off images should probably be lo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.5
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Heinz Mauelshagen
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-16 22:57 UTC by Corey Marthaler
Modified: 2021-09-03 12:41 UTC (History)
6 users (show)

Fixed In Version: lvm2-2.02.180-2.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-05-16 22:57:17 UTC
Description of problem:

# Basic case of raid1 -> mirror w/ an outstanding tracked split

[root@host-073 tmp]# lvcreate --type raid1 -m 2 -n raid -L 100M VG
  Logical volume "raid" created.
[root@host-073 tmp]# lvconvert --yes --splitmirrors 1 --trackchanges VG/raid
  VG/raid_rimage_2 split from VG/raid for read-only purposes.
  Use 'lvconvert --merge VG/raid_rimage_2' to merge back into VG/raid.
[root@host-073 tmp]# lvs -a -o +devices
  LV              VG  Attr       LSize   Log Cpy%Sync Devices
  raid            VG  rwi-a-r--- 100.00m     100.00   raid_rimage_0(0),raid_rimage_1(0),raid_rimage_2(0)
  [raid_rimage_0] VG  iwi-aor--- 100.00m              /dev/sda1(1)
  [raid_rimage_1] VG  iwi-aor--- 100.00m              /dev/sda2(1)
  raid_rimage_2   VG  Iri-a-r--- 100.00m              /dev/sda3(1)
  [raid_rmeta_0]  VG  ewi-aor---   4.00m              /dev/sda1(0)
  [raid_rmeta_1]  VG  ewi-aor---   4.00m              /dev/sda2(0)
  [raid_rmeta_2]  VG  ewi-a-r---   4.00m              /dev/sda3(0)
[root@host-073 tmp]# lvconvert --type mirror VG/raid
Are you sure you want to convert VG/raid back to the older mirror type? [y/n]: y
  Logical volume VG/raid successfully converted.
[root@host-073 tmp]# lvs -a -o +devices
  LV              VG  Attr       LSize   Log         Cpy%Sync Devices
  raid            VG  mwi-a-m--- 100.00m [raid_mlog] 100.00   raid_mimage_0(0),raid_mimage_1(0),raid_mimage_2(0)
  [raid_mimage_0] VG  iwi-aom--- 100.00m                      /dev/sda1(1)
  [raid_mimage_1] VG  iwi-aom--- 100.00m                      /dev/sda2(1)
  raid_mimage_2   VG  iri-aom--- 100.00m                      /dev/sda3(1)
  [raid_mlog]     VG  lwn-aom---   4.00m                      /dev/sdb3(0)
[root@host-073 tmp]# lvconvert --yes --merge VG/raid_mimage_2
  Unable to merge non-mirror image VG/raid_mimage_2.

# The above split off image was renamed to raid_mimage_2, yet retained its "iri-" attr.





# raid1 -> raid5 atttempt
[root@host-073 tmp]# lvcreate --type raid1 -m 1 -n raid -L 100M VG
  Logical volume "raid" created.
[root@host-073 tmp]# lvconvert --yes --splitmirrors 1 --trackchanges VG/raid
  VG/raid_rimage_1 split from VG/raid for read-only purposes.
  WARNING: Any newly written data will be non-resilient on LV VG/raid during the split!
  Use 'lvconvert --merge VG/raid_rimage_1' to merge back into VG/raid.

[root@host-073 tmp]# lvconvert --type raid5 VG/raid
  Using default stripesize 64.00 KiB.
Are you sure you want to convert raid1 LV VG/raid to raid5 type? [y/n]: y
  Logical volume VG/raid successfully converted.

[root@host-073 tmp]# lvs -a -o +devices
  LV              VG  Attr       LSize   Log Cpy%Sync Devices
  raid            VG  rwi-a-r--- 100.00m     100.00   raid_rimage_0(0),raid_rimage_1(0)
  [raid_rimage_0] VG  iwi-aor--- 100.00m              /dev/sda1(1)
  raid_rimage_1   VG  Iri-a-r--- 100.00m              /dev/sda2(1)
  [raid_rmeta_0]  VG  ewi-aor---   4.00m              /dev/sda1(0)
  [raid_rmeta_1]  VG  ewi-a-r---   4.00m              /dev/sda2(0)

# An extend attempt gives a proper error message
[root@host-073 tmp]# lvextend -L +100M VG/raid
  Cannot resize logical volume VG/raid while it is tracking a split image.

# A reshape attempt properly fails, but the error is wrong since it is in sync. The error should be similar to the extend attempt
[root@host-073 tmp]# lvconvert --stripes 3 VG/raid
  Using default stripesize 64.00 KiB.
  Can't reshape out of sync LV VG/raid.
  Reshape request failed on LV VG/raid.

[root@host-073 tmp]# lvconvert --type raid5_n VG/raid
  Using default stripesize 64.00 KiB.
  Can't reshape out of sync LV VG/raid.
  Reshape request failed on LV VG/raid.

# An attempt to convert back to raid1:
[root@host-073 tmp]# lvconvert --type raid1 VG/raid
Are you sure you want to convert raid5 LV VG/raid to raid1 type? [y/n]: y
  device-mapper: reload ioctl on  (253:10) failed: Invalid argument
  Failed to lock logical volume VG/raid.

May 16 17:32:11 host-073 kernel: device-mapper: table: 253:10: raid: Insufficient redundancy to activate array
May 16 17:32:11 host-073 kernel: device-mapper: ioctl: error adding target to table

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 06:22:31 CST 2018
lvm2-libs-2.02.177-4.el7    BUILT: Fri Feb 16 06:22:31 CST 2018
lvm2-cluster-2.02.177-4.el7    BUILT: Fri Feb 16 06:22:31 CST 2018
cmirror-2.02.177-4.el7    BUILT: Fri Feb 16 06:22:31 CST 2018
device-mapper-1.02.146-4.el7    BUILT: Fri Feb 16 06:22:31 CST 2018
device-mapper-libs-1.02.146-4.el7    BUILT: Fri Feb 16 06:22:31 CST 2018
device-mapper-event-1.02.146-4.el7    BUILT: Fri Feb 16 06:22:31 CST 2018
device-mapper-event-libs-1.02.146-4.el7    BUILT: Fri Feb 16 06:22:31 CST 2018
device-mapper-persistent-data-0.7.3-3.el7    BUILT: Tue Nov 14 05:07:18 CST 2017

Comment 2 Heinz Mauelshagen 2018-07-26 00:08:30 UTC
lvm upstream commit a004bb07f14baeed158ac9ea571cf5a6882c436f
to reject conversions of split trackchanges raid1 LVs.

Comment 4 Corey Marthaler 2018-08-08 20:18:27 UTC
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
cmirror-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



[root@host-073 ~]# lvs -a -o +devices
  LV                        VG            Attr       LSize   Pool   Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices                                                                         
  split_tracking            split_image   rwi-a-r--- 500.00m                                      100.00           split_tracking_rimage_0(0),split_tracking_rimage_1(0),split_tracking_rimage_2(0)
  [split_tracking_rimage_0] split_image   iwi-aor--- 500.00m                                                       /dev/sdb1(1)                                                                    
  [split_tracking_rimage_1] split_image   iwi-aor--- 500.00m                                                       /dev/sde1(1)                                                                    
  split_tracking_rimage_2   split_image   Iri---r--- 500.00m                                                       /dev/sdd1(1)                                                                    
  [split_tracking_rmeta_0]  split_image   ewi-aor---   4.00m                                                       /dev/sdb1(0)                                                                    
  [split_tracking_rmeta_1]  split_image   ewi-aor---   4.00m                                                       /dev/sde1(0)                                                                    
  [split_tracking_rmeta_2]  split_image   ewi---r---   4.00m                                                       /dev/sdd1(0)                                                                    

[root@host-073 ~]# lvconvert --yes --type mirror -m 1 split_image/split_tracking
  Conversion of tracking raid1 LV split_image/split_tracking is not supported.
[root@host-073 ~]# lvconvert --yes --type raid4 split_image/split_tracking
  Using default stripesize 64.00 KiB.
  Conversion of tracking raid1 LV split_image/split_tracking is not supported.

Comment 6 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.