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 1462712 - lvm2: can not set raid type to thin pool
Summary: lvm2: can not set raid type to thin pool
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: Bruno Goncalves
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-19 11:45 UTC by Bruno Goncalves
Modified: 2021-09-03 12:50 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.02.171-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 21:54:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2222 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2017-08-01 18:42:41 UTC

Description Bruno Goncalves 2017-06-19 11:45:00 UTC
Description of problem:
Can not set a thin pool to use RAID type.

lvconvert --type raid1 --mirrors 3 --yes testvg/pool_tdata
  testvg/pool_tdata must be active to perform this operation.
ERROR: lvconvert --type raid1 --mirrors 3 --yes testvg/pool_tdata


If 'testvg/pool_tdata' is deactivated it also does not work.

lvconvert --type raid1 --mirrors 3 --yes testvg/pool_tdata
  Can't add image to active thin pool LV testvg/pool_tdata yet. Deactivate first.


Version-Release number of selected component (if applicable):
kernel-3.10.0-681.el7
lvm2-2.02.171-5.el7

How reproducible:
100%

Steps to Reproduce:
1.Create a Thin pool
vgcreate --force testvg  /dev/loop2 /dev/loop1 /dev/loop0 /dev/loop3
lvcreate -L4M --thin testvg/pool

2. Deactivate the pool
lvchange -an testvg/pool

3. Try to set the pool to RAID
lvconvert --type raid1 --mirrors 3 --yes testvg/pool_tdata
  testvg/pool_tdata must be active to perform this operation.
ERROR: lvconvert --type raid1 --mirrors 3 --yes testvg/pool_tdata

Comment 1 Bruno Goncalves 2017-06-19 11:49:30 UTC
I do not know how serious this is, but this works on RHEL-7.3 and also with RHEL-7.4 Snapshot#3 (kernel-3.10.0-675.el7, lvm2-2.02.171-2.el7)

lvchange -an testvg/pool

lvconvert --type raid1 --mirrors 3 --yes testvg/pool_tdata
  Logical volume testvg/pool_tdata successfully converted.

Comment 4 Zdenek Kabelac 2017-06-19 18:37:51 UTC
Seems we are at  Catch 22  now  with Bug 1365286.

And the only way forward is to fix original bug which resulted into hotfix actually disabling raids for thin-pool.

Comment 6 Zdenek Kabelac 2017-06-19 21:41:12 UTC
Functionality restored with commit:

https://www.redhat.com/archives/lvm-devel/2017-June/msg00069.html

Now it should be again possible to change thin_pool _tdata & _tmeta to raid and back.

Comment 8 Corey Marthaler 2017-06-21 17:26:08 UTC
Fix verified in the latest rpms, thus *reversing* behavior verified in bug 1365286.

3.10.0-685.el7.x86_64
lvm2-2.02.171-6.el7    BUILT: Wed Jun 21 09:35:03 CDT 2017
lvm2-libs-2.02.171-6.el7    BUILT: Wed Jun 21 09:35:03 CDT 2017
lvm2-cluster-2.02.171-6.el7    BUILT: Wed Jun 21 09:35:03 CDT 2017
device-mapper-1.02.140-6.el7    BUILT: Wed Jun 21 09:35:03 CDT 2017
device-mapper-libs-1.02.140-6.el7    BUILT: Wed Jun 21 09:35:03 CDT 2017
device-mapper-event-1.02.140-6.el7    BUILT: Wed Jun 21 09:35:03 CDT 2017
device-mapper-event-libs-1.02.140-6.el7    BUILT: Wed Jun 21 09:35:03 CDT 2017
device-mapper-persistent-data-0.7.0-0.1.rc6.el7    BUILT: Mon Mar 27 10:15:46 CDT 2017


[root@host-094 ~]# lvcreate -L4M --thin testvg/pool
  Using default stripesize 64.00 KiB.
  Thin pool volume with chunk size 64.00 KiB can address at most 15.81 TiB of data.
  Logical volume "pool" created.

[root@host-094 ~]# lvchange -an testvg/pool
[root@host-094 ~]# lvconvert --type raid1 --mirrors 3 --yes testvg/pool_tdata
  testvg/pool_tdata must be active to perform this operation.

[root@host-094 ~]# lvchange -ay testvg/pool
[root@host-094 ~]# lvconvert --type raid1 --mirrors 3 --yes testvg/pool_tdata
  Logical volume testvg/pool_tdata successfully converted.

[root@host-094 ~]# lvs -a -o +devices
  LV                    VG       Attr       LSize Pool Origin Data%  Meta% Cpy%Sync Devices
  [lvol0_pmspare]       testvg   ewi------- 4.00m                                   /dev/sda1(0)
  pool                  testvg   twi-a-tz-- 4.00m             0.00   0.88           pool_tdata(0)
  [pool_tdata]          testvg   rwi-aor--- 4.00m                          100.00   pool_tdata_rimage_0(0),pool_tdata_rimage_1(0),pool_tdata_rimage_2(0),pool_tdata_rimage_3(0)
  [pool_tdata_rimage_0] testvg   iwi-aor--- 4.00m                                   /dev/sda1(1)
  [pool_tdata_rimage_1] testvg   iwi-aor--- 4.00m                                   /dev/sdb1(1)
  [pool_tdata_rimage_2] testvg   iwi-aor--- 4.00m                                   /dev/sdc1(1)
  [pool_tdata_rimage_3] testvg   iwi-aor--- 4.00m                                   /dev/sdd1(1)
  [pool_tdata_rmeta_0]  testvg   ewi-aor--- 4.00m                                   /dev/sda1(2)
  [pool_tdata_rmeta_1]  testvg   ewi-aor--- 4.00m                                   /dev/sdb1(0)
  [pool_tdata_rmeta_2]  testvg   ewi-aor--- 4.00m                                   /dev/sdc1(0)
  [pool_tdata_rmeta_3]  testvg   ewi-aor--- 4.00m                                   /dev/sdd1(0)
  [pool_tmeta]          testvg   ewi-ao---- 4.00m                                   /dev/sdh1(0)

Comment 9 Bruno Goncalves 2017-07-03 07:55:45 UTC
Now there is a change on behavior when it is possible to change RAID type.

On RHEL-7.3 the pool needed to be deactivate to perform lvconvert. Now the pool needs to be active. Is this correct?

 
Active pool:
# lvconvert --type raid1 --mirrors 3 --yes testvg/pool_tdata
  Logical volume testvg/pool_tdata successfully converted.


Deactivated pool:
# lvchange -an testvg/pool
# lvconvert --type raid1 --mirrors 3 --yes testvg/pool_tdata
  testvg/pool_tdata must be active to perform this operation.


Tested with lvm2-2.02.171-8.el7

Comment 10 Jonathan Earl Brassow 2017-07-05 15:14:21 UTC
couldn't hurt to have a release note about this, but this is a necessary change in behavior.  We cannot change the behavior back without introducing worse problems - at least not until we have more complex operations to perform an up-convert.

Comment 11 errata-xmlrpc 2017-08-01 21:54:18 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-2017:2222


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