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 1544914 - boom should deal w/ user providing --rootlv /dev/vg/lv format
Summary: boom should deal w/ user providing --rootlv /dev/vg/lv format
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.5
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Bryn M. Reeves
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-13 18:09 UTC by Corey Marthaler
Modified: 2021-09-03 12:36 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.02.177-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 15:25:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0853 0 None None None 2018-04-10 15:25:32 UTC

Description Corey Marthaler 2018-02-13 18:09:52 UTC
Description of problem:
The boom man page only shows examples of --roolv using the "vg/lv" format, but doesn't say "/dev/vg/lv" isn't allowed. Also, it appears boom deals with /dev/... with the --root-device option properly. 

[root@host-084 ~]# boom create --title "thin snapshot 1" --rootlv /dev/rhel_host-084/thin_snap1
Created entry with boot_id ad31c57:
  title thin snapshot 1
  machine-id fd56e7293a24478599960151915fe1e4
  version 3.10.0-847.el7.x86_64
  linux /vmlinuz-3.10.0-847.el7.x86_64
  initrd /initramfs-3.10.0-847.el7.x86_64.img
  options root=/dev//dev/rhel_host-084/thin_snap1 ro rd.lvm.lv=/dev/rhel_host-084/thin_snap1 rhgb quiet

[root@host-084 ~]# boom create --title "thin snapshot 1" --root-device /dev/rhel_host-084/thin_snap1
Created entry with boot_id 12b63e0:
  title thin snapshot 1
  machine-id fd56e7293a24478599960151915fe1e4
  version 3.10.0-847.el7.x86_64
  linux /vmlinuz-3.10.0-847.el7.x86_64
  initrd /initramfs-3.10.0-847.el7.x86_64.img
  options root=/dev/rhel_host-084/thin_snap1 ro  rhgb quiet

