Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1583675

Summary: grub2-mkconfig results in unbootable system with LVM
Product: [oVirt] ovirt-node Reporter: Alex <alex-redhat>
Component: GeneralAssignee: Ryan Barry <rbarry>
Status: CLOSED DUPLICATE QA Contact: Ying Cui <ycui>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2CC: bugs, cshao
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-29 13:42:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Choose the right VG in grub config none

Description Alex 2018-05-29 13:08:21 UTC
Created attachment 1445378 [details]
Choose the right VG in grub config

Description of problem:

When running grub2-mkconfig, the resulting grub configuration is broken when LVM is in use and multiple volume groups are present on the system. The resulting grub.cfg has the names of _all_ vgs prepended to the root and rd.lvm.lv boot parameters.

This is cause by the /etc/grub.d/09_node script expecting only one vg per host.

At line 231:
  vg=$(lvm vgs --noheading -o name | tr -d '[:space:]')

This concatenates the names of all vgs on the system into variable "vg" while it should have been only the name of the VG the ovirt LV lives in.

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


How reproducible:
100%

Steps to Reproduce:
1. Create an extra LVM VG
2. Run grub2_mkconfig
3. Reboot (or, observe /boot/grub2/grub.cfg)

Additional info:

The reason i ran grub2_mkconfig is because i enabled a serial console in grub.

Attached patch fixes the issue for me.

Comment 1 Ryan Barry 2018-05-29 13:42:27 UTC

*** This bug has been marked as a duplicate of bug 1561258 ***