Bug 2095492

Summary: request for memory usage warning when setting up dm-writecache
Product: Red Hat Enterprise Linux 8 Reporter: David Teigland <teigland>
Component: lvm2Assignee: David Teigland <teigland>
lvm2 sub component: Cache Logical Volumes QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: agk, cluster-qe, cmarthal, djeffery, heinzm, jbrassow, jpittman, mcsontos, msnitzer, prajnoha, teigland, zkabelac
Version: 8.0Keywords: FutureFeature, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.03.14-4.el8 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 2059644 Environment:
Last Closed: 2022-11-08 10:55:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2059644    
Bug Blocks:    

Comment 3 David Teigland 2022-06-09 18:59:56 UTC
backporting this to 8.7

Comment 7 Corey Marthaler 2022-07-15 02:24:12 UTC
Marking verified in the latest rpms.

# RHEL8.7 

kernel-4.18.0-398.g366e.el8.kpq1    BUILT: Tue Jun  7 04:56:38 CDT 2022
lvm2-2.03.14-4.el8    BUILT: Wed Jun 15 17:14:34 CDT 2022
lvm2-libs-2.03.14-4.el8    BUILT: Wed Jun 15 17:14:34 CDT 2022


   dm-writecache memory usage
       The amount of main system memory used by dm-writecache can be a factor when selecting the writecache cachevol size and the writecache block size.

       · writecache block size 4096: each 100 GiB of writecache cachevol uses slighly over 2 GiB of system memory.

       · writecache block size 512: each 100 GiB of writecache cachevol uses a little over 16 GiB of system memory.


[root@hayes-01 ~]# cat /proc/meminfo
MemTotal:       263626796 kB

[root@hayes-01 ~]# lvcreate --yes --type linear -n write  -L 6T vdo_sanity
  Logical volume "write" created.
[root@hayes-01 ~]# lvchange --yes -an  vdo_sanity/write

[root@hayes-01 ~]# lvcreate --yes -L 4T -n wc_lv  vdo_sanity
  Logical volume "wc_lv" created.


[root@hayes-01 ~]# lvconvert --yes --type writecache --cachevol vdo_sanity/write vdo_sanity/wc_lv
  Using writecache block size 4096 for unknown file system block size, logical block size 512, physical block size 512.
  WARNING: unable to detect a file system block size on vdo_sanity/wc_lv
  WARNING: using a writecache block size larger than the file system block size may corrupt the file system.
  WARNING: writecache size 6.00 TiB will use 132 GiB of system memory (251 GiB).
  Logical volume vdo_sanity/wc_lv now has writecache.

Comment 10 Corey Marthaler 2022-07-28 15:02:48 UTC
Verified in the latest kernel/lvm2 rpms as well.

kernel-4.18.0-411.el8    BUILT: Wed Jul 20 18:42:42 CDT 2022
lvm2-2.03.14-5.el8    BUILT: Thu Jul 14 09:23:13 CDT 2022
lvm2-libs-2.03.14-5.el8    BUILT: Thu Jul 14 09:23:13 CDT 2022


[root@hayes-02 ~]# lvconvert --yes --type writecache --cachevol vdo_sanity/write vdo_sanity/wc_lv
  Using writecache block size 4096 for unknown file system block size, logical block size 512, physical block size 512.
  WARNING: unable to detect a file system block size on vdo_sanity/wc_lv
  WARNING: using a writecache block size larger than the file system block size may corrupt the file system.
  WARNING: writecache size 6.00 TiB will use 132 GiB of system memory (251 GiB).
  Logical volume vdo_sanity/wc_lv now has writecache.

Comment 13 errata-xmlrpc 2022-11-08 10:55:29 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:7792