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 1859412 - either "_cache" should be a reserved string or single cmd conversion attempts should try a different name for its tmp volume after it finds "origin_cache" is already taken
Summary: either "_cache" should be a reserved string or single cmd conversion attempts...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lvm2
Version: 8.3
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: 8.0
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-22 00:13 UTC by Corey Marthaler
Modified: 2021-09-07 11:57 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.03.09-4.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 02:00:38 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4546 0 None None None 2020-11-04 02:00:51 UTC

Description Corey Marthaler 2020-07-22 00:13:32 UTC
Description of problem:
[root@hayes-03 ~]# lvcreate --wipesignatures y  -L 4G -n corey writecache_sanity @slow
  Logical volume "corey" created.
[root@hayes-03 ~]# lvcreate --wipesignatures y  -L 4G -n corey_cache writecache_sanity @slow
  Logical volume "corey_cache" created.

[root@hayes-03 ~]# lvs -a -o +devices
  LV          VG                Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices
  corey       writecache_sanity -wi-a----- 4.00g                                                     /dev/sde1(0)
  corey_cache writecache_sanity -wi-a----- 4.00g                                                     /dev/sde1(1024)

[root@hayes-03 ~]# lvconvert --type writecache --cachedevice /dev/sdf1 --cachesize 2G writecache_sanity/corey
  Creating cachevol LV corey_cache with size 2.00 GiB.
  Logical Volume "corey_cache" already exists in volume group "writecache_sanity"
  Failed to create cachevol LV

[root@hayes-03 ~]# lvconvert --test --type writecache --cachedevice /dev/sdf1 --cachesize 2G writecache_sanity/corey
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  Creating cachevol LV corey_cache with size 2.00 GiB.
  Logical Volume "corey_cache" already exists in volume group "writecache_sanity"
  Failed to create cachevol LV


Version-Release number of selected component (if applicable):
kernel-4.18.0-221.el8    BUILT: Thu Jun 25 16:28:39 CDT 2020
lvm2-2.03.09-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020
lvm2-libs-2.03.09-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020
lvm2-dbusd-2.03.09-3.el8    BUILT: Mon Jun 29 13:53:38 CDT 2020
lvm2-lockd-2.03.09-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020
boom-boot-1.2-2.el8    BUILT: Mon Jun 29 08:27:02 CDT 2020
device-mapper-1.02.171-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020
device-mapper-libs-1.02.171-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020
device-mapper-event-1.02.171-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020
device-mapper-event-libs-1.02.171-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020

Comment 1 David Teigland 2020-07-22 16:39:30 UTC
Reserved suffixes are added to top level LV names when they become hidden.  When creating a cachevol, lvm is creating a top level LV name which needs to exist next to other top level LVs.  The _cvol suffix is then added to the cachevol name when it's attached, e.g. corey_cache is the top level LV name, it becomes corey_cache_cvol when attached, and corey_cache again when detached.  So, that leaves trying different names when necessary to avoid a collision, e.g. corey_cache%d.

Comment 2 David Teigland 2020-07-23 18:23:40 UTC
pushed to master:
https://sourceware.org/git/?p=lvm2.git;a=commit;h=085760992dc68efbda8fe8e1ad4a5a2eccef9139

# lvs -a test
  LV       VG   Attr       LSize 
  ww_cache test -wi------- 4.00m

# lvcreate --type writecache --cachesize 64M --cachedevice /dev/sdc -n ww -L 128M test /dev/sdb
  Logical volume "ww" created.
  Creating cachevol LV ww_cache0 with size 64.00 MiB.
  Logical volume "ww_cache0" created.
  Using writecache block size 512 for unknown file system block size, logical block size 512, physical block size 512.
  Logical volume test/ww now has writecache.

# lvs -a test
  LV               VG   Attr       LSize   Pool             Origin      Data%  
  ww               test Cwi-a-C--- 128.00m [ww_cache0_cvol] [ww_wcorig] 0.00  
  ww_cache         test -wi-------   4.00m                                    
  [ww_cache0_cvol] test Cwi-aoC---  64.00m                                    
  [ww_wcorig]      test owi-aoC--- 128.00m               

# lvconvert --splitcache test/ww
  Logical volume test/ww writecache has been detached.

# lvs -a test
  LV        VG   Attr       LSize   
  ww        test -wi-a----- 128.00m
  ww_cache  test -wi-------   4.00m
  ww_cache0 test -wi-------  64.00m

Comment 5 Corey Marthaler 2020-08-17 16:51:37 UTC
Fix verified in the latest rpms.

kernel-4.18.0-232.el8    BUILT: Mon Aug 10 02:17:54 CDT 2020
lvm2-2.03.09-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020
lvm2-libs-2.03.09-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020
lvm2-lockd-2.03.09-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-1.02.171-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-libs-1.02.171-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-event-1.02.171-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-event-libs-1.02.171-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020


[root@hayes-01 ~]# lvcreate --wipesignatures y  -L 4G -n corey writecache_sanity @slow
  Logical volume "corey" created.
[root@hayes-01 ~]# lvcreate --wipesignatures y  -L 4G -n corey_cache writecache_sanity @slow
  Logical volume "corey_cache" created.
[root@hayes-01 ~]# lvs -a -o +devices
  LV          VG                Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices        
  corey       writecache_sanity -wi-a----- 4.00g                                                     /dev/sdb1(0)   
  corey_cache writecache_sanity -wi-a----- 4.00g                                                     /dev/sdb1(1024)

[root@hayes-01 ~]# lvconvert --type writecache --cachedevice /dev/sdf1 --cachesize 2G writecache_sanity/corey
  Creating cachevol LV corey_cache0 with size 2.00 GiB.
  Logical volume "corey_cache0" created.
  Using writecache block size 512 for unknown file system block size, logical block size 512, physical block size 512.
  Logical volume writecache_sanity/corey now has writecache.

Comment 8 errata-xmlrpc 2020-11-04 02:00:38 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 (lvm2 bug fix and enhancement update), 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-2020:4546


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