Bug 1859412
Summary: | 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 | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Corey Marthaler <cmarthal> |
Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> |
lvm2 sub component: | Cache Logical Volumes | QA Contact: | cluster-qe <cluster-qe> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | low | ||
Priority: | unspecified | CC: | agk, heinzm, jbrassow, mcsontos, msnitzer, pasik, prajnoha, teigland, zkabelac |
Version: | 8.3 | ||
Target Milestone: | rc | ||
Target Release: | 8.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | lvm2-2.03.09-4.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-11-04 02:00:38 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: | |
Embargoed: |
Description
Corey Marthaler
2020-07-22 00:13:32 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. 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 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. 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 |