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 1996227 - vdo to lvm conversion tool doesn't handle vdo logical sizes > 2T and < 10k
Summary: vdo to lvm conversion tool doesn't handle vdo logical sizes > 2T and < 10k
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lvm2
Version: 8.5
Hardware: x86_64
OS: Linux
urgent
medium
Target Milestone: beta
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1930261 2005006
TreeView+ depends on / blocked
 
Reported: 2021-08-20 23:04 UTC by Corey Marthaler
Modified: 2023-09-11 06:59 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.03.12-9.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2005006 (view as bug list)
Environment:
Last Closed: 2021-11-09 19:45:56 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-4884 0 None None None 2021-09-09 05:03:29 UTC
Red Hat Issue Tracker RHELPLAN-95443 0 None None None 2021-08-27 15:31:50 UTC
Red Hat Product Errata RHBA-2021:4431 0 None None None 2021-11-09 19:46:11 UTC

Description Corey Marthaler 2021-08-20 23:04:13 UTC
Description of problem:
Between the logical value range of 20k and 2t the vdo to lvm convert tool matches the specified vdo logical value exactly, on the other sides of that range, it doesn't.



# 10k
vdo create --force --name vdoimport_sanity --vdoLogicalSize 10k --device /dev/sdc1
Creating VDO vdoimport_sanity
      The VDO volume can address 442 GB in 221 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.
Starting VDO vdoimport_sanity
Starting compression on VDO vdoimport_sanity
VDO instance 29 volume is ready at /dev/mapper/vdoimport_sanity

vdoimport --yes /dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1
Device does not exist.
Command failed.
  Volume group "vdovg" not found
  Cannot process volume group vdovg
Stopping VDO vdoimport_sanity
Converting VDO vdoimport_sanity
      Opening /dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1 exclusively
      Loading the VDO superblock and volume geometry
      Checking the VDO state
      Converting the UDS index
      Converting the VDO
      Conversion completed for '/dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1" successfully created.
  Volume group "vdovg" successfully created
  Logical volume "vdolvol_vpool" created.
  WARNING: Logical volume vdovg/vdolvol_vpool not zeroed.
  WARNING: Converting logical volume vdovg/vdolvol_vpool to VDO pool volume WITHOUT formating.
  WARNING: Using invalid VDO pool data MAY DESTROY YOUR DATA!
  Logical volume "vdolvol" created.
  Converted vdovg/vdolvol_vpool to VDO pool volume and created virtual vdovg/vdolvol VDO volume.

[root@hayes-03 ~]# lvs --units k
  LV            VG    Attr       LSize         Pool          Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vdolvol       vdovg vwi-a-v---         8.00k vdolvol_vpool        0.00                                   
  vdolvol_vpool vdovg dwi------- 468318168.00k                      1.10                                   



# 2k
vdo create --force --name vdoimport_sanity --vdoLogicalSize 2k --device /dev/sdc1
Creating VDO vdoimport_sanity
      Logical blocks defaulted to 115646516 blocks.
      The VDO volume can address 442 GB in 221 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.
Starting VDO vdoimport_sanity
Starting compression on VDO vdoimport_sanity
VDO instance 31 volume is ready at /dev/mapper/vdoimport_sanity

vdoimport --yes /dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1
Device does not exist.
Command failed.
  Volume group "vdovg" not found
  Cannot process volume group vdovg
Stopping VDO vdoimport_sanity
Converting VDO vdoimport_sanity
      Opening /dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1 exclusively
      Loading the VDO superblock and volume geometry
      Checking the VDO state
      Converting the UDS index
      Converting the VDO
      Conversion completed for '/dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1" successfully created.
  Volume group "vdovg" successfully created
  Logical volume "vdolvol_vpool" created.
  WARNING: Logical volume vdovg/vdolvol_vpool not zeroed.
  WARNING: Converting logical volume vdovg/vdolvol_vpool to VDO pool volume WITHOUT formating.
  WARNING: Using invalid VDO pool data MAY DESTROY YOUR DATA!
  Logical volume "vdolvol" created.
  Converted vdovg/vdolvol_vpool to VDO pool volume and created virtual vdovg/vdolvol VDO volume.


