Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 617866

Summary: sys-fs/lvm2-2.02.171 broken init scripts
Product: Gentoo Linux Reporter: Sven E. <dark>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Sven E. 2017-05-08 16:14:52 UTC
There are multiplke issues in the lvm init scripts, the most severe makes lvm bail during startup

Reproducible: Always

Steps to Reproduce:
1. add lvm to some runlevel
2. see that script fails to start lvm

Actual Results:  
lvm does not start

Expected Results:  
lvm starts as expected without any errors

/proc/self/fd/0: unrecognized option '--config'
  Error during parsing of command line.
 * Failed to setup the LVM

The line producing the problem is:
printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null

Let's look at this:
echo "help" | /sbin/lvm /proc/self/fd/0
  No such command.  Try 'help'.

But:
echo "help" | /sbin/lvm
lvm> help
  Available lvm commands:
  Use 'lvm help <command>' for more information
...

- So it seems that lvm won't accept the STDIN file descriptor from proc as valid input file.

Additionally the parameter --sysinit is used, which should only be used during early system init (i.e. in initramfs) when there's no RW root fs available (or the final root not yet mounted).
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-05-08 16:20:20 UTC

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