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 2108254

Summary: vdo_use_compression and use_compression are not fully operational like mentioned in RFE 2100608
Product: Red Hat Enterprise Linux 8 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: VDO QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: unspecified CC: agk, awalsh, heinzm, jbrassow, mcsontos, prajnoha, zkabelac
Version: 8.7Keywords: FutureFeature, Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.03.14-9.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-16 09:11:54 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 Corey Marthaler 2022-07-18 17:26:05 UTC
Description of problem:
# vdo_use_compression:  can NOT be viewed, can NOT be altered
[root@hayes-01 ~]# lvs  -o vdo_use_compression vdo_sanity/vdo_lv
   [...]
  Unrecognised field: vdo_use_compression

[root@hayes-01 ~]# lvchange --vdosettings 'vdo_use_compression = 1' vdo_sanity/vdo_pool 
  Unknown VDO setting "vdo_use_compression".


# use_compression:  can NOT be viewed, CAN be altered
[root@hayes-01 ~]# lvs  -o use_compression vdo_sanity/vdo_lv
   [...]
  Unrecognised field: use_compression

[root@hayes-01 ~]# lvchange --vdosettings 'use_compression = 1' vdo_sanity/vdo_pool 
  Logical volume vdo_sanity/vdo_pool changed.



# vdo_compression: CAN be viewed, CAN be altered
[root@hayes-01 ~]# lvs  -o vdo_compression vdo_sanity/vdo_lv
  VDOCompression
         enabled

[root@hayes-01 ~]# lvchange --vdosettings 'vdo_compression = 1' vdo_sanity/vdo_pool 
  Logical volume vdo_sanity/vdo_pool changed.




Version-Release number of selected component (if applicable):
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

Comment 2 Corey Marthaler 2022-07-18 19:32:32 UTC
Two more "use_*" properties that don't work. "Unknown VDO setting", the user needs to drop "use_" in order to actually use these properties.

# use_metadata_hints

[root@hayes-01 ~]# lvconvert --yes --type vdo-pool -n vdo_lv --vdosettings vdo_use_metadata_hints=1 -V100G vdo_sanity/vdo_pool
  Unknown VDO setting "vdo_use_metadata_hints".

[root@hayes-01 ~]# lvconvert --yes --type vdo-pool -n vdo_lv --vdosettings vdo_metadata_hints=1 -V100G vdo_sanity/vdo_pool
  WARNING: Converting logical volume vdo_sanity/vdo_pool to VDO pool volume with formating.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
    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.
  Converted vdo_sanity/vdo_pool to VDO pool volume and created virtual vdo_sanity/vdo_lv VDO volume.


# use_sparse_index
[root@hayes-01 ~]# lvconvert --yes --type vdo-pool -n vdo_lv --vdosettings 'vdo_use_sparse_index=1' -V100G vdo_sanity/vdo_pool
  Unknown VDO setting "vdo_use_sparse_index".

[root@hayes-01 ~]# lvconvert --yes --type vdo-pool -n vdo_lv --vdosettings 'vdo_sparse_index=1' -V100G vdo_sanity/vdo_pool
  WARNING: Converting logical volume vdo_sanity/vdo_pool to VDO pool volume with formating.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Minimum required size for VDO volume: 26130157568 bytes
vdoformat: formatVDO failed on '/dev/vdo_sanity/vdo_pool': VDO Status: Out of space
  Command /usr/bin/vdoformat failed.
  Cannot format VDO pool volume vdo_sanity/vdo_pool.

[root@hayes-01 ~]# lvconvert --yes --type vdo-pool -n vdo_lv --vdosettings 'vdo_sparse_index=26130157568' -V100G vdo_sanity/vdo_pool
  WARNING: Converting logical volume vdo_sanity/vdo_pool to VDO pool volume with formating.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Minimum required size for VDO volume: 26130157568 bytes
vdoformat: formatVDO failed on '/dev/vdo_sanity/vdo_pool': VDO Status: Out of space
  Command /usr/bin/vdoformat failed.
  Cannot format VDO pool volume vdo_sanity/vdo_pool.

Comment 3 Corey Marthaler 2022-07-18 20:53:45 UTC
I filed https://bugzilla.redhat.com/show_bug.cgi?id=2108326 for the use_sparse_index issue.