[root@host-084 ~]# boom create --title "thin snapshot 1" --root-device /dev/vda2
Created entry with boot_id 91cd04f:
  title thin snapshot 1
  machine-id fd56e7293a24478599960151915fe1e4
  version 3.10.0-847.el7.x86_64
  linux /vmlinuz-3.10.0-847.el7.x86_64
  initrd /initramfs-3.10.0-847.el7.x86_64.img
  options root=/dev/vda2 ro  rhgb quiet

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Marian Csontos 2018-02-14 09:02:59 UTC
(In reply to Corey Marthaler from comment #0)
> Description of problem:
> The boom man page only shows examples of --roolv using the "vg/lv" format,
> but doesn't say "/dev/vg/lv" isn't allowed. Also, it appears boom deals with
> /dev/... with the --root-device option properly. 

It does not.

> 
> [root@host-084 ~]# boom create --title "thin snapshot 1" --rootlv
> /dev/rhel_host-084/thin_snap1
> Created entry with boot_id ad31c57:
>   title thin snapshot 1
>   machine-id fd56e7293a24478599960151915fe1e4
>   version 3.10.0-847.el7.x86_64
>   linux /vmlinuz-3.10.0-847.el7.x86_64
>   initrd /initramfs-3.10.0-847.el7.x86_64.img
>   options root=/dev//dev/rhel_host-084/thin_snap1 ro
> rd.lvm.lv=/dev/rhel_host-084/thin_snap1 rhgb quiet
> 
> [root@host-084 ~]# boom create --title "thin snapshot 1" --root-device
> /dev/rhel_host-084/thin_snap1
> Created entry with boot_id 12b63e0:
>   title thin snapshot 1
>   machine-id fd56e7293a24478599960151915fe1e4
>   version 3.10.0-847.el7.x86_64
>   linux /vmlinuz-3.10.0-847.el7.x86_64
>   initrd /initramfs-3.10.0-847.el7.x86_64.img
>   options root=/dev/rhel_host-084/thin_snap1 ro  rhgb quiet

rd.lvm.lv is missing here ^

> 
> [root@host-084 ~]# boom create --title "thin snapshot 1" --root-device
> /dev/vda2
> Created entry with boot_id 91cd04f:
>   title thin snapshot 1
>   machine-id fd56e7293a24478599960151915fe1e4
>   version 3.10.0-847.el7.x86_64
>   linux /vmlinuz-3.10.0-847.el7.x86_64
>   initrd /initramfs-3.10.0-847.el7.x86_64.img
>   options root=/dev/vda2 ro  rhgb quiet
> 

Shall we open a separate bug for --root-device with LV?

Should --root-device try to identify the device, and if it is LV (or btrfs, or...) use proper kernel options? What is the component which sets kernel options (rd.lvm.lv, rd.luks.uuid,...) for root FS during installation? And shall boom use the same? RFE?

Comment 4 Marian Csontos 2018-02-14 09:13:52 UTC
Could we get a blocker for this?

Risks: None. boom is new package, so we should get as much fixes as QE is reporting.

Benefits: Less reports from customers/users.

Comment 5 Bryn M. Reeves 2018-02-14 10:24:32 UTC
We should have both in 7.5 imho: they're oversights that got missed during the last weeks of development and both should be handled (by a similar logic: the infrastructure for this is already there).

Comment 6 Bryn M. Reeves 2018-02-14 12:14:27 UTC
commit e87835deba2036238d29ab0c566a0cf3b1c6b39c
Author: Bryn M. Reeves <bmr>
Date:   Wed Feb 14 11:09:25 2018 +0000

    boom: attempt to parse LV name from --root-device
    
    If --root-device is given, but --root-lv is not, attempt to parse
    the LVM2 logical volume name from the device string passed for
    --root-device. If this fails it is a non-LVM device and no error
    is reported (unless it fails the device presence check).
    Otherwise the parsed name is taken as the value of --root-lv and
    passed to the rd.lvm.lv parameter in generated boot entries.
    
    Signed-off-by: Bryn M. Reeves <bmr>

commit e22d937babff32560d1aa613afc5ba408aad749a
Author: Bryn M. Reeves <bmr>
Date:   Wed Feb 14 11:02:58 2018 +0000

    boom: allow /dev/vg/lv notation for --root-lv
    
    Allow the use of the /dev prefix when specifying an LVM2 logical
    volume (permitted by the LVM2 tools) and automatically remove
    it when specifying rd.lvm.lv.
    
    Also attempt to check that the LV name is in a valid format and
    generate an error if the --rootlv and --rootdevice arguments do
    not match.
    
    Signed-off-by: Bryn M. Reeves <bmr>

Comment 8 Corey Marthaler 2018-02-14 23:31:40 UTC
Fix verified in the latest rpms.

3.10.0-848.el7.x86_64

lvm2-2.02.177-3.el7    BUILT: Wed Feb 14 06:52:14 CST 2018
lvm2-libs-2.02.177-3.el7    BUILT: Wed Feb 14 06:52:14 CST 2018
lvm2-cluster-2.02.177-3.el7    BUILT: Wed Feb 14 06:52:14 CST 2018
lvm2-lockd-2.02.177-3.el7    BUILT: Wed Feb 14 06:52:14 CST 2018
lvm2-python-boom-0.8.4-3.el7    BUILT: Wed Feb 14 07:10:51 CST 2018


[root@mckinley-03 ~]# boom create --title "thin snapshot 1" --root-device /dev/snapper/boom_snap
Created entry with boot_id aaec6db:
  title thin snapshot 1
  machine-id 99c24df6ee1b4f758788b62052ae1b4b
  version 3.10.0-848.el7.x86_64
  linux /vmlinuz-3.10.0-848.el7.x86_64
  initrd /initramfs-3.10.0-848.el7.x86_64.img
  options root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap rhgb quiet

[root@mckinley-03 ~]# boom create --title "thin snapshot 1" --root-device /dev/dev/dev/snapper/boom_snap
Device '/dev/dev/dev/snapper/boom_snap' not found.
Creating an entry with no valid root device requires --no-dev

[root@mckinley-03 ~]# boom create --title "thin snapshot 1" --root-lv /dev/snapper/boom_snap
snapper/boom_snap
Entry already exists (boot_id=aaec6db).

[root@mckinley-03 ~]# boom create --title "thin snapshot 2" --root-lv /dev/snapper/boom_snap
snapper/boom_snap
Created entry with boot_id b70d91f:
  title thin snapshot 2
  machine-id 99c24df6ee1b4f758788b62052ae1b4b
  version 3.10.0-848.el7.x86_64
  linux /vmlinuz-3.10.0-848.el7.x86_64
  initrd /initramfs-3.10.0-848.el7.x86_64.img
  options root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap rhgb quiet

[root@mckinley-03 ~]# boom create --title "thin snapshot 3" --root-lv snapper/boom_snap
snapper/boom_snap
Created entry with boot_id 7104851:
  title thin snapshot 3
  machine-id 99c24df6ee1b4f758788b62052ae1b4b
  version 3.10.0-848.el7.x86_64
  linux /vmlinuz-3.10.0-848.el7.x86_64
  initrd /initramfs-3.10.0-848.el7.x86_64.img
  options root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap rhgb quiet

Comment 11 errata-xmlrpc 2018-04-10 15:25:23 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, 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/RHEA-2018:0853


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