Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2128855

Summary: vdo table line for V4 version should no longer use dmsetup messages to turn on/off dedupe and compression
Product: Red Hat Enterprise Linux 9 Reporter: bjohnsto
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: VDO QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: agk, awalsh, cmarthal, heinzm, jbrassow, prajnoha, zkabelac
Version: 9.2Keywords: Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.03.17-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 08:23:45 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:

Description bjohnsto 2022-09-21 17:16:08 UTC
Description of problem:

Should use the table line to turn on/off compression and dedupe when using V4 version. Should no longer use dmsetup messages to set this state.

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


How reproducible:

Always

Steps to Reproduce:
1. Create lvmvdo using latest lvm2 code that has V4 table line support.
2. Observe table line parameters
3.

Actual results:

deduplication on/off and compression on/off not set on line

Expected results:

Values are set. dmsetup messages are not called.

Additional info:

Comment 1 Zdenek Kabelac 2022-11-08 13:28:39 UTC
Upstreamed with some more surrounding VDO improval commits:

https://listman.redhat.com/archives/lvm-devel/2022-November/024454.html

(present in version 2.03.17)


V4 VDO table line looks like this:

vg-vpool0-vpool: 0 4184864 vdo V4 /dev/dm-0 1310720 4096 32768 16380 deduplication on compression on maxDiscard 1 ack 1 bio 4 bioRotationInterval 64 cpu 2 hash 1 logical 1 physical 1



where deduplication & compression are explicitely present on 'dmsetup table' line for VDO device.

V4 requires  8.2    'dmsetup targets' vdo version.

Older versions of VDO target will go with V2 table line version.

Comment 5 Corey Marthaler 2022-11-21 21:15:03 UTC
Marking Verified:Tested with the latest rpms.

5.14.0-192.kpq1.el9.x86_64
kernel-5.14.0-192.kpq1.el9    BUILT: Fri Nov 11 08:34:24 AM CET 2022
lvm2-2.03.17-1.el9    BUILT: Thu Nov 10 05:02:16 PM CET 2022
lvm2-libs-2.03.17-1.el9    BUILT: Thu Nov 10 05:02:16 PM CET 2022


[root@virt-246 ~]# lvcreate --yes --type vdo -n vdo -L 10G vdo_sanity
    Logical blocks defaulted to 1569686 blocks.
    The VDO volume can address 6 GB in 3 data slabs, each 2 GB.
    It can grow to address at most 16 TB of physical storage in 8192 slabs.
    If a larger maximum size might be needed, use bigger slabs.
  Logical volume "vdo" created.

[root@virt-246 ~]# dmsetup table
rhel_virt--246-root: 0 12992512 linear 252:2 1681408
rhel_virt--246-swap: 0 1679360 linear 252:2 2048
vdo_sanity-vdo: 0 12550144 linear 253:3 1024
vdo_sanity-vpool0-vpool: 0 12557488 vdo V4 /dev/dm-2 2621440 4096 32768 16380 deduplication on compression on maxDiscard 1 ack 1 bio 4 bioRotationInterval 64 cpu 2 hash 1 logical 1 physical 1
vdo_sanity-vpool0_vdata: 0 20971520 linear 8:0 8192

Comment 10 Corey Marthaler 2022-12-19 17:41:59 UTC
Verified in the latest rpms as well.

kernel-5.14.0-201.kpq1.el9    BUILT: Wed Nov 23 07:13:08 AM CST 2022
lvm2-2.03.17-3.el9    BUILT: Wed Dec  7 10:41:40 AM CST 2022
lvm2-libs-2.03.17-3.el9    BUILT: Wed Dec  7 10:41:40 AM CST 2022

lvcreate --yes --type vdo -n vdo_lv  -L 10G vdo_sanity -V100G  
Wiping xfs signature on /dev/vdo_sanity/vpool0.
    The VDO volume can address 6 GB in 3 data slabs, each 2 GB.
    It can grow to address at most 16 TB of physical storage in 8192 slabs.
    If a larger maximum size might be needed, use bigger slabs.
  Logical volume "vdo_lv" created.

All keywords ['V4', 'deduplication', 'compression'] found in command output:
dmsetup table vdo_sanity-vpool0-vpool:
0 209717248 vdo V4 /dev/dm-0 2621440 4096 32768 16380 deduplication on compression on maxDiscard 1 ack 1 bio 4 bioRotationInterval 64 cpu 2 hash 1 logical 1 physical 1
lvremove  -f vdo_sanity/vdo_lv
Logical volume "vdo_lv" successfully removed.

Comment 12 errata-xmlrpc 2023-05-09 08:23:45 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-2023:2544