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 1284107 - "volume already exists" message needed when attempting to create a cache pool using same name of existing thin pool
Summary: "volume already exists" message needed when attempting to create a cache pool...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.2
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-20 21:26 UTC by Corey Marthaler
Modified: 2021-09-03 12:52 UTC (History)
7 users (show)

Fixed In Version: lvm2-2.02.171-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 21:47: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 Corey Marthaler 2015-11-20 21:26:50 UTC
Description of problem:

# Create thin pool
[root@host-122 ~]# lvcreate --thin-pool thinpool -L 100M vg
  Logical volume "thinpool" created.

# Attempt to create cache pool using same name
[root@host-122 ~]# lvcreate --cache-pool thinpool -L 100M vg
  Internal error: Unsupported creation of cache and cache pool volume.



# Reversed, Create cache pool
[root@host-122 ~]# lvcreate --type cache-pool -n cpool -L 100M vg
  Logical volume "cpool" created.

# Attempt to create thin pool using same name
[root@host-122 ~]# lvcreate --thin-pool cpool -L 100M vg
  Logical volume cpool already exists in Volume group vg.




Version-Release number of selected component (if applicable):

3.10.0-327.el7.x86_64

lvm2-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
lvm2-libs-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
lvm2-cluster-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-1.02.107-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-libs-1.02.107-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-event-1.02.107-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-event-libs-1.02.107-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-persistent-data-0.5.5-1.el7    BUILT: Thu Aug 13 09:58:10 CDT 2015
cmirror-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
sanlock-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
sanlock-lib-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
lvm2-lockd-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015

Comment 1 Corey Marthaler 2016-09-21 19:50:36 UTC
Still in the latest 7.3, proposing for 7.4 now...


3.10.0-501.el7.x86_64
lvm2-2.02.165-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
lvm2-libs-2.02.165-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
lvm2-cluster-2.02.165-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-1.02.134-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-libs-1.02.134-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-event-1.02.134-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-event-libs-1.02.134-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-persistent-data-0.6.3-1.el7    BUILT: Fri Jul 22 05:29:13 CDT 2016



SCENARIO - [already_exists]
Create a both a cache pool and thin pool and then attempt to create the other type using existing names

*** Cache info for this scenario ***
*  origin (slow):  /dev/sda1
*  pool (fast):    /dev/sde1
************************************

Adding "slow" and "fast" tags to corresponding pvs
Create a both a cache pool and thin pool and then attempt to create the other type using existing names
lvcreate  --thin-pool Tpool -L 100M cache_sanity
lvcreate  --type cache-pool -n Cpool -L 100M cache_sanity @fast

lvcreate  --cache-pool Tpool -L 100M cache_sanity
Errors found, possibly bug 1284107
  Using default stripesize 64.00 KiB.
  Internal error: Unsupported creation of cache and cache pool volume.
lvcreate  --thin-pool Cpool -L 100M cache_sanity

Comment 2 Zdenek Kabelac 2017-01-22 20:57:11 UTC
Should be already fixed in upstream so ready for 7.4.

Comment 4 Corey Marthaler 2017-05-18 19:40:24 UTC
Still in the latest 7.4 rpms.


[root@host-076 ~]# lvcreate  --thin-pool Tpool -L 100M VG
  Using default stripesize 64.00 KiB.
  Logical volume "Tpool" created.

[root@host-076 ~]# lvcreate  --type cache-pool -n Cpool -L 100M VG
  Using default stripesize 64.00 KiB.
  Logical volume "Cpool" created.

[root@host-076 ~]# lvs -a -o +devices
  LV              VG  Attr       LSize   Pool Origin Data%  Meta% Devices
  Cpool           VG  Cwi---C--- 100.00m                          Cpool_cdata(0)
  [Cpool_cdata]   VG  Cwi------- 100.00m                          /dev/sdb1(29)
  [Cpool_cmeta]   VG  ewi-------   8.00m                          /dev/sdb1(27)
  Tpool           VG  twi-a-tz-- 100.00m             0.00   0.88  Tpool_tdata(0)
  [Tpool_tdata]   VG  Twi-ao---- 100.00m                          /dev/sdb1(1)
  [Tpool_tmeta]   VG  ewi-ao----   4.00m                          /dev/sda1(0)
  [lvol0_pmspare] VG  ewi-------   8.00m                          /dev/sdb1(0)
  [lvol0_pmspare] VG  ewi-------   8.00m                          /dev/sdb1(26)

[root@host-076 ~]# lvcreate  --cache-pool Tpool -L 100M VG
  Using default stripesize 64.00 KiB.
  Internal error: Unsupported creation of cache and cache pool volume.

[root@host-076 ~]# lvcreate  --thin-pool Cpool -L 100M VG
  Using default stripesize 64.00 KiB.
  Logical volume Cpool already exists in Volume group VG.


3.10.0-666.el7.x86_64
lvm2-2.02.171-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
lvm2-libs-2.02.171-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
lvm2-cluster-2.02.171-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
device-mapper-1.02.140-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
device-mapper-libs-1.02.140-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
device-mapper-event-1.02.140-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
device-mapper-event-libs-1.02.140-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
device-mapper-persistent-data-0.7.0-0.1.rc6.el7    BUILT: Mon Mar 27 10:15:46 CDT 2017

Comment 5 Zdenek Kabelac 2017-06-09 18:46:41 UTC
Hmm got somehow lost in code and in my test it's likely been reject for other reason. 

Anyway - looked through it again - and found missing validation inside lvcreate part of code and upstreamed proper fix patch:

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

Comment 6 Corey Marthaler 2017-06-15 19:24:11 UTC
Fix verified in the latest rpms.

lvm2-2.02.171-5.el7    BUILT: Wed Jun 14 10:33:32 CDT 2017
lvm2-libs-2.02.171-5.el7    BUILT: Wed Jun 14 10:33:32 CDT 2017
lvm2-cluster-2.02.171-5.el7    BUILT: Wed Jun 14 10:33:32 CDT 2017
device-mapper-1.02.140-5.el7    BUILT: Wed Jun 14 10:33:32 CDT 2017
device-mapper-libs-1.02.140-5.el7    BUILT: Wed Jun 14 10:33:32 CDT 2017
device-mapper-event-1.02.140-5.el7    BUILT: Wed Jun 14 10:33:32 CDT 2017
device-mapper-event-libs-1.02.140-5.el7    BUILT: Wed Jun 14 10:33:32 CDT 2017
device-mapper-persistent-data-0.7.0-0.1.rc6.el7    BUILT: Mon Mar 27 10:15:46 CDT 2017


[root@harding-03 ~]# lvcreate  --cache-pool Tpool -L 100M cache_sanity
  Using default stripesize 64.00 KiB.
  Logical volume cache_sanity/Tpool is not a cache pool.

[root@harding-03 ~]# lvcreate  --thin-pool Cpool -L 100M cache_sanity
  Using default stripesize 64.00 KiB.
  Logical volume Cpool already exists in Volume group cache_sanity.

Comment 7 errata-xmlrpc 2017-08-01 21:47: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.