[root@hayes-03 ~]# lvs --units k
  LV            VG    Attr       LSize         Pool          Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vdolvol       vdovg vwi-a-v--- 462586064.00k vdolvol_vpool        0.00                                   
  vdolvol_vpool vdovg dwi------- 468318168.00k                      1.10                                   



# 3T
vdo create --force --name vdoimport_sanity --vdoLogicalSize 3T --device /dev/sdc1
Creating VDO vdoimport_sanity
      The VDO volume can address 442 GB in 221 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.
Starting VDO vdoimport_sanity
Starting compression on VDO vdoimport_sanity
VDO instance 33 volume is ready at /dev/mapper/vdoimport_sanity

vdoimport --yes /dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1
Device does not exist.
Command failed.
  Volume group "vdovg" not found
  Cannot process volume group vdovg
Stopping VDO vdoimport_sanity
Converting VDO vdoimport_sanity
      Opening /dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1 exclusively
      Loading the VDO superblock and volume geometry
      Checking the VDO state
      Converting the UDS index
      Converting the VDO
      Conversion completed for '/dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1" successfully created.
  Volume group "vdovg" successfully created
  Logical volume "vdolvol_vpool" created.
  WARNING: Logical volume vdovg/vdolvol_vpool not zeroed.
  Rounding up size to full physical extent 2.00 TiB
  WARNING: Converting logical volume vdovg/vdolvol_vpool to VDO pool volume WITHOUT formating.
  WARNING: Using invalid VDO pool data MAY DESTROY YOUR DATA!
  Logical volume "vdolvol" created.
  Converted vdovg/vdolvol_vpool to VDO pool volume and created virtual vdovg/vdolvol VDO volume.

[root@hayes-03 ~]# lvs --units t
  LV            VG    Attr       LSize Pool          Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vdolvol       vdovg vwi-a-v--- 2.00t vdolvol_vpool        0.00                                   
  vdolvol_vpool vdovg dwi------- 0.44t                      1.10                                   


Version-Release number of selected component (if applicable):
lvm2-2.03.12-6.el8    BUILT: Tue Aug  3 07:23:05 CDT 2021
lvm2-libs-2.03.12-6.el8    BUILT: Tue Aug  3 07:23:05 CDT 2021


How reproducible:
Everytime

Comment 1 Matthew Sakai 2021-08-31 17:56:45 UTC
For the first case, the 10k device, I believe this is a limitation of VDO. The logical size of VDO must be a multiple of 4k, and if the supplied value is not a multiple of 4k, it rounds the size down. So asking for a 10k device rounds down to an 8k device when created.  For most devices this effect is not noticeable, but it becomes apparent when the device is very small.

For the second case, the 2k device, the size rounds down from 2k to 0k. My suspicion is that the device then interprets the size of "0" as meaning we should use the default size, which is the the size of the entire backing device. Potentially VDO should not allow the creation of a device smaller that 4k.

I have no particular insight into the third case, but it looks (based on the logged messages) that something is deliberately rounding the size down to 2T even though the VDO device could be bigger. This is not something the VDO device itself will do.

Comment 2 Zdenek Kabelac 2021-08-31 20:09:20 UTC
Pushed this fix for large conversion of large sized VDO volumes:

https://listman.redhat.com/archives/lvm-devel/2021-August/msg00046.html

I'm not quite sure what is the issue with 10K device - LV could only express size in extents and I believe VDO provides devices with 4K granularity.

So 10K vdo is  8K and lvm2 should be make it properly unless I'm missing something.

Comment 7 Corey Marthaler 2021-09-14 16:37:20 UTC
The 2K scenario remains the same, which appears expected based on comment #2, the 3T scenario is now fixed with the latest scratch build.
Marking Verified tested with the latest rpms.


kernel-4.18.0-340.el8    BUILT: Thu Sep  2 16:16:14 CDT 2021
lvm2-2.03.12-9.el8    BUILT: Tue Sep 14 09:53:56 CDT 2021
lvm2-libs-2.03.12-9.el8    BUILT: Tue Sep 14 09:53:56 CDT 2021



# 2K
[root@hayes-03 ~]# vdo create --force --name vdoimport_sanity --vdoLogicalSize 2k --device /dev/sdc1
Creating VDO vdoimport_sanity
      Logical blocks defaulted to 115646516 blocks.
      The VDO volume can address 442 GB in 221 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.
