Bug 1996227
Summary: | vdo to lvm conversion tool doesn't handle vdo logical sizes > 2T and < 10k | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Corey Marthaler <cmarthal> | |
Component: | lvm2 | Assignee: | 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, heinzm, jbrassow, lmiksik, mcsontos, msakai, prajnoha, zkabelac | |
Version: | 8.5 | Keywords: | Triaged | |
Target Milestone: | beta | |||
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | lvm2-2.03.12-9.el8 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2005006 (view as bug list) | Environment: | ||
Last Closed: | 2021-11-09 19:45:56 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1930261, 2005006 |
Description
Corey Marthaler
2021-08-20 23:04:13 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. 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. Scratch build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=39647501 Repo: http://brew-task-repos.usersys.redhat.com/repos/scratch/mcsontos/lvm2/2.03.12/9.el8/ 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 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 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 |