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 1988504 - what's the plan if a script or user fails to answer "y" to the vdoimport "convert vdovg/vdolvol_vpool" question?
Summary: what's the plan if a script or user fails to answer "y" to the vdoimport "con...
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:
: 2002791 (view as bug list)
Depends On:
Blocks: 1930261 2005004
TreeView+ depends on / blocked
 
Reported: 2021-07-30 17:03 UTC by Corey Marthaler
Modified: 2023-09-03 14:08 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.03.12-9.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2005004 (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-4882 0 None None None 2021-09-09 05:03:40 UTC
Red Hat Product Errata RHBA-2021:4431 0 None None None 2021-11-09 19:46:11 UTC

Description Corey Marthaler 2021-07-30 17:03:54 UTC
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

Comment 1 Zdenek Kabelac 2021-08-31 20:13:23 UTC
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.

Comment 2 Zdenek Kabelac 2021-09-06 17:31:40 UTC
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

Comment 7 Zdenek Kabelac 2021-09-14 14:33:33 UTC
Enhanced error code return:

https://listman.redhat.com/archives/lvm-devel/2021-September/msg00016.html

Comment 8 Zdenek Kabelac 2021-09-14 14:34:29 UTC
*** Bug 2002791 has been marked as a duplicate of this bug. ***

Comment 9 Corey Marthaler 2021-09-14 19:18:30 UTC
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

Comment 13 Corey Marthaler 2021-09-22 20:04:00 UTC
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

Comment 15 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.