Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 506514 - sys-fs/lvm2-2.02.103 - /etc/init.d/lvm handles only a single VG at shutdown
Summary: sys-fs/lvm2-2.02.103 - /etc/init.d/lvm handles only a single VG at shutdown
Status: RESOLVED TEST-REQUEST
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: PATCH
Depends on:
Blocks:
 
Reported: 2014-04-02 04:27 UTC by Walter Trautner
Modified: 2014-04-04 21:14 UTC (History)
1 user (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 Walter Trautner 2014-04-02 04:27:40 UTC
The init script of lvm2 won't shutdown all VGs when more than one requested.

The bugfix is really simple, just add --rows to the calling of all VGs.
Since I've written some message to my self in there, this is just a diff, not a patch:

diff --git a/init.d/lvm b/init.d/lvm
index 76d90f3..e1fc485 100755
--- a/init.d/lvm
+++ b/init.d/lvm
@@ -73,7 +73,8 @@ then
        einfo "Shutting down the Logical Volume Manager"


-        VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix 2> /dev/null)
+        # vmc: Added --rows to support multiple vgs
+        VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)

         if [ "$VGS" ]
         then
Comment 1 Walter Trautner 2014-04-02 04:39:02 UTC
Maybe some explanation.

The init script builds up calls to lvm, seperated by a new line, which indicates a new command.

Do you have more than one VG, they'll come in lines, which breaks the syntax of the lvm command. To handle this, we wan't the VGs in columns, which funny enough provides the --rows parameter .. At the end we hope to get columns by --rows  ..
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-04-02 20:58:23 UTC
please retest with lvm2-2.02.105-r2 as the scripts have changed.
Comment 3 Walter Trautner 2014-04-04 21:14:28 UTC
Thanks, lvm2-2.02.105-r2 is working fine with multiple VGs.