Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 451478 - sys-fs/lvm2 - /etc/init.d/lvm should support multiple volume groups - Command failed with status code 2. No such command. Try 'help'.
Summary: sys-fs/lvm2 - /etc/init.d/lvm should support multiple volume groups - Command...
Status: RESOLVED DUPLICATE of bug 437714
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-11 23:48 UTC by email200202
Modified: 2014-02-01 21:32 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***