Description of problem: Currently the LV must be inactive before lvconvert --splitcache|--uncache can be used. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
pushed to master: https://sourceware.org/git/?p=lvm2.git;a=commit;h=240062a18365a7f6725ebcf1b035a6e0a3b12803
Fix verified in the latest rpms. kernel-4.18.0-215.el8 BUILT: Tue Jun 16 14:14:53 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 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 [root@hayes-01 ~]# lvcreate --wipesignatures y -L 4G -n split_cache writecache_sanity @slow Logical volume "split_cache" created. [root@hayes-01 ~]# lvcreate --wipesignatures y -L 4G -n un_cache writecache_sanity @slow Logical volume "un_cache" created. [root@hayes-01 ~]# lvcreate -L 4G -n pool1 writecache_sanity @fast Logical volume "pool1" created. [root@hayes-01 ~]# lvcreate -L 4G -n pool2 writecache_sanity @fast Logical volume "pool2" created. [root@hayes-01 ~]# lvchange -an writecache_sanity/pool1 writecache_sanity/pool2 [root@hayes-01 ~]# lvconvert --yes --type writecache --cachevol writecache_sanity/pool1 writecache_sanity/split_cache Using writecache block size 512 for unknown file system block size, logical block size 512, physical block size 512. Logical volume writecache_sanity/split_cache now has writecache. [root@hayes-01 ~]# lvconvert --yes --type writecache --cachevol writecache_sanity/pool2 writecache_sanity/un_cache Using writecache block size 512 for unknown file system block size, logical block size 512, physical block size 512. Logical volume writecache_sanity/un_cache now has writecache. [root@hayes-01 ~]# lvs -a -o +devices,segtype LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices Type [pool1_cvol] writecache_sanity Cwi-aoC--- 4.00g /dev/sdi1(0) linear [pool2_cvol] writecache_sanity Cwi-aoC--- 4.00g /dev/sdi1(1024) linear split_cache writecache_sanity Cwi-a-C--- 4.00g [pool1_cvol] [split_cache_wcorig] 0.00 split_cache_wcorig(0) writecache [split_cache_wcorig] writecache_sanity owi-aoC--- 4.00g /dev/sdh1(0) linear un_cache writecache_sanity Cwi-a-C--- 4.00g [pool2_cvol] [un_cache_wcorig] 0.00 un_cache_wcorig(0) writecache [un_cache_wcorig] writecache_sanity owi-aoC--- 4.00g /dev/sdh1(1024) linear # active splitcache [root@hayes-01 ~]# lvconvert --splitcache writecache_sanity/split_cache Logical volume writecache_sanity/split_cache writecache has been detached. # active uncache [root@hayes-01 ~]# lvconvert --uncache writecache_sanity/un_cache Logical volume writecache_sanity/un_cache writecache has been detached. Logical volume "pool2" successfully removed [root@hayes-01 ~]# lvs -a -o +devices,segtype LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices Type pool1 writecache_sanity -wi------- 4.00g /dev/sdi1(0) linear split_cache writecache_sanity -wi-a----- 4.00g /dev/sdh1(0) linear un_cache writecache_sanity -wi-a----- 4.00g /dev/sdh1(1024) linear
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