Starting VDO vdoimport_sanity
Starting compression on VDO vdoimport_sanity
VDO instance 29 volume is ready at /dev/mapper/vdoimport_sanity

[root@hayes-03 ~]# lvm_import_vdo --yes /dev/sdc1
Stopping VDO vdoimport_sanity
Converting VDO vdoimport_sanity
      Opening /dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1 exclusively
      Loading the VDO superblock and volume geometry
      Checking the VDO state
      Converting the UDS index
      Converting the VDO
      Conversion completed for '/dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/sdc1" successfully created.
  Volume group "vdovg" successfully created
  WARNING: Logical volume vdovg/vdolvol_vpool not zeroed.
  Logical volume "vdolvol_vpool" created.
  WARNING: Converting logical volume vdovg/vdolvol_vpool to VDO pool volume WITHOUT formating.
  WARNING: Using invalid VDO pool data MAY DESTROY YOUR DATA!
  Logical volume "vdolvol" created.
  Converted vdovg/vdolvol_vpool to VDO pool volume and created virtual vdovg/vdolvol VDO volume.

[root@hayes-03 ~]# lvs --units k
  LV            VG    Attr       LSize         Pool          Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vdolvol       vdovg vwi-a-v--- 462586064.00k vdolvol_vpool        0.00                                   
  vdolvol_vpool vdovg dwi------- 468318168.00k                      1.10                                   



# 3T
[root@hayes-03 ~]# vdo create --force --name vdoimport_sanity --vdoLogicalSize 3T --device /dev/sdc1
Creating VDO vdoimport_sanity
      The VDO volume can address 442 GB in 221 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.
Starting VDO vdoimport_sanity
Starting compression on VDO vdoimport_sanity
VDO instance 31 volume is ready at /dev/mapper/vdoimport_sanity

[root@hayes-03 ~]# lvm_import_vdo --yes /dev/sdc1
Stopping VDO vdoimport_sanity
Converting VDO vdoimport_sanity
      Opening /dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1 exclusively
      Loading the VDO superblock and volume geometry
      Checking the VDO state
      Converting the UDS index
      Converting the VDO
      Conversion completed for '/dev/disk/by-id/scsi-36d09466083d8e100233c17f420e3882f-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/sdc1" successfully created.
  Volume group "vdovg" successfully created
  WARNING: Logical volume vdovg/vdolvol_vpool not zeroed.
  Logical volume "vdolvol_vpool" created.
  WARNING: Converting logical volume vdovg/vdolvol_vpool to VDO pool volume WITHOUT formating.
  WARNING: Using invalid VDO pool data MAY DESTROY YOUR DATA!
  Logical volume "vdolvol" created.
  Converted vdovg/vdolvol_vpool to VDO pool volume and created virtual vdovg/vdolvol VDO volume.

[root@hayes-03 ~]# lvs --units t
  LV            VG    Attr       LSize Pool          Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vdolvol       vdovg vwi-a-v--- 3.00t vdolvol_vpool        0.00                                   
  vdolvol_vpool vdovg dwi------- 0.44t                      1.10

Comment 12 Corey Marthaler 2021-09-27 16:20:25 UTC
Marking VERIFIED in the latest rpms/kernel.

kernel-4.18.0-345.el8    BUILT: Thu Sep 23 18:34:50 CDT 2021
lvm2-2.03.12-10.el8    BUILT: Mon Sep 20 03:30:20 CDT 2021
lvm2-libs-2.03.12-10.el8    BUILT: Mon Sep 20 03:30:20 CDT 2021
vdo-6.2.5.74-14.el8    BUILT: Fri Aug 20 17:56:40 CDT 2021
kmod-kvdo-6.2.5.72-80.el8    BUILT: Fri Aug 27 10:26:23 CDT 2021



SCENARIO - [large_vdo_logical_size_convert_to_lvm]
Test the basic conversion of a large (4t) logical sized existent vdo volume to lvm (1996227)
vdo create --force --name lvm_import_vdo_sanity --vdoLogicalSize 4T --device /dev/sdc1
Creating VDO lvm_import_vdo_sanity
      The VDO volume can address 1 TB in 929 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.
