Bug 1988504
| Summary: | what's the plan if a script or user fails to answer "y" to the vdoimport "convert vdovg/vdolvol_vpool" question? | |||
|---|---|---|---|---|
| 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, prajnoha, zkabelac | |
| Version: | 8.5 | Keywords: | Triaged | |
| Target Milestone: | beta | Flags: | pm-rhel:
mirror+
|
|
| 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: | ||||
| : | 2005004 (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, 2005004 | |||
Not yet good answer to this question. We have 2 options - lvm_import_vdo could store 2M into a file and restore this 'header' portion. Or we could always run 'lvconvert -y' thus skipping this prompt which might be look confusing to a user. Further discussion is needed. Resolved by adding new prompt before whole conversion is started. When confirmed - it's equal like if user would have passed '--yes' - so there is no futher prompting, thus prompt should no longer cause aborted conversion process in the middle of import. Fixed with this patch: https://listman.redhat.com/archives/lvm-devel/2021-September/msg00005.html 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/ Enhanced error code return: https://listman.redhat.com/archives/lvm-devel/2021-September/msg00016.html *** Bug 2002791 has been marked as a duplicate of this bug. *** Fix verified in the latest scratch build.
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
[root@hayes-03 ~]# vdo create --force --name lvm_import_vdo_sanity --vdoLogicalSize 500G --device /dev/sdd1
Creating VDO lvm_import_vdo_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 lvm_import_vdo_sanity
Starting compression on VDO lvm_import_vdo_sanity
VDO instance 53 volume is ready at /dev/mapper/lvm_import_vdo_sanity
[root@hayes-03 ~]# lvm_import_vdo /dev/disk/by-id/scsi-36d09466083d8e100233c17f9212bf63e-part1
Convert VDO device "/dev/disk/by-id/scsi-36d09466083d8e100233c17f9212bf63e-part1" to VDO LV "vdovg/vdolvol"? [y|N]: No
[root@hayes-03 ~]# echo $?
1
[root@hayes-03 ~]# lvm_import_vdo /dev/disk/by-id/scsi-36d09466083d8e100233c17f9212bf63e-part1
Convert VDO device "/dev/disk/by-id/scsi-36d09466083d8e100233c17f9212bf63e-part1" to VDO LV "vdovg/vdolvol"? [y|N]: No
[root@hayes-03 ~]# echo $?
2
[root@hayes-03 ~]# vdo list
lvm_import_vdo_sanity
[root@hayes-03 ~]# lvs
Marking Verified in the latest.
kernel-4.18.0-343.el8 BUILT: Thu Sep 16 18:25:30 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 - [attempt_no_flag_answer_to_lvm_import_vdo_convert]
Test the proceedure for answering no to the lvm_import_vdo conversion question midway through the process (1988504)
vdo create --force --name lvm_import_vdo_sanity --vdoLogicalSize 500G --device /dev/sdd1
Creating VDO lvm_import_vdo_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 lvm_import_vdo_sanity
Starting compression on VDO lvm_import_vdo_sanity
VDO instance 397 volume is ready at /dev/mapper/lvm_import_vdo_sanity
echo n | lvm_import_vdo /dev/disk/by-id/scsi-36d09466083d8e100233c17f9212bf63e-part1
Convert VDO device "/dev/disk/by-id/scsi-36d09466083d8e100233c17f9212bf63e-part1" to VDO LV "vdovg/vdolvol"? [y|N]: No
lvm_import_vdo properly did not complete (and errored non zero) when answering no
vdo remove --name lvm_import_vdo_sanity
Removing VDO lvm_import_vdo_sanity
Stopping VDO lvm_import_vdo_sanity
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 |
Description of problem: If they answer no (or fail to answer yes), what's the plan since no vdo volume will exist anymore according to the vdo cmdline and no usable lv will exist according to the lvm cmdline. vdo create --force --name sanity --vdoLogicalSize 15G --device /dev/sdi1 Creating VDO sanity The VDO volume can address 928 GB in 464 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 sanity Starting compression on VDO sanity VDO instance 130 volume is ready at /dev/mapper/sanity [root@hayes-01 ~]# vdo list sanity # Using the --yes prompt [root@hayes-01 ~]# vdoimport --yes /dev/disk/by-id/scsi-36d094660575ece002291be7e6227ca72-part1 Device does not exist. Command failed. Volume group "vdovg" not found Cannot process volume group vdovg Stopping VDO sanity Converting VDO sanity Opening /dev/disk/by-id/scsi-36d094660575ece002291be7e6227ca72-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-36d094660575ece002291be7e6227ca72-part1': VDO is now offset by 2097152 bytes Physical volume "/dev/disk/by-id/scsi-36d094660575ece002291be7e6227ca72-part1" 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. # Vdo volume is gone according to vdo [root@hayes-01 ~]# vdo list # Usable LV vdovg/vdolvol exists [root@hayes-01 ~]# lvs -a -o +devices LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices vdolvol vdovg vwi-a-v--- 15.00g vdolvol_vpool 0.00 vdolvol_vpool(0) vdolvol_vpool vdovg dwi------- <931.25g 0.42 vdolvol_vpool_vdata(0) [vdolvol_vpool_vdata] vdovg Dwi-ao---- <931.25g /dev/sdi1(0) # Now, using the "no prompt" [root@hayes-01 ~]# vdo list sanity [root@hayes-01 ~]# echo n | vdoimport /dev/disk/by-id/scsi-36d094660575ece002291be7e6227ca72-part1 Device does not exist. Command failed. Volume group "vdovg" not found Cannot process volume group vdovg Stopping VDO sanity Converting VDO sanity Opening /dev/disk/by-id/scsi-36d094660575ece002291be7e6227ca72-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-36d094660575ece002291be7e6227ca72-part1': VDO is now offset by 2097152 bytes Physical volume "/dev/disk/by-id/scsi-36d094660575ece002291be7e6227ca72-part1" 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! Do you really want to convert vdovg/vdolvol_vpool? [y/n]: Conversion aborted. # Vdo volume is gone according to vdo [root@hayes-01 ~]# vdo list # No usable LV vdovg/vdolvol exists, now what? [root@hayes-01 ~]# lvs -a -o +devices LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices vdolvol_vpool vdovg -wi-a----- <931.25g /dev/sdi1(0) Version-Release number of selected component (if applicable): kernel-4.18.0-323.el8 BUILT: Wed Jul 14 12:12:22 CDT 2021 lvm2-2.03.12-5.el8 BUILT: Tue Jul 13 11:50:03 CDT 2021 lvm2-libs-2.03.12-5.el8 BUILT: Tue Jul 13 11:50:03 CDT 2021 vdo-6.2.5.65-14.el8 BUILT: Thu Jul 22 12:56:43 CDT 2021 kmod-kvdo-6.2.5.65-79.el8 BUILT: Thu Jul 22 12:59:43 CDT 2021