Red Hat Bugzilla – Bug 1544914
boom should deal w/ user providing --rootlv /dev/vg/lv format
Last modified: 2018-04-10 11:25:33 EDT
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:
(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?
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.
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).
commit e87835deba2036238d29ab0c566a0cf3b1c6b39c Author: Bryn M. Reeves <bmr@redhat.com> 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@redhat.com> commit e22d937babff32560d1aa613afc5ba408aad749a Author: Bryn M. Reeves <bmr@redhat.com> 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@redhat.com>
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
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