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

Bug 451478

Summary: sys-fs/lvm2 - /etc/init.d/lvm should support multiple volume groups - Command failed with status code 2. No such command. Try 'help'.
Product: Gentoo Linux Reporter: email200202
Component: [OLD] Core systemAssignee: Robin Johnson <robbat2>
Status: RESOLVED DUPLICATE    
Severity: normal CC: agk, anf, cardoe, proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description email200202 2013-01-11 23:48:53 UTC
If you have two or more volume groups, the script (/etc/init.d/lvm) fails during shutdown with the messages:
  Command failed with status code 2.
  No such command.  Try 'help'.

The problem in the line:
VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix 2> /dev/null)

The logical volumes in VGS are separated by newlines and this will cause problems in the next commands which use VGS variable.

The solution will be to replace the newlines with spaces.
VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix | tr '\n' ' ' 2> /dev/null)
Comment 1 Alexander Tsoy 2013-01-18 12:51:00 UTC
This is a dublicate of bug 437714
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-02-01 21:32:38 UTC

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