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 1806063 - "bcache_invalidate: block still dirty" when attempting to use already in use writecache pool internal volume
Summary: "bcache_invalidate: block still dirty" when attempting to use already in use ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lvm2
Version: 8.2
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: rc
: 8.0
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-21 22:06 UTC by Corey Marthaler
Modified: 2021-09-07 11:52 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.03.09-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 02:00:25 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:42 UTC

Description Corey Marthaler 2020-02-21 22:06:21 UTC
Description of problem:
I thought I had already filed a bug similar to this, but did see anything in BZ. LVM should probably handle this unlikely scenario better.


[root@host-092 archive]# lvcreate --wipesignatures y  -L 1G -n origin_1 writecache_sanity @slow
  Logical volume "origin_1" created.
[root@host-092 archive]# lvcreate --wipesignatures y  -L 1G -n origin_2 writecache_sanity @slow
  Logical volume "origin_2" created.
[root@host-092 archive]# lvcreate  -L 1G -n multiple_origins writecache_sanity @fast
  Logical volume "multiple_origins" created.

[root@host-092 archive]# lvs -a -o +devices
  LV               VG                Attr       LSize   Pool   Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices
  multiple_origins writecache_sanity -wi-a-----   1.00g                                                       /dev/sdd1(0)
  origin_1         writecache_sanity -wi-a-----   1.00g                                                       /dev/sdc1(0)
  origin_2         writecache_sanity -wi-a-----   1.00g                                                       /dev/sdc1(256)

[root@host-092 archive]# lvchange -an writecache_sanity

# Create writecache using pool (writecache_sanity/multiple_origins) and origin_1
[root@host-092 archive]# lvconvert --yes --type writecache --cachevol writecache_sanity/multiple_origins writecache_sanity/origin_1
  Logical volume writecache_sanity/origin_1 now has write cache.

[root@host-092 archive]# lvs -a -o +devices
  LV                      VG                Attr       LSize   Pool                    Origin            Data%  Meta%  Move Log Cpy%Sync Convert Devices
  [multiple_origins_cvol] writecache_sanity Cwi---C---   1.00g                                                                                   /dev/sdd1(0)
  origin_1                writecache_sanity Cwi---C---   1.00g [multiple_origins_cvol] [origin_1_wcorig]                                         origin_1_wcorig(0)
  [origin_1_wcorig]       writecache_sanity owi---C---   1.00g                                                                                   /dev/sdc1(0)
  origin_2                writecache_sanity -wi-------   1.00g                                                                                   /dev/sdc1(256)

#  Attempt to create writecache using same pool (writecache_sanity/multiple_origins) and origin_2
[root@host-092 archive]# lvconvert --yes --type writecache --cachevol writecache_sanity/multiple_origins writecache_sanity/origin_2
  LV writecache_sanity/multiple_origins not found.

#  Attempt to create writecache using same pool *but internal volume* (writecache_sanity/multiple_origins) and origin_2
[root@host-092 archive]# lvconvert --yes --type writecache --cachevol writecache_sanity/multiple_origins_cvol writecache_sanity/origin_2
  Error writing device /dev/writecache_sanity/multiple_origins_cvol at 0 length 512.
  bcache_invalidate: block (3, 0) still dirty
  Cannot rename internal LV "multiple_origins_cvol".


[root@host-092 archive]# lvs -a -o +devices
  LV                      VG                Attr       LSize   Pool                    Origin            Data%  Meta%  Move Log Cpy%Sync Convert Devices
  [multiple_origins_cvol] writecache_sanity Cwi---C---   1.00g                                                                                   /dev/sdd1(0)
  origin_1                writecache_sanity Cwi---C---   1.00g [multiple_origins_cvol] [origin_1_wcorig]                                         origin_1_wcorig(0)
  [origin_1_wcorig]       writecache_sanity owi---C---   1.00g                                                                                   /dev/sdc1(0)
  origin_2                writecache_sanity -wi-------   1.00g                                                                                   /dev/sdc1(256)


Version-Release number of selected component (if applicable):
kernel-4.18.0-179.el8    BUILT: Fri Feb 14 17:03:01 CST 2020
lvm2-2.03.08-1.el8    BUILT: Tue Feb 11 07:40:33 CST 2020
lvm2-libs-2.03.08-1.el8    BUILT: Tue Feb 11 07:40:33 CST 2020
lvm2-dbusd-2.03.08-1.el8    BUILT: Tue Feb 11 07:42:51 CST 2020
lvm2-lockd-2.03.08-1.el8    BUILT: Tue Feb 11 07:40:33 CST 2020
boom-boot-1.0-1.el8    BUILT: Fri Nov 29 05:18:30 CST 2019
device-mapper-1.02.169-1.el8    BUILT: Tue Feb 11 07:40:33 CST 2020
device-mapper-libs-1.02.169-1.el8    BUILT: Tue Feb 11 07:40:33 CST 2020
device-mapper-event-1.02.169-1.el8    BUILT: Tue Feb 11 07:40:33 CST 2020
device-mapper-event-libs-1.02.169-1.el8    BUILT: Tue Feb 11 07:40:33 CST 2020


How reproducible:
Everytime

Comment 1 David Teigland 2020-05-22 19:14:12 UTC
fix in master:
https://sourceware.org/git/?p=lvm2.git;a=commit;h=74a211cfd30e93d9388de5ac1ee22e630c840e94