Comment 4 Zdenek Kabelac 2022-08-19 13:06:30 UTC
Same patch fixing  vdo_use_sparse_index is  also a working fix for  vdo_use_compression

https://listman.redhat.com/archives/lvm-devel/2022-August/024268.html

Comment 7 Corey Marthaler 2022-12-14 22:06:51 UTC
Of the 6 scenarios in the initial bug report (vdo_use_compression, use_compression, vdo_compression X set, display), 3 of them worked. Now with the fix, of those 6, 4 work. Without the requested devel test results, I'm not sure which of these are supposed to work and which are not, so moving this back to ASSIGNED. 

The lvmvdo(7) page mentions only vdo_use_compression
   4. Change the default settings used for creating a VDOPoolLV
      [...]
          allocation {
              vdo_use_compression=1

However the lvs stderr mentions only vdo_compression
From lvs stderr:
    vdo_compression             - Set for compressed LV (vdopool).

Instead of attempting to support three different variables for the same thing, and documenting just two of them, why don't we just pick one, and document and allow just that one for displaying and setting?


kernel-4.18.0-442.el8.v2    BUILT: Mon Dec  5 14:06:21 CST 2022
lvm2-2.03.14-9.el8    BUILT: Thu Dec  8 10:40:55 CST 2022
lvm2-libs-2.03.14-9.el8    BUILT: Thu Dec  8 10:40:55 CST 2022


[root@hayes-01 ~]# lvs -a -o +devices
  LV               VG         Attr       LSize   Pool     Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices          
  vdo_lv           vdo_sanity vwi---v--- 100.00g vdo_pool                                                vdo_pool(0)      
  vdo_pool         vdo_sanity dwi-------  10.00g                                                         vdo_pool_vdata(0)
  [vdo_pool_vdata] vdo_sanity Dwi-------  10.00g                                                         /dev/sdf1(0)     

                
# vdo_use_compression (set) - PASS
[root@hayes-01 ~]# lvchange --vdosettings 'vdo_use_compression = 1' vdo_sanity/vdo_pool
  Logical volume vdo_sanity/vdo_pool changed.
# vdo_use_compression (display) - FAIL
[root@hayes-01 ~]# lvs  -o vdo_use_compression vdo_sanity/vdo_lv
   [...]
  Unrecognised field: vdo_use_compression


# use_compression (set) - PASS
[root@hayes-01 ~]# lvchange --vdosettings 'use_compression = 0' vdo_sanity/vdo_pool
  Logical volume vdo_sanity/vdo_pool changed.
# use_compression (display) - FAIL
[root@hayes-01 ~]# lvs  -o use_compression vdo_sanity/vdo_lv
   [...]
  Unrecognised field: use_compression


# vdo_compression (display) - PASS
[root@hayes-01 ~]# lvs  -o vdo_compression vdo_sanity/vdo_lv
  VDOCompression
         enabled
# vdo_compression (set) - PASS
[root@hayes-01 ~]# lvchange --vdosettings 'vdo_compression = 0' vdo_sanity/vdo_pool
  Logical volume vdo_sanity/vdo_pool changed.
[root@hayes-01 ~]# lvs  -o vdo_compression vdo_sanity/vdo_lv
  VDOCompression

Comment 11 Zdenek Kabelac 2023-01-11 13:37:29 UTC
What was tested  in  comment 7  is well in line with the coded state
Failure of lvs with vdo_use_compression is OK - since property was originally named   'vdo_compression' as 'status of compression' while 'vdo_use_compression' is a 'setup directive' on creation time.

There was not yet made any further progress on making also 'lvs' reporting somewhat more forging and requires to use proper full name to obtain the value.

My original idea of adding more 'settings' as aliases makes listing of  'lvs -o help' really long and even way more confusing than it already is.

My next idea is to implement aliasing as a feature of individual property - but that's currently just an idea - but I can see a slight confusion in user's eye - so eventually we will deal with this issue in some way to simplify it.

But ATM --vdosettting (since it knows it relates to vdo properties) is just smarter version for setting values - but they could be equally well setting though --config or --profile setting - but there you have to use full names.

Comment 12 Corey Marthaler 2023-01-16 20:23:44 UTC
Marking this partial fix Verified:Tested per the instructions of comment #7.

Any further fixes for this incomplete feature will require additional bugzillas opened with clear instructions about expectations for QA.

Comment 18 errata-xmlrpc 2023-05-16 09:11:54 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:3048