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 1899720 - Allow thin-pool to be resized (grown) when cache is on top
Summary: Allow thin-pool to be resized (grown) when cache is on top
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lvm2
Version: 8.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: 8.0
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1872864
TreeView+ depends on / blocked
 
Reported: 2020-11-19 20:26 UTC by Jonathan Earl Brassow
Modified: 2021-11-10 08:53 UTC (History)
11 users (show)

Fixed In Version: lvm2-2.03.12-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:45:20 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:45:39 UTC

Description Jonathan Earl Brassow 2020-11-19 20:26:41 UTC
Thin-pool needs to be expanded when over provisioning is in use and running out of backing space.  There are manual and automated ways of doing this.  Neither of these can be done if a cache is on top of a thin pool.

This should be addressed so users aren't confused (or have to remove a cache) when space gets tight.

Comment 1 Zdenek Kabelac 2021-02-08 23:57:03 UTC
Pushed support for resize of  dm-cache cached volumes with these upstream patches:

https://listman.redhat.com/archives/lvm-devel/2021-February/msg00042.html
https://listman.redhat.com/archives/lvm-devel/2021-February/msg00043.html
https://listman.redhat.com/archives/lvm-devel/2021-February/msg00045.html

tested various resize cases:

https://listman.redhat.com/archives/lvm-devel/2021-February/msg00046.html


Supports not just resize of _tdata but all other supported cached LVs.
(--type cache)

Comment 2 Zdenek Kabelac 2021-02-09 11:54:11 UTC
This also solves the problem for resize of cached thin-pools reported in bug 1876811.

Comment 4 David Teigland 2021-05-06 16:30:12 UTC
Should this bug include extending thin pool data when the data uses either cache or writecache, both of which lvm will now extend (bug 1160044)?  Or should writecache on thin pool data be handled and tested as a separate RFE?

Comment 5 Corey Marthaler 2021-05-06 17:51:38 UTC
Separate RFE would be preferred here as well.

Comment 7 David Teigland 2021-05-06 18:06:16 UTC
Created bug 1957898 for extending thin pool data using writecache, so this bug is only for extending thin pool data with cache.

Comment 10 Corey Marthaler 2021-06-10 20:51:15 UTC
Fix verified in the latest rpms. All cached stack thin pool stack extension scenarios have been finally turned on in 8.5.

kernel-4.18.0-310.el8    BUILT: Thu May 27 14:24:00 CDT 2021
lvm2-2.03.12-2.el8    BUILT: Tue Jun  1 06:55:37 CDT 2021
lvm2-libs-2.03.12-2.el8    BUILT: Tue Jun  1 06:55:37 CDT 2021


[root@hayes-02 ~]# lvcreate --yes  --profile thin-performance --zero y -L 4M -n meta snapper_thinp /dev/sdb
  Logical volume "meta" created.
[root@hayes-02 ~]# lvcreate --yes  --profile thin-performance --zero y -L 1G -n POOL snapper_thinp /dev/sdb
  Logical volume "POOL" created.
[root@hayes-02 ~]# lvcreate --yes  --zero y -L 400M -n cpool snapper_thinp /dev/sdc
  Logical volume "cpool" created.
[root@hayes-02 ~]# lvcreate --yes  --zero y -L 8M -n cpool_meta snapper_thinp /dev/sdc
  Logical volume "cpool_meta" created.
[root@hayes-02 ~]# lvconvert --yes --type cache-pool --poolmetadata snapper_thinp/cpool_meta snapper_thinp/cpool
  WARNING: Converting snapper_thinp/cpool and snapper_thinp/cpool_meta to cache pool's data and metadata volumes with metadata wiping.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
  Converted snapper_thinp/cpool and snapper_thinp/cpool_meta to cache pool.
[root@hayes-02 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices       
  POOL            snapper_thinp -wi-a-----   1.00g                                                     /dev/sdb(1)   
  cpool           snapper_thinp Cwi---C--- 400.00m                                                     cpool_cdata(0)
  [cpool_cdata]   snapper_thinp Cwi------- 400.00m                                                     /dev/sdc(0)   
  [cpool_cmeta]   snapper_thinp ewi-------   8.00m                                                     /dev/sdc(100) 
  [lvol0_pmspare] snapper_thinp ewi-------   8.00m                                                     /dev/sdb(257) 
  meta            snapper_thinp -wi-a-----   4.00m                                                     /dev/sdb(0)   
[root@hayes-02 ~]# lvconvert --yes --type cache --cachepool snapper_thinp/cpool snapper_thinp/POOL
  Logical volume snapper_thinp/POOL is now cached.
[root@hayes-02 ~]# lvconvert --zero y --thinpool snapper_thinp/POOL --poolmetadata meta --yes
  Thin pool volume with chunk size 64.00 KiB can address at most <15.88 TiB of data.
  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.)
  Converted snapper_thinp/POOL and snapper_thinp/meta to thin pool.
[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 [cpool_cpool] [POOL_tdata_corig] 0.12   1.46            0.00             POOL_tdata_corig(0) 
  [POOL_tdata_corig]  snapper_thinp owi-aoC---   1.00g                                                                          /dev/sdb(1)         
  [POOL_tmeta]        snapper_thinp ewi-ao----   4.00m                                                                          /dev/sdb(0)         
  [cpool_cpool]       snapper_thinp Cwi---C--- 400.00m                                  0.12   1.46            0.00             cpool_cpool_cdata(0)
  [cpool_cpool_cdata] snapper_thinp Cwi-ao---- 400.00m                                                                          /dev/sdc(0)         
  [cpool_cpool_cmeta] snapper_thinp ewi-ao----   8.00m                                                                          /dev/sdc(100)       
  [lvol0_pmspare]     snapper_thinp ewi-------   8.00m                                                                          /dev/sdb(257)       
[root@hayes-02 ~]# lvextend -L +1G snapper_thinp/POOL_tdata
  Size of logical volume snapper_thinp/POOL_tdata_corig changed from 1.00 GiB (256 extents) to 2.00 GiB (512 extents).
  Logical volume snapper_thinp/POOL successfully resized.

Comment 13 errata-xmlrpc 2021-11-09 19:45:20 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.