[root@null-01 lvm.git]# lvs -a test
  LV                VG   Attr       LSize  Pool              Origin        
  main              test Cwi---C--- 64.00m [main_cache_cvol] [main_wcorig]
  main2             test -wi------- 32.00m                                
  [main_cache_cvol] test Cwi---C--- 40.00m                                
  [main_wcorig]     test owi---C--- 64.00m           

[root@null-01 lvm.git]# lvconvert --type writecache --cachevol test/main_cache_cvol test/main2 
  LV test/main_cache_cvol is already used as a cachevol.

[root@null-01 lvm.git]# lvconvert --type cache --cachepool test/main_cache_cvol test/main2 
  LV test/main_cache_cvol is already used as a cachevol.

[root@null-01 lvm.git]# lvconvert --type cache --cachevol test/main_cache_cvol test/main2 
  LV test/main_cache_cvol is already used as a cachevol.

Comment 6 Corey Marthaler 2020-06-11 04:01:42 UTC
Fixed verified in the latest rpms.

kernel-4.18.0-211.el8    BUILT: Thu Jun  4 03:33:39 CDT 2020
lvm2-2.03.09-2.el8    BUILT: Fri May 29 11:29:58 CDT 2020
lvm2-libs-2.03.09-2.el8    BUILT: Fri May 29 11:29:58 CDT 2020
lvm2-dbusd-2.03.09-2.el8    BUILT: Fri May 29 11:32:49 CDT 2020
lvm2-lockd-2.03.09-2.el8    BUILT: Fri May 29 11:29:58 CDT 2020
boom-boot-1.1-1.el8    BUILT: Thu May 14 08:11:56 CDT 2020
device-mapper-1.02.171-2.el8    BUILT: Fri May 29 11:29:58 CDT 2020
device-mapper-libs-1.02.171-2.el8    BUILT: Fri May 29 11:29:58 CDT 2020
device-mapper-event-1.02.171-2.el8    BUILT: Fri May 29 11:29:58 CDT 2020
device-mapper-event-libs-1.02.171-2.el8    BUILT: Fri May 29 11:29:58 CDT 2020
device-mapper-persistent-data-0.8.5-3.el8    BUILT: Wed Nov 27 07:05:21 CST 2019


[root@hayes-02 ~]# lvcreate --wipesignatures y  -L 1G -n origin_1 writecache_sanity @slow
  Logical volume "origin_1" created.
[root@hayes-02 ~]# lvcreate --wipesignatures y  -L 1G -n origin_2 writecache_sanity @slow
  Logical volume "origin_2" created.
[root@hayes-02 ~]# lvcreate  -L 1G -n multiple_origins writecache_sanity @fast
  Logical volume "multiple_origins" created.
[root@hayes-02 ~]# lvs -a -o +devices
  LV               VG                Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices       
  multiple_origins writecache_sanity -wi-a----- 1.00g                                                     /dev/sdi1(0)  
  origin_1         writecache_sanity -wi-a----- 1.00g                                                     /dev/sde1(0)  
  origin_2         writecache_sanity -wi-a----- 1.00g                                                     /dev/sde1(256)
[root@hayes-02 ~]# lvchange -an writecache_sanity
[root@hayes-02 ~]# lvconvert --yes --type writecache --cachevol writecache_sanity/multiple_origins writecache_sanity/origin_1
  Logical volume writecache_sanity/origin_1 now has write cache.
[root@hayes-02 ~]# lvs -a -o +devices
  LV                      VG                Attr       LSize Pool                    Origin            Data%  Meta%  Move Log Cpy%Sync Convert Devices           
  [multiple_origins_cvol] writecache_sanity Cwi---C--- 1.00g                                                                                   /dev/sdi1(0)      
  origin_1                writecache_sanity Cwi---C--- 1.00g [multiple_origins_cvol] [origin_1_wcorig]                                         origin_1_wcorig(0)
  [origin_1_wcorig]       writecache_sanity owi---C--- 1.00g                                                                                   /dev/sde1(0)      
  origin_2                writecache_sanity -wi------- 1.00g                                                                                   /dev/sde1(256)    
[root@hayes-02 ~]# lvconvert --yes --type writecache --cachevol writecache_sanity/multiple_origins writecache_sanity/origin_2
  LV writecache_sanity/multiple_origins not found.
[root@hayes-02 ~]# lvconvert --yes --type writecache --cachevol writecache_sanity/multiple_origins_cvol writecache_sanity/origin_2
  LV writecache_sanity/multiple_origins_cvol is already used as a cachevol.
[root@hayes-02 ~]# lvs -a -o +devices
  LV                      VG                Attr       LSize Pool                    Origin            Data%  Meta%  Move Log Cpy%Sync Convert Devices           
  [multiple_origins_cvol] writecache_sanity Cwi---C--- 1.00g                                                                                   /dev/sdi1(0)      
  origin_1                writecache_sanity Cwi---C--- 1.00g [multiple_origins_cvol] [origin_1_wcorig]                                         origin_1_wcorig(0)
  [origin_1_wcorig]       writecache_sanity owi---C--- 1.00g                                                                                   /dev/sde1(0)      
  origin_2                writecache_sanity -wi------- 1.00g                                                                                   /dev/sde1(256)

Comment 9 errata-xmlrpc 2020-11-04 02:00:25 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.