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 1964622 - unable to remove writecache converted thinpool volume
Summary: unable to remove writecache converted thinpool volume
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lvm2
Version: 8.5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: beta
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-25 19:12 UTC by Corey Marthaler
Modified: 2021-11-10 08:57 UTC (History)
7 users (show)

Fixed In Version: lvm2-2.03.12-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:45:54 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-2021:4431 0 None None None 2021-11-09 19:46:18 UTC

Description Corey Marthaler 2021-05-25 19:12:03 UTC
Description of problem:
I assume this is the exact bug mentioned here:
https://bugzilla.redhat.com/show_bug.cgi?id=1957898#c4

I thought this may have been fixed in the latest lvm rpms when attempting this but it appears it's not. Filing this to track this for rhel8.5

[root@hayes-01 ~]# lvcreate -n wc -L 2G snapper_thinp /dev/sdc1
  Logical volume "wc" created.

[root@hayes-01 ~]# lvchange -an snapper_thinp/wc

[root@hayes-01 ~]# lvconvert --yes --type writecache --cachevol snapper_thinp/wc  snapper_thinp/POOL
  Using writecache block size 512 for unknown file system block size, logical block size 512, physical block size 512.
  Logical volume snapper_thinp/POOL now has writecache.

[root@hayes-01 ~]# lvs -a -o +devices
  LV                  VG            Attr       LSize Pool      Origin              Data%  Meta%  Move Log Cpy%Sync Convert Devices             
  POOL                snapper_thinp twi-a-t--- 1.00g                               0.00   10.94                            POOL_tdata(0)       
  [POOL_tdata]        snapper_thinp Cwi-aoC--- 1.00g [wc_cvol] [POOL_tdata_wcorig] 0.00                                    POOL_tdata_wcorig(0)
  [POOL_tdata_wcorig] snapper_thinp owi-aoC--- 1.00g                                                                       /dev/sdb1(1)        
  [POOL_tmeta]        snapper_thinp ewi-ao---- 4.00m                                                                       /dev/sdh1(0)        
  [lvol0_pmspare]     snapper_thinp ewi------- 4.00m                                                                       /dev/sdb1(0)        
  [wc_cvol]           snapper_thinp Cwi-aoC--- 2.00g                                                                       /dev/sdc1(0)        

[root@hayes-01 ~]# lvremove -f snapper_thinp
  LV segment POOL_tdata:0-4294967295 is incorrectly listed as being used by LV wc_cvol
  Internal error: LV segments corrupted in wc_cvol.


Version-Release number of selected component (if applicable):
kernel-4.18.0-305.7.el8.kpq1    BUILT: Mon May 17 12:55:07 CDT 2021
lvm2-2.03.12-1.el8    BUILT: Sat May 22 01:53:57 CDT 2021
lvm2-libs-2.03.12-1.el8    BUILT: Sat May 22 01:53:57 CDT 2021

Comment 1 David Teigland 2021-06-02 14:21:40 UTC
this was included in the bz mentioned above, this was the relevant part for this bz:

fix to allow removing a thin pool that has writecache on the data LV:
https://sourceware.org/git/?p=lvm2.git;a=commit;h=4a746f7ffcc8e61c9cb5ce9f9e8a061d1ef6b28e

Comment 3 Corey Marthaler 2021-06-15 20:21:52 UTC
Marking Verified:Tested in that latest rpms.

kernel-4.18.0-310.el8    BUILT: Thu May 27 14:24:00 CDT 2021
lvm2-2.03.12-3.el8    BUILT: Tue Jun 15 11:37:17 CDT 2021
lvm2-libs-2.03.12-3.el8    BUILT: Tue Jun 15 11:37:17 CDT 2021


[root@hayes-02 ~]# lvcreate --yes  --thinpool POOL -L 1G --profile thin-performance --zero y --poolmetadatasize 4M snapper_thinp
  Thin pool volume with chunk size 64.00 KiB can address at most <15.88 TiB of data.
  Logical volume "POOL" created.
[root@hayes-02 ~]# lvcreate --yes  -L 1G -n wcpool snapper_thinp /dev/sdc1
  Logical volume "wcpool" created.