Starting VDO lvm_import_vdo_sanity
Starting compression on VDO lvm_import_vdo_sanity
VDO instance 4 volume is ready at /dev/mapper/lvm_import_vdo_sanity

lvm_import_vdo --yes /dev/disk/by-id/scsi-36d094660575ece002291b9e01bad8691-part1
Stopping VDO lvm_import_vdo_sanity
Converting VDO lvm_import_vdo_sanity
      Opening /dev/disk/by-id/scsi-36d094660575ece002291b9e01bad8691-part1 exclusively
      Loading the VDO superblock and volume geometry
      Checking the VDO state
      Converting the UDS index
      Converting the VDO
      Conversion completed for '/dev/disk/by-id/scsi-36d094660575ece002291b9e01bad8691-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/disk/by-id/scsi-36d094660575ece002291b9e01bad8691-part1" successfully created.
  Creating devices file /etc/lvm/devices/system.devices
  Volume group "vdovg" successfully created
  Logical volume "vdolvol_vpool" created.
  WARNING: Logical volume vdovg/vdolvol_vpool not zeroed.
  WARNING: Converting logical volume vdovg/vdolvol_vpool to VDO pool volume WITHOUT formating.
  WARNING: Using invalid VDO pool data MAY DESTROY YOUR DATA!
  Logical volume "vdolvol" created.
  Converted vdovg/vdolvol_vpool to VDO pool volume and created virtual vdovg/vdolvol VDO volume.
lvremove -f vdovg
  Logical volume "vdolvol" successfully removed.
vgremove -f vdovg
  Volume group "vdovg" successfully removed
pvremove /dev/sdc1
  Labels on physical volume "/dev/sdc1" successfully wiped.
lvmdevices -y --deldev /dev/sdc1

SCENARIO - [small_vdo_logical_size_convert_to_lvm]
Test the basic conversion of a small (3k) logical sized existent vdo volume to lvm (1996227)
vdo create --force --name lvm_import_vdo_sanity --vdoLogicalSize 3k --device /dev/sdc1
Creating VDO lvm_import_vdo_sanity
      Logical blocks defaulted to 486134360 blocks.
      The VDO volume can address 1 TB in 929 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.
Starting VDO lvm_import_vdo_sanity
Starting compression on VDO lvm_import_vdo_sanity
VDO instance 6 volume is ready at /dev/mapper/lvm_import_vdo_sanity

lvm_import_vdo --yes /dev/disk/by-id/scsi-36d094660575ece002291b9e01bad8691-part1
Stopping VDO lvm_import_vdo_sanity
Converting VDO lvm_import_vdo_sanity
      Opening /dev/disk/by-id/scsi-36d094660575ece002291b9e01bad8691-part1 exclusively
      Loading the VDO superblock and volume geometry
      Checking the VDO state
      Converting the UDS index
      Converting the VDO
      Conversion completed for '/dev/disk/by-id/scsi-36d094660575ece002291b9e01bad8691-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/disk/by-id/scsi-36d094660575ece002291b9e01bad8691-part1" successfully created.
  Volume group "vdovg" successfully created
  Logical volume "vdolvol_vpool" created.
  WARNING: Logical volume vdovg/vdolvol_vpool not zeroed.
  WARNING: Converting logical volume vdovg/vdolvol_vpool to VDO pool volume WITHOUT formating.
  WARNING: Using invalid VDO pool data MAY DESTROY YOUR DATA!
  Logical volume "vdolvol" created.
  Converted vdovg/vdolvol_vpool to VDO pool volume and created virtual vdovg/vdolvol VDO volume.

lvm logical volume size 1944537440.00k doesn't match the specified vdo logical size 3.00k
(this was never fixed as a part of the solution for bug 1996227)

lvremove -f vdovg
  Logical volume "vdolvol" successfully removed.
vgremove -f vdovg
  Volume group "vdovg" successfully removed
pvremove /dev/sdc1
  Labels on physical volume "/dev/sdc1" successfully wiped.
lvmdevices -y --deldev /dev/sdc1

Comment 14 errata-xmlrpc 2021-11-09 19:45:56 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-2021:4431


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