Bug 2005006

Summary: vdo to lvm conversion tool doesn't handle vdo logical sizes > 2T and < 10k [rhel-8.6.0]
Product: Red Hat Enterprise Linux 8 Reporter: RHEL Program Management Team <pgm-rhel-tools>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: VDO QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: urgent CC: agk, awalsh, cmarthal, heinzm, jbrassow, lmiksik, mcsontos, msakai, prajnoha, zkabelac
Version: 8.5Keywords: Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.03.14-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1996227 Environment:
Last Closed: 2022-05-10 15:22:14 UTC Type: ---
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: 1996227    
Bug Blocks:    

Comment 1 Zdenek Kabelac 2021-09-22 14:37:24 UTC
Fixed upstream in 2.03.14

Comment 3 Corey Marthaler 2021-11-08 20:34:03 UTC
Marking Verified:Tested in the latest rpms.

kernel-4.18.0-348.4.el8.kpq0    BUILT: Wed Oct 27 15:00:32 CDT 2021
lvm2-2.03.14-1.el8    BUILT: Wed Oct 20 10:18:17 CDT 2021
lvm2-libs-2.03.14-1.el8    BUILT: Wed Oct 20 10:18:17 CDT 2021
vdo-6.2.5.74-14.el8    BUILT: Fri Aug 20 17:56:40 CDT 2021
kmod-kvdo-6.2.5.72-81.8_6.el8    BUILT: Tue Oct 12 10:43:50 CDT 2021


Just like in the rhel8.5 version bug 1996227, only the 8.00k logical scenario actually matches. The 3.00k gets rounded WAY up by the VDO create cmd and the 10.00k gets rounded down by the vdo create cmd. So, neither of these are the fault of the lvm conversion tool.


SCENARIO - [small_vdo_logical_size_convert_to_lvm]
Test the basic conversion of a small (3k, 8k, 10k) logical sized existent vdo volume to lvm (1996227|2005006)

+++ vdo small size conversion: 3.00k +++
vdo create --force --name lvm_import_vdo_sanity --vdoLogicalSize 3.00k --device /dev/sdd1
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 169 volume is ready at /dev/mapper/lvm_import_vdo_sanity
lvm_import_vdo --yes /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-part1
Stopping VDO lvm_import_vdo_sanity
Converting VDO lvm_import_vdo_sanity
      Opening /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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-36d094660575ece002291ba5c230d16c6-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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.
Conversion size:1944537440.00k
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|2005006)
lvremove -f vdovg
  Logical volume "vdolvol" successfully removed.
vgremove -f vdovg
  Volume group "vdovg" successfully removed
pvremove /dev/sdd1
  Labels on physical volume "/dev/sdd1" successfully wiped.
lvmdevices -y --deldev /dev/sdd1


+++ vdo small size conversion: 8.00k +++
vdo create --force --name lvm_import_vdo_sanity --vdoLogicalSize 8.00k --device /dev/sdd1
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 171 volume is ready at /dev/mapper/lvm_import_vdo_sanity
lvm_import_vdo --yes /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-part1
Stopping VDO lvm_import_vdo_sanity
Converting VDO lvm_import_vdo_sanity
      Opening /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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-36d094660575ece002291ba5c230d16c6-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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.
Conversion size:8.00k
lvremove -f vdovg
  Logical volume "vdolvol" successfully removed.
vgremove -f vdovg
  Volume group "vdovg" successfully removed
pvremove /dev/sdd1
  Labels on physical volume "/dev/sdd1" successfully wiped.
lvmdevices -y --deldev /dev/sdd1


+++ vdo small size conversion: 10.00k +++
vdo create --force --name lvm_import_vdo_sanity --vdoLogicalSize 10.00k --device /dev/sdd1
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 173 volume is ready at /dev/mapper/lvm_import_vdo_sanity
lvm_import_vdo --yes /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-part1
Stopping VDO lvm_import_vdo_sanity
Converting VDO lvm_import_vdo_sanity
      Opening /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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-36d094660575ece002291ba5c230d16c6-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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.
Conversion size:8.00k
lvm logical volume size 8.00k doesn't match the specified vdo logical size 10.00k
(this was never fixed as a part of the solution for bug 1996227|2005006)
lvremove -f vdovg
  Logical volume "vdolvol" successfully removed.
vgremove -f vdovg
  Volume group "vdovg" successfully removed
