Bug 1998264

Summary: Use of ky flag in lvcreate for vdo devices causes error
Product: Red Hat Enterprise Linux 9 Reporter: bjohnsto
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: VDO QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: agk, awalsh, cmarthal, heinzm, jbrassow, mcsontos, prajnoha, zkabelac
Version: 9.1   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.03.14-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 15:56:27 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:

Description bjohnsto 2021-08-26 17:32:36 UTC
Description of problem:

Attempted to use the ky and ay flags in lvcreate for vdo volumes and ran into the following error:

stderr:   Volume "vdo1/vdo0pool" is not active locally (volume_list activation filter?).

Version-Release number of selected component (if applicable):


How reproducible:

every time

Steps to Reproduce:
1. sudo lvcreate -ky --name vdo0 --vdopool vdo0pool --size 106942464K --virtualsize 20971520K --yes -ay vdo1
2. Observe error 

Actual results:

Error

Expected results:

Device would be created but would have auto activation turned off.

Additional info:

Comment 1 bjohnsto 2021-08-26 17:38:18 UTC
This also should occur in rhel8

Comment 2 Zdenek Kabelac 2021-08-31 21:33:35 UTC
Pushed upstream: https://listman.redhat.com/archives/lvm-devel/2021-August/msg00045.html
to resolve lvcreate with skipped activation.

Also pushed: https://listman.redhat.com/archives/lvm-devel/2021-August/msg00043.html
to avoid unnecessary zeroing of VDO LVs - as they are 'zeroed' implicitly.

Comment 6 Corey Marthaler 2021-11-10 17:02:12 UTC
Marking verified in the latest 9.0 rpms.

# Before fix (lvm2-2.03.13-2.el9_b)
[root@hayes-03 ~]# lvcreate -ky --name activationskip --vdopool vdopool --size 106942464K --virtualsize 20971520K --yes -ay vdo_sanity
  Volume vdo_sanity/vdopool is not active locally (volume_list activation filter?).
  Aborting. Failed to wipe start of new LV.


# After fix

kernel-5.14.0-10.el9    BUILT: Tue Oct 26 07:00:13 PM CDT 2021
lvm2-2.03.14-1.el9    BUILT: Wed Oct 20 11:22:27 AM CDT 2021
lvm2-libs-2.03.14-1.el9    BUILT: Wed Oct 20 11:22:27 AM CDT 2021


SCENARIO - setactivationskip_create
Test VDO creation using -ky setactivationskip, ensuring no wipe failure (bug 1998264)
creating PV on hayes-03 using device /dev/sdd1
pvcreate --yes -ff  /dev/sdd1
  Physical volume "/dev/sdd1" successfully created.
  Creating devices file /etc/lvm/devices/system.devices
creating PV on hayes-03 using device /dev/sdc1
pvcreate --yes -ff  /dev/sdc1
  Physical volume "/dev/sdc1" successfully created.
creating PV on hayes-03 using device /dev/sdb1
pvcreate --yes -ff  /dev/sdb1
  Physical volume "/dev/sdb1" successfully created.
creating PV on hayes-03 using device /dev/sdh1
pvcreate --yes -ff  /dev/sdh1
  Physical volume "/dev/sdh1" successfully created.
creating VG on hayes-03 using PV(s) /dev/sdd1 /dev/sdc1 /dev/sdb1 /dev/sdh1
vgcreate   vdo_sanity /dev/sdd1 /dev/sdc1 /dev/sdb1 /dev/sdh1
  WARNING: Devices have inconsistent physical block sizes (4096 and 512).
  Volume group "vdo_sanity" successfully created

Attempt to create a VDO volume using the -ky setactivationskip flag on hayes-03 (bug 1998264)
lvcreate -ky --name activationskip --vdopool vdopool --size 106942464K --virtualsize 20971520K --yes -ay vdo_sanity
The VDO volume can address 98 GB in 49 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.
  Logical volume "activationskip" created.

removing vg vdo_sanity from hayes-03
  Logical volume "activationskip" successfully removed.
  Volume group "vdo_sanity" successfully removed
removing pv /dev/sdd1 on hayes-03
  Labels on physical volume "/dev/sdd1" successfully wiped.
removing entry from the devices file for /dev/sdd1
removing pv /dev/sdc1 on hayes-03
  Labels on physical volume "/dev/sdc1" successfully wiped.
removing entry from the devices file for /dev/sdc1
removing pv /dev/sdb1 on hayes-03
  Labels on physical volume "/dev/sdb1" successfully wiped.
removing entry from the devices file for /dev/sdb1
removing pv /dev/sdh1 on hayes-03
  Labels on physical volume "/dev/sdh1" successfully wiped.
removing entry from the devices file for /dev/sdh1

Comment 9 Corey Marthaler 2021-11-16 16:06:58 UTC
Marking Verified in the latest rpms.

kernel-5.14.0-10.el9    BUILT: Tue Oct 26 07:00:13 PM CDT 2021
lvm2-2.03.14-1.el9    BUILT: Wed Oct 20 11:22:27 AM CDT 2021
lvm2-libs-2.03.14-1.el9    BUILT: Wed Oct 20 11:22:27 AM CDT 2021


# Attempt to create a VDO volume using the -ky setactivationskip flag on hayes-03 (bug 1998264)
lvcreate -ky --name activationskip --vdopool vdopool --size 106942464K --virtualsize 20971520K --yes -ay vdo_sanity
The VDO volume can address 98 GB in 49 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.
  Logical volume "activationskip" created.

Comment 11 errata-xmlrpc 2022-05-17 15:56:27 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 (new packages: lvm2), 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:3972