[root@hayes-02 ~]# lvchange -an snapper_thinp/wcpool
[root@hayes-02 ~]# lvconvert --yes --type writecache --cachevol snapper_thinp/wcpool snapper_thinp/POOL
  Using writecache block size 512 for unknown file system block size, logical block size 512, physical block size 4096.
  Logical volume snapper_thinp/POOL now has writecache.
[root@hayes-02 ~]# lvs -a -o +devices
  LV                  VG            Attr       LSize Pool          Origin              Data%  Meta%  Move Log Cpy%Sync Convert Devices             
  POOL                snapper_thinp twi-a-tz-- 1.00g                                   0.00   10.94                            POOL_tdata(0)       
  [POOL_tdata]        snapper_thinp Cwi-aoC--- 1.00g [wcpool_cvol] [POOL_tdata_wcorig] 0.00                                    POOL_tdata_wcorig(0)
  [POOL_tdata_wcorig] snapper_thinp owi-aoC--- 1.00g                                                                           /dev/sde1(1)        
  [POOL_tmeta]        snapper_thinp ewi-ao---- 4.00m                                                                           /dev/sdo1(0)        
  [lvol0_pmspare]     snapper_thinp ewi------- 4.00m                                                                           /dev/sde1(0)        
  [wcpool_cvol]       snapper_thinp Cwi-aoC--- 1.00g                                                                           /dev/sdc1(0)        
[root@hayes-02 ~]# lvremove -f snapper_thinp
  Logical volume "POOL" successfully removed.

Comment 7 Corey Marthaler 2021-06-23 20:45:37 UTC
Fixed in the latest lvm build. Marking verified.

kernel-4.18.0-314.el8    BUILT: Tue Jun 15 11:04:32 CDT 2021
lvm2-2.03.12-4.el8    BUILT: Tue Jun 22 03:35:27 CDT 2021
lvm2-libs-2.03.12-4.el8    BUILT: Tue Jun 22 03:35:27 CDT 2021


SCENARIO - [display_thin_snap]
Create a snapshot and then display it a couple ways
Making pool volume
lvcreate --yes   --zero y -L 4M -n meta snapper_thinp /dev/sdc1 /dev/sde1
lvcreate --yes   --zero y -L 1G -n POOL snapper_thinp /dev/sdc1 /dev/sde1
lvcreate --yes  -L 400M -n wcpool snapper_thinp /dev/sdd1
lvchange -an snapper_thinp/wcpool
Converting *writecached* volume to thin pool data device
lvconvert --yes --type writecache --cachevol snapper_thinp/wcpool snapper_thinp/POOL
Create thin pool volume by combining the cached thin data and meta volumes
lvconvert --zero y --thinpool snapper_thinp/POOL --poolmetadata meta --yes
  WARNING: Converting snapper_thinp/POOL and snapper_thinp/meta to thin pool's data and metadata volumes with metadata wiping.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)

Making origin volume
lvcreate --yes  --virtualsize 1G -T snapper_thinp/POOL -n origin
lvcreate --yes  -V 1G -T snapper_thinp/POOL -n other1
  WARNING: Sum of all thin volume sizes (2.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB).
lvcreate --yes  -V 1G -T snapper_thinp/POOL -n other2
  WARNING: Sum of all thin volume sizes (3.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB).
lvcreate --yes  --virtualsize 1G -T snapper_thinp/POOL -n other3
  WARNING: Sum of all thin volume sizes (4.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB).
lvcreate --yes  --virtualsize 1G -T snapper_thinp/POOL -n other4
  WARNING: Sum of all thin volume sizes (5.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB).
lvcreate --yes  --virtualsize 1G -T snapper_thinp/POOL -n other5
  WARNING: Sum of all thin volume sizes (6.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB).
Making snapshot of origin volume
lvcreate --yes  -y -k n -s /dev/snapper_thinp/origin -n display_snap
Display snapshot using lvdisplay
Display snapshot using lvs
Display snapshot using lvscan
Removing snap volume snapper_thinp/display_snap
lvremove -f /dev/snapper_thinp/display_snap
Removing thin origin and other virtual thin volumes
Removing pool snapper_thinp/POOL

Comment 10 errata-xmlrpc 2021-11-09 19:45:54 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-2021:4431


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