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 1872864 - allow writecache to be used with thin pool
Summary: allow writecache to be used with thin pool
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lvm2
Version: 8.3
Hardware: Unspecified
OS: Unspecified
urgent
unspecified
Target Milestone: rc
: 8.0
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1899720
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-26 18:46 UTC by David Teigland
Modified: 2023-09-15 01:30 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.03.14-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 15:21:57 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-5216 0 None None None 2021-12-14 02:06:22 UTC
Red Hat Product Errata RHBA-2022:2038 0 None None None 2022-05-10 15:22:23 UTC

Description David Teigland 2020-08-26 18:46:40 UTC
Description of problem:

thin pool data can use a cache LV, but not a writecache LV.

I don't know of a technical reason why this should not be allowed, but enabling it would require testing.


# lvs test
  LV   VG   Attr       LSize Pool        Origin        
  main test Cwi---C--- 1.00g [fast_cvol] [main_wcorig]
# lvconvert --type thin-pool test/main
  Command on LV test/main does not accept LV type writecache.
  Command not permitted on LV test/main.

# lvs test
  LV   VG   Attr       LSize Pool        Origin       
  main test Cwi---C--- 1.00g [fast_cvol] [main_corig]
# lvconvert --type thin-pool test/main
  Thin pool volume with chunk size 64.00 KiB can address at most 15.81 TiB of data.
  WARNING: Converting test/main to thin pool's data volume with metadata wiping.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Do you really want to convert test/main? [y/n]: y
  Converted test/main to thin pool.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 David Teigland 2020-10-28 18:09:40 UTC
When writecache (or cache) is used for thin data, the thin pool cannot be extended.  This seems to make the combination of little use in practice, so I'm setting aside work on this.

Comment 4 David Teigland 2021-10-05 13:56:00 UTC
the test lvextend-caches-on-thindata.sh covers both writecache and cache.

Comment 8 Corey Marthaler 2021-11-19 17:13:35 UTC
Marking Verified:Tested in the current rpms.

kernel-4.18.0-348.4.el8.kpq0    BUILT: Wed Oct 27 15:00:32 CDT 2021
lvm2-2.03.14-1.el8    BUILT: Wed Oct 20 10:18:17 CDT 2021
lvm2-libs-2.03.14-1.el8    BUILT: Wed Oct 20 10:18:17 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/sdb1 /dev/sdd1
lvcreate --yes   --zero y -L 1G -n POOL snapper_thinp /dev/sdb1 /dev/sdd1

lvcreate --yes  -L 400M -n wcpool snapper_thinp /dev/sdc1
lvchange -an snapper_thinp/wcpool

Converting *writecached* volume to thin pool data device
lvconvert --yes --type writecache --cachevol snapper_thinp/wcpool snapper_thinp/POOL
  WARNING: unable to detect a file system block size on snapper_thinp/POOL
  WARNING: using a writecache block size larger than the file system block size may corrupt the file system.
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.)

Sanity checking pool device (POOL) metadata
thin_check /dev/mapper/snapper_thinp-meta_swap.910
examining superblock
examining devices tree
examining mapping tree
checking space map counts

Making origin volume
lvcreate --yes  --virtualsize 1G -T snapper_thinp/POOL -n origin
lvcreate --yes  --virtualsize 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  --virtualsize 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  -V 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  -V 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 12 Corey Marthaler 2021-12-22 03:37:09 UTC
Marking VERIFIED in the latest rpms. The remaining thinpool stacked on writecache scenarios passed with the exception of Bug 2033377 (block io scenario now fails to when run on writecache origin volume)


kernel-4.18.0-355.el8    BUILT: Mon Dec 13 10:25:24 CST 2021
lvm2-2.03.14-2.el8    BUILT: Fri Dec 17 14:39:40 CST 2021
lvm2-libs-2.03.14-2.el8    BUILT: Fri Dec 17 14:39:40 CST 2021
device-mapper-1.02.181-2.el8    BUILT: Fri Dec 17 14:39:40 CST 2021
device-mapper-libs-1.02.181-2.el8    BUILT: Fri Dec 17 14:39:40 CST 2021

Comment 14 errata-xmlrpc 2022-05-10 15:21:57 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-2022:2038

Comment 15 Red Hat Bugzilla 2023-09-15 01:30:23 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days


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