Bug 2233901
| Summary: | lvm_import_vdo fails to import - 'vdoprepareforlvm: Failed to open' | ||
|---|---|---|---|
| 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: | urgent | ||
| Priority: | unspecified | CC: | agk, awalsh, dlehman, heinzm, jbrassow, jwboyer, mcsontos, prajnoha, shdunne, zkabelac |
| Version: | 8.9 | Keywords: | Regression, Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.03.14-13.el8_9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-11-14 15:52:08 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: | |||
[root@virt-047 ~]# dmsetup ls VDO_lvm_import_vdo_50862250_snap (253:2) [root@virt-047 ~]# dmsetup table VDO_lvm_import_vdo_50862250_snap: 0 157286400 snapshot 8:16 7:0 P 32 Aug 24 00:48:36 grant-01 vdo[5625]: ERROR - Device lvm_import_vdo_sanity could not be converted; vdoprepareforlvm: Failed to open '/dev/disk/by-id/ata-HFS480G32FEH-BA10A_ESB1N6680I1501N6B' exclusively : Device or resource busy Aug 24 00:48:36 grant-01 vdo[5625]: ERROR - vdoprepareforlvm: Failed to open '/dev/disk/by-id/ata-HFS480G32FEH-BA10A_ESB1N6680I1501N6B' exclusively : Device or resource busy Ok - so there were couple issue that were problematic. There are now upstreamed to patches: https://gitlab.com/lvmteam/lvm2/-/commit/b81835b5ca2c3ccb31e8c4ce88e62e0a6a7e16fe This patch internally switches to the name used within the vdoconf.yml. As a test workaround user should be able to pass that path i.e.: # lvm_import_vdo '/dev/disk/by-id/ata-HFS480G32FEH-BA10A_ESB1N6680I1501N6B' instead of using '/dev/sdb' 2nd. patch: https://gitlab.com/lvmteam/lvm2/-/commit/c693aa8dacf61fac3f08ec65bec204c4b4d29d3d Cleans some error paths and makes overall tracing of this script more useful. This scratch build doesn't work. [root@virt-242 ~]# lvm_import_vdo --yes --name vdovg/lvm_import_vdo_sanity_new /dev/sda Stopping VDO lvm_import_vdo_sanity_new vdo: WARNING - VDO service lvm_import_vdo_sanity_new already stopped sed: -e expression #1, char 85: unknown option to `s' [root@virt-242 ~]# echo $? 1 + DEVICE=/dev/disk/by-id/scsi-1LIO-ORGcluster152688-d:0618652b-2df0-4693-9c9f-995b89c3e57e-part1 + case "$DM_UUID" in + convert_non_lv_ 524288000 + local vdo_logicalSize=524288000 + local vdo_logicalSizeRounded + local extent_size + local output + local pvfree + '[' 1 = 1 ']' + dry snapshot_create_ /dev/disk/by-id/scsi-1LIO-ORGcluster152688-d:0618652b-2df0-4693-9c9f-995b89c3e57e-part1 + '[' 0 -ne 0 ']' + verbose Executing snapshot_create_ /dev/disk/by-id/scsi-1LIO-ORGcluster152688-d:0618652b-2df0-4693-9c9f-995b89c3e57e-part1 + test -z '' + snapshot_create_ /dev/disk/by-id/scsi-1LIO-ORGcluster152688-d:0618652b-2df0-4693-9c9f-995b89c3e57e-part1 + VDO_DM_SNAPSHOT_NAME=VDO_lvm_import_vdo_100662161_snap + local file=/tmp/VDO_lvm_import_vdo_100662161/VDO_lvm_import_vdo_100662161_snap + truncate -s 20M /tmp/VDO_lvm_import_vdo_100662161/VDO_lvm_import_vdo_100662161_snap ++ losetup -f --show /tmp/VDO_lvm_import_vdo_100662161/VDO_lvm_import_vdo_100662161_snap + VDO_SNAPSHOT_LOOP=/dev/loop2 ++ snapshot_target_line_ /dev/disk/by-id/scsi-1LIO-ORGcluster152688-d:0618652b-2df0-4693-9c9f-995b89c3e57e-part1 /dev/loop2 +++ blockdev --getsize /dev/disk/by-id/scsi-1LIO-ORGcluster152688-d:0618652b-2df0-4693-9c9f-995b89c3e57e-part1 ++ echo '0 157286320 snapshot /dev/disk/by-id/scsi-1LIO-ORGcluster152688-d:0618652b-2df0-4693-9c9f-995b89c3e57e-part1 /dev/loop2 P 32' + dmsetup create VDO_lvm_import_vdo_100662161_snap -u -VDO_lvm_import_vdo_100662161_snap-priv --table '0 157286320 snapshot /dev/disk/by-id/scsi-1LIO-ORGcluster152688-d:0618652b-2df0-4693-9c9f-995b89c3e57e-part1 /dev/loop2 P 32' + VDO_DM_SNAPSHOT_DEVICE=/dev/mapper/VDO_lvm_import_vdo_100662161_snap + verbose 'Snapshot of VDO device /dev/disk/by-id/scsi-1LIO-ORGcluster152688-d:0618652b-2df0-4693-9c9f-995b89c3e57e-part1 created: /dev/mapper/VDO_lvm_import_vdo_100662161_snap.' + test -z '' + sed s:/dev/disk/by-id/scsi-1LIO-ORGcluster152688-d:0618652b-2df0-4693-9c9f-995b89c3e57e-part1:/dev/mapper/VDO_lvm_import_vdo_100662161_snap: /tmp/VDO_lvm_import_vdo_100662161/vdoconf.yml sed: -e expression #1, char 91: unknown option to `s' It appears to work now, however there is still an ioctl failure being displayed with the latest:
device-mapper: remove ioctl on VDO_lvm_import_vdo_90306623_snap failed: Device or resource busy Command failed.
[root@virt-242 ~]# vdo create --force --name lvm_import_vdo_sanity --vdoLogicalSize 500G --device /dev/sda1
Creating VDO lvm_import_vdo_sanity
The VDO volume can address 72 GB in 36 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
[root@virt-242 ~]# lvm_import_vdo --yes /dev/sda1
Stopping VDO lvm_import_vdo_sanity
Converting VDO lvm_import_vdo_sanity
Checking device
Non converted VDO. Converting to LVM
Opening /dev/mapper/VDO_lvm_import_vdo_90306623_snap exclusively
Loading the VDO superblock and volume geometry
Checking the VDO state
New geometry block offset calculated at 2056192
Converting the UDS index
Converting the VDO
Conversion completed for '/dev/mapper/VDO_lvm_import_vdo_90306623_snap': VDO is now aligned on 2097152 bytes, starting at offset 2056192
Physical volume "/dev/mapper/VDO_lvm_import_vdo_90306623_snap" 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.
0 logical volume(s) in volume group "vdovg" now active
Volume group "vdovg" successfully changed
device-mapper: remove ioctl on VDO_lvm_import_vdo_90306623_snap failed: Device or resource busy
Command failed.
Volume group "vdovg" successfully changed
[root@virt-242 ~]# echo $?
0
[root@virt-242 ~]# lvs -a -o +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
root rhel_virt-242 -wi-ao---- <6.20g /dev/vda2(205)
swap rhel_virt-242 -wi-ao---- 820.00m /dev/vda2(0)
vdolvol vdovg vwi-a-v--- 500.00g vdolvol_vpool 0.00 vdolvol_vpool(0)
vdolvol_vpool vdovg dwi------- <75.00g 4.06 vdolvol_vpool_vdata(0)
[vdolvol_vpool_vdata] vdovg Dwi-ao---- <75.00g /dev/sda1(0)
The latest build does NOT have the fixes described in comment #15. kernel-4.18.0-513.1.1.el8_9 BUILT: Wed Sep 6 16:32:22 CEST 2023 lvm2-2.03.14-13.el8_9 BUILT: Wed Sep 13 15:23:07 CEST 2023 lvm2-libs-2.03.14-13.el8_9 BUILT: Wed Sep 13 15:23:07 CEST 2023 lvm_import_vdo --yes /dev/disk/by-id/scsi-1LIO-ORGcluster153229-d:b882991f-b574-4e27-ab8a-d11b4c55bc5f Stopping VDO lvm_import_vdo_sanity Converting VDO lvm_import_vdo_sanity Checking device Non converted VDO. Converting to LVM Opening /dev/mapper/VDO_lvm_import_vdo_223932607_snap exclusively Loading the VDO superblock and volume geometry Checking the VDO state New geometry block offset calculated at 2097152 Converting the UDS index Converting the VDO Conversion completed for '/dev/mapper/VDO_lvm_import_vdo_223932607_snap': VDO is now aligned on 2097152 bytes, starting at offset 2097152 Physical volume "/dev/mapper/VDO_lvm_import_vdo_223932607_snap" 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. lvextend: unrecognized option '--fs' Error during parsing of command line. lvm_import_vdo should have worked using a large vdo logical size Additional issues that have come from the testing of this issue: https://issues.redhat.com/browse/RHEL-3530 https://issues.redhat.com/browse/RHEL-3529 The lvm_import_vdo regression tests have passed on this latest attached script. Marking this Verified:Tested in the latest build. kernel-4.18.0-513.1.1.el8_9 BUILT: Wed Sep 6 16:32:22 CEST 2023 lvm2-2.03.14-13.el8_9 BUILT: Mon Sep 18 11:27:08 CEST 2023 lvm2-libs-2.03.14-13.el8_9 BUILT: Mon Sep 18 11:27:08 CEST 2023 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:7191 |
Description of problem: [root@virt-047 ~]# vdo create --force --name lvm_import_vdo_sanity2 --vdoLogicalSize 50G --device /dev/sdb Creating VDO lvm_import_vdo_sanity2 The VDO volume can address 72 GB in 36 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_sanity2 Starting compression on VDO lvm_import_vdo_sanity2 VDO instance 0 volume is ready at /dev/mapper/lvm_import_vdo_sanity2 [root@virt-047 ~]# lvm_import_vdo --yes --name vdovg2/lvm_import_vdo_sanity2 /dev/sdb Stopping VDO lvm_import_vdo_sanity2 vdo: ERROR - Device lvm_import_vdo_sanity2 could not be converted; vdoprepareforlvm: Failed to open '/dev/disk/by-id/scsi-1LIO-ORGcluster151790-d:7eb9b61c-ed69-4ff5-9de4-256964f8e0fa' exclusively : Device or resource busy vdo: ERROR - vdoprepareforlvm: Failed to open '/dev/disk/by-id/scsi-1LIO-ORGcluster151790-d:7eb9b61c-ed69-4ff5-9de4-256964f8e0fa' exclusively : Device or resource busy Version-Release number of selected component (if applicable): kernel-4.18.0-511.el8 BUILT: Fri Aug 18 17:12:35 CEST 2023 lvm2-2.03.14-11.el8 BUILT: Thu Jul 27 18:17:12 CEST 2023 lvm2-libs-2.03.14-11.el8 BUILT: Thu Jul 27 18:17:12 CEST 2023 lvm2-dbusd-2.03.14-11.el8 BUILT: Thu Jul 27 18:17:45 CEST 2023 lvm2-lockd-2.03.14-11.el8 BUILT: Thu Jul 27 18:17:12 CEST 2023 vdo-6.2.9.7-14.el8 BUILT: Wed May 24 21:36:13 CEST 2023 kmod-kvdo-6.2.8.7-92.el8 BUILT: Thu Aug 3 21:45:01 CEST 2023 How reproducible: Everytime