Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionCorey Marthaler
2020-07-21 22:08:06 UTC
Description of problem:
[root@hayes-03 ~]# lvcreate --wipesignatures y -L 4G -n single writecache_sanity @slow
Logical volume "single" created.
[root@hayes-03 ~]# lvs -a -o +devices,segtype
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices Type
single writecache_sanity -wi-a----- 4.00g /dev/sde1(0) linear
# I don't want to use all ~1860G
[root@hayes-03 ~]# lvconvert --type writecache --cachedevice /dev/sdn1 --cachedevice /dev/sdm1 writecache_sanity/single
Use all <930.76 GiB from /dev/sdn1 for cache? [y/n]: n
Use --cachesize SizeMB to use a part of the cachedevice.
Conversion aborted.
[root@hayes-03 ~]# lvconvert --type writecache --cachedevice /dev/sdn1 --cachesize 2G --cachedevice /dev/sdm1 --cachesize 2G writecache_sanity/single
Option --cachesize may not be repeated.
Error during parsing of command line.
# Using the entirety of the devices results in the process being killed due to bug 1855038, and you end up with unused "_cache" devices
[root@hayes-03 ~]# lvconvert --type writecache --cachedevice /dev/sdn1 --cachedevice /dev/sdm1 --cachesize 1800G writecache_sanity/single
Creating cachevol LV single_cache with size <1.76 TiB.
Logical volume "single_cache" created.
Using writecache block size 512 for unknown file system block size, logical block size 512, physical block size 4096.
Killed
[root@hayes-03 ~]# lvs -a -o +devices,segtype
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices Type
single writecache_sanity -wi-a----- 4.00g /dev/sde1(0) linear
single_cache writecache_sanity -wi------- <1.76t /dev/sdn1(0) linear
single_cache writecache_sanity -wi------- <1.76t /dev/sdm1(0) linear
[root@hayes-03 ~]# lvremove -f writecache_sanity/single_cache
Logical volume "single_cache" successfully removed
[root@hayes-03 ~]# lvconvert --type writecache --cachedevice /dev/sdn1 --cachedevice /dev/sdm1 --cachesize 8G writecache_sanity/single
Creating cachevol LV single_cache with size 8.00 GiB.
Logical volume "single_cache" created.
Using writecache block size 512 for unknown file system block size, logical block size 512, physical block size 4096.
device-mapper: create ioctl on writecache_sanity-single_cache_cvol LVM-e3lLEZuDwfJugVxfuQk08fHYybd1YF9aH60NmP2roHij0T43mUIxZy0Oaoc09Nzw-cvol failed: Device or resource busy
Failed to suspend logical volume writecache_sanity/single.
# Reboot to get around the issues caused above...
# Using less space than the first device has will result in dropping the second device on the floor
[root@hayes-03 ~]# lvconvert --type writecache --cachedevice /dev/sdn1 --cachedevice /dev/sdm1 --cachesize 8G writecache_sanity/single
Creating cachevol LV single_cache with size 8.00 GiB.
Logical volume "single_cache" created.
Using writecache block size 512 for unknown file system block size, logical block size 512, physical block size 4096.
Logical volume writecache_sanity/single now has writecache.
[root@hayes-03 ~]# lvs -a -o +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
single writecache_sanity Cwi-a-C--- 4.00g [single_cache_cvol] [single_wcorig] 0.00 single_wcorig(0)
[single_cache_cvol] writecache_sanity Cwi-aoC--- 8.00g /dev/sdn1(0)
[single_wcorig] writecache_sanity owi-aoC--- 4.00g /dev/sde1(0)
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