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 1797708 - writecache: High watermark must be greater than or equal to low watermark
Summary: writecache: High watermark must be greater than or equal to low watermark
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
unspecified
low
Target Milestone: rc
: 8.0
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-03 17:17 UTC by Corey Marthaler
Modified: 2021-09-07 11:43 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.03.08-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:59:23 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-34230 0 None None None 2021-09-07 11:43:24 UTC
Red Hat Product Errata RHEA-2020:1881 0 None None None 2020-04-28 16:59:37 UTC

Description Corey Marthaler 2020-02-03 17:17:49 UTC
Description of problem:
This is pretty obvious, but still something that LVM should be dealing with at create/convert time.


[root@hayes-02 ~]# lvcreate --wipesignatures y  -L 4G -n rename_orig_A writecache_sanity @slow
  Logical volume "rename_orig_A" created.

[root@hayes-02 ~]# lvcreate  -L 4G -n rename_pool_A writecache_sanity @fast
  Logical volume "rename_pool_A" created.

[root@hayes-02 ~]# lvchange -an writecache_sanity

[root@hayes-02 ~]# lvconvert --yes --type writecache --cachesettings 'low_watermark=56 high_watermark=3' --cachevol writecache_sanity/rename_pool_A writecache_sanity/rename_orig_A
  Logical volume writecache_sanity/rename_orig_A now has write cache.

[root@hayes-02 ~]# lvchange -ay writecache_sanity/rename_orig_A
  device-mapper: reload ioctl on  (253:2) failed: Invalid argument


[332500.683235] device-mapper: table: 253:2: writecache: High watermark must be greater than or equal to low watermark
[332500.694891] device-mapper: ioctl: error adding target to table



Version-Release number of selected component (if applicable):
kernel-4.18.0-173.el8    BUILT: Fri Jan 24 06:02:03 CST 2020
lvm2-2.03.07-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
lvm2-libs-2.03.07-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
lvm2-dbusd-2.03.07-1.el8    BUILT: Mon Dec  2 00:12:23 CST 2019
device-mapper-1.02.167-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
device-mapper-libs-1.02.167-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
device-mapper-event-1.02.167-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
device-mapper-event-libs-1.02.167-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019

Comment 1 David Teigland 2020-02-03 17:36:09 UTC
Fixed for cases like above where the user sets both high and low to an invalid combination:
https://sourceware.org/git/?p=lvm2.git;a=commit;h=adbb0a8d5bd0f735a756e32effcf0bddac0f6de7

lvconvert --type writecache --cachevol fast --cachesettings "high_watermark=5 low_watermark=6" foo/main
  High watermark must be greater than or equal to low watermark.
  Invalid writecache settings.


We can't catch cases where one value is set and it is invalid in combination with the kernel's default value for the other.  In those cases the kernel error message will suffice.

Comment 4 Corey Marthaler 2020-02-20 23:50:10 UTC
The message should just be "must be greater than low watermark." that or the check needs to change.


# Lower than
[root@hayes-02 ~]# lvconvert --yes --type writecache --cachesettings 'low_watermark=56 high_watermark=3' --cachevol writecache_sanity/rename_pool_A writecache_sanity/rename_orig_A
  High watermark must be greater than or equal to low watermark.
  Invalid writecache settings.

# Equal to
[root@hayes-02 ~]# lvconvert --yes --type writecache --cachesettings 'low_watermark=56 high_watermark=56' --cachevol writecache_sanity/rename_pool_A writecache_sanity/rename_orig_A
  High watermark must be greater than or equal to low watermark.
  Invalid writecache settings.

Comment 5 David Teigland 2020-02-21 14:16:12 UTC
in master:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2284f845b0328df97dfef6200905b3b462cd3cce

-               log_error("High watermark must be greater than or equal to low watermark.");
+               log_error("High watermark must be greater than low watermark.");

Comment 6 Corey Marthaler 2020-02-24 23:23:36 UTC
Fix verified in the latest rpms.

kernel-4.18.0-179.el8    BUILT: Fri Feb 14 17:03:01 CST 2020
lvm2-2.03.08-2.el8    BUILT: Mon Feb 24 11:21:38 CST 2020
lvm2-libs-2.03.08-2.el8    BUILT: Mon Feb 24 11:21:38 CST 2020
device-mapper-1.02.169-2.el8    BUILT: Mon Feb 24 11:21:38 CST 2020
device-mapper-libs-1.02.169-2.el8    BUILT: Mon Feb 24 11:21:38 CST 2020
device-mapper-event-1.02.169-2.el8    BUILT: Mon Feb 24 11:21:38 CST 2020
device-mapper-event-libs-1.02.169-2.el8    BUILT: Mon Feb 24 11:21:38 CST 2020


[root@hayes-02 ~]# lvs -a -o +devices
  LV              VG                Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices     
  cworigin        writecache_sanity -wi------- 4.00g                                                     /dev/sdd1(0)
  test_writecache writecache_sanity -wi------- 2.00g                                                     /dev/sdh1(0)

[root@hayes-02 ~]# lvconvert --yes --type writecache --cachesettings 'low_watermark=56 high_watermark=3' --cachevol writecache_sanity/test_writecache writecache_sanity/cworigin
  High watermark must be greater than low watermark.
  Invalid writecache settings.

[root@hayes-02 ~]# lvconvert --yes --type writecache --cachesettings 'low_watermark=56 high_watermark=56' --cachevol writecache_sanity/test_writecache writecache_sanity/cworigin
  High watermark must be greater than low watermark.
  Invalid writecache settings.

[root@hayes-02 ~]# lvconvert --yes --type writecache --cachesettings 'low_watermark=56 high_watermark=57' --cachevol writecache_sanity/test_writecache writecache_sanity/cworigin
  Logical volume writecache_sanity/cworigin now has write cache.

Comment 8 errata-xmlrpc 2020-04-28 16:59:23 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, 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/RHEA-2020:1881


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