pvremove /dev/sdd1
  Labels on physical volume "/dev/sdd1" successfully wiped.
lvmdevices -y --deldev /dev/sdd1

Comment 6 Corey Marthaler 2021-11-16 18:36:54 UTC
Marking Verified in the latest rpms.

kernel-4.18.0-348.4.el8.kpq0    BUILT: Wed Oct 27 15:00:32 CDT 2021
lvm2-2.03.14-1.el8    BUILT: Wed Oct 20 10:18:17 CDT 2021
lvm2-libs-2.03.14-1.el8    BUILT: Wed Oct 20 10:18:17 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/sdd1
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 6 volume is ready at /dev/mapper/lvm_import_vdo_sanity

lvm_import_vdo --yes /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-part1
Stopping VDO lvm_import_vdo_sanity
Converting VDO lvm_import_vdo_sanity
      Opening /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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-36d094660575ece002291ba5c230d16c6-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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.
Conversion size:4.00t
lvremove -f vdovg
  Logical volume "vdolvol" successfully removed.
vgremove -f vdovg
  Volume group "vdovg" successfully removed
pvremove /dev/sdd1
  Labels on physical volume "/dev/sdd1" successfully wiped.
lvmdevices -y --deldev /dev/sdd1

SCENARIO - small_vdo_logical_size_convert_to_lvm:  Test the basic conversion of a small (3k, 8k, 10k) logical sized existent vdo volume to lvm (1996227|2005006)

+++ vdo small size conversion: 3.00k +++
vdo create --force --name lvm_import_vdo_sanity --vdoLogicalSize 3.00k --device /dev/sdd1
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 8 volume is ready at /dev/mapper/lvm_import_vdo_sanity
lvm_import_vdo --yes /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-part1
Stopping VDO lvm_import_vdo_sanity
Converting VDO lvm_import_vdo_sanity
      Opening /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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-36d094660575ece002291ba5c230d16c6-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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.
Conversion size:1944537440.00k
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|2005006)
lvremove -f vdovg
  Logical volume "vdolvol" successfully removed.
vgremove -f vdovg
  Volume group "vdovg" successfully removed
pvremove /dev/sdd1
  Labels on physical volume "/dev/sdd1" successfully wiped.
lvmdevices -y --deldev /dev/sdd1
WARNING: Heartbeat did not respond at start of command.  Check btimed service on remote host


+++ vdo small size conversion: 8.00k +++
vdo create --force --name lvm_import_vdo_sanity --vdoLogicalSize 8.00k --device /dev/sdd1
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 10 volume is ready at /dev/mapper/lvm_import_vdo_sanity
lvm_import_vdo --yes /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-part1
Stopping VDO lvm_import_vdo_sanity
Converting VDO lvm_import_vdo_sanity
      Opening /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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-36d094660575ece002291ba5c230d16c6-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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.
Conversion size:8.00k
lvremove -f vdovg
  Logical volume "vdolvol" successfully removed.
vgremove -f vdovg
  Volume group "vdovg" successfully removed
pvremove /dev/sdd1
  Labels on physical volume "/dev/sdd1" successfully wiped.
lvmdevices -y --deldev /dev/sdd1


+++ vdo small size conversion: 10.00k +++
vdo create --force --name lvm_import_vdo_sanity --vdoLogicalSize 10.00k --device /dev/sdd1
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 12 volume is ready at /dev/mapper/lvm_import_vdo_sanity
lvm_import_vdo --yes /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-part1
Stopping VDO lvm_import_vdo_sanity
Converting VDO lvm_import_vdo_sanity
      Opening /dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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-36d094660575ece002291ba5c230d16c6-part1': VDO is now offset by 2097152 bytes
  Physical volume "/dev/disk/by-id/scsi-36d094660575ece002291ba5c230d16c6-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.
Conversion size:8.00k
lvm logical volume size 8.00k doesn't match the specified vdo logical size 10.00k
(this was never fixed as a part of the solution for bug 1996227|2005006)
lvremove -f vdovg
  Logical volume "vdolvol" successfully removed.
vgremove -f vdovg
  Volume group "vdovg" successfully removed
pvremove /dev/sdd1
  Labels on physical volume "/dev/sdd1" successfully wiped.
lvmdevices -y --deldev /dev/sdd1

Comment 8 errata-xmlrpc 2022-05-10 15:22:14 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:2038