check_vol_slaves() in dracut-functions.sh does not strip whitespaces from volume group name

Solution In Progress - Updated -

Issue

  • When one run dracut --debug following appears:
//usr/lib/dracut/dracut-functions.sh@688(check_vol_slaves): lvm lvs --noheadings -o vg_name /dev/mapper/os-root
/usr/lib/dracut/dracut-functions.sh@688(check_vol_slaves): _vg='  os  '
//usr/lib/dracut/dracut-functions.sh@690(check_vol_slaves): printf '%s\n' '  os  '
/usr/lib/dracut/dracut-functions.sh@690(check_vol_slaves): _vg='  os  '
/usr/lib/dracut/dracut-functions.sh@691(check_vol_slaves): [[ -n   os   ]]
//usr/lib/dracut/dracut-functions.sh@684(check_vol_slaves): lvm vgs --noheadings -o pv_name '  os  '
/usr/lib/dracut/dracut-functions.sh@699(check_vol_slaves): return 1
  • There're whitespaces that cause check_vol_slaves() to fail.

Environment

  • Red Hat Enterprise Linux 7.2
  • dracut-033-360.el7_2.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content