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 2031775 - Option --devices is unsupported with thins / snapshots
Summary: Option --devices is unsupported with thins / snapshots
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: lvm2
Version: 9.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1942219 1967212
TreeView+ depends on / blocked
 
Reported: 2021-12-13 12:15 UTC by Jan Stodola
Modified: 2023-09-15 01:50 UTC (History)
12 users (show)

Fixed In Version: lvm2-2.03.14-3.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-17 15:56:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-105520 0 None None None 2021-12-13 12:17:29 UTC
Red Hat Product Errata RHBA-2022:3972 0 None None None 2022-05-17 15:56:40 UTC

Description Jan Stodola 2021-12-13 12:15:02 UTC
Description of problem:
Installation fails with the following traceback when a thin LV/snapshot is created in the kickstart file:

...
INFO:program:Running [58] lvm lvcreate -T -L 7168000K --poolmetadatasize=8192K --chunksize=64K fedora/pool --config= log {level=7 file=/tmp/lvm.log syslog=0} --devices=/dev/vda2 ...
INFO:program:stdout[58]: 
INFO:program:stderr[58]:   Option --devices is unsupported with thins.
  Run `lvcreate --help' for more information.

INFO:program:...done [58] (exit code: 3)
INFO:anaconda.threading:Thread Failed: AnaTaskThread-CreateStorageLayoutTask-1 (139678814934592)
ERROR:anaconda.modules.common.task.task:Thread AnaTaskThread-CreateStorageLayoutTask-1 has failed: Traceback (most recent call last):
  File "/usr/lib64/python3.9/site-packages/gi/overrides/BlockDev.py", line 1075, in wrapped
    ret = orig_obj(*args, **kwargs)
  File "/usr/lib64/python3.9/site-packages/gi/overrides/BlockDev.py", line 645, in lvm_thpoolcreate
    return _lvm_thpoolcreate(vg_name, lv_name, size, md_size, chunk_size, profile, extra)
gi.repository.GLib.GError: g-bd-utils-exec-error-quark: Process reported exit code 3:   Option --devices is unsupported with thins.
  Run `lvcreate --help' for more information.
 (0)


Partitioning commands in the kickstart file:

bootloader --location=mbr
zerombr
clearpart --all --initlabel
part /boot --size=500
part pv.1 --fstype=lvmpv --size=10000
volgroup fedora pv.1
logvol swap  --name=swap --vgname=fedora --size=500 --fstype=swap
logvol none  --name=pool --vgname=fedora --size=7000 --thinpool
logvol /     --name=root --vgname=fedora --size=6000 --thin --poolname=pool


A similar issue when the "snapshot" kickstart command is used:
...
gi.overrides.BlockDev.LVMError: Process reported exit code 3:   Option --devices is unsupported with snapshots.
  Run `lvcreate --help' for more information.

(a kickstart file is available at https://github.com/rhinstaller/kickstart-tests/blob/master/snapshot-pre.ks.in)


Version-Release number of selected component (if applicable):
RHEL-9.0.0-20211210.d.3
lvm2-2.03.14-2.el9
python3-blivet-3.4.0-10.el9
libblockdev-2.25-10.el9

How reproducible:
Always

Steps to Reproduce:
1. Run a kickstart installation creating a thin LV or snapshot.

Actual results:
The installation fails with a traceback.

Expected results:
A successful installation.

Additional info:
This problem started to appear after enabling the --devices option for filtering devices in bugs 1967212, 1983705.
Reporting against lvm2 to clarify if this is an expected LVM behavior.

Comment 4 David Teigland 2021-12-13 15:34:07 UTC
lvm fix to include recent options in lvcreate-specific list of allowed options
https://sourceware.org/git/?p=lvm2.git;a=commit;h=c28541eccdbf76191f7728035cd2a48d26d06922

Comment 9 Corey Marthaler 2022-01-07 00:08:17 UTC
Marking Verified:Tested with the latest rpms.


# Without the fix

kernel-5.14.0-39.el9    BUILT: Thu Dec 23 10:43:17 PM CST 2021
lvm2-2.03.14-2.el9    BUILT: Thu Nov 18 11:39:23 AM CST 2021
lvm2-libs-2.03.14-2.el9    BUILT: Thu Nov 18 11:39:23 AM CST 2021


SCENARIO - option_devices_usages_with_thinpool_and_snapshots:  Test that option --devices is supported with thinpool virts and snapshots (bug 2031775) 
adding entry to the devices file for /dev/sdd1
creating PV on hayes-03 using device /dev/sdd1
pvcreate --yes -ff  /dev/sdd1
  Physical volume "/dev/sdd1" successfully created.
creating VG on hayes-03 using PV(s) /dev/sdd1
vgcreate   df /dev/sdd1
  Volume group "df" successfully created
removing entry from the devices file for /dev/sdd1
  No matching physical volumes found
lvcreate --yes --type thin-pool -L 500M -n thin_devices_attempt df --devices /dev/sdd1
Option --devices is unsupported with thin pools.
  Run `lvcreate --help' for more information.
Option --devices appears to be unsupported with thin pool (possible regression of bug 2031775)



# With the fix

kernel-5.14.0-39.el9    BUILT: Thu Dec 23 10:43:17 PM CST 2021
lvm2-2.03.14-3.el9    BUILT: Tue Jan  4 04:49:45 PM CST 2022
lvm2-libs-2.03.14-3.el9    BUILT: Tue Jan  4 04:49:45 PM CST 2022


SCENARIO - option_devices_usages_with_thinpool_and_snapshots:  Test that option --devices is supported with thinpool virts and snapshots (bug 2031775) 
adding entry to the devices file for /dev/sdd1
creating PV on hayes-03 using device /dev/sdd1
pvcreate --yes -ff  /dev/sdd1
WARNING: Heartbeat did not respond at start of command.  Check btimed service on remote host
  Physical volume "/dev/sdd1" successfully created.
creating VG on hayes-03 using PV(s) /dev/sdd1
vgcreate   df /dev/sdd1
  Volume group "df" successfully created
removing entry from the devices file for /dev/sdd1
WARNING: Heartbeat did not respond at start of command.  Check btimed service on remote host
  No matching physical volumes found
lvcreate --yes --type thin-pool -L 500M -n thin_devices_attempt df --devices /dev/sdd1
Thin pool volume with chunk size 64.00 KiB can address at most <15.88 TiB of data.
  Logical volume "thin_devices_attempt" created.
adding entry to the devices file for /dev/sdd1
removing vg df from hayes-03
  Logical volume "thin_devices_attempt" successfully removed.
  Volume group "df" 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

Comment 13 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

Comment 14 Red Hat Bugzilla 2023-09-15 01:50:31 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days


Note You need to log in before you can comment on or make changes to this bug.