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

Bug 609416

Summary: =sys-fs/lvm2-2.02.166-r1 - initscript breaks on systems that don't use lvmlockd
Product: Gentoo Linux Reporter: Austin S. Hemmelgarn <ahferroin7>
Component: Current packagesAssignee: Marc Schiffbauer <mschiff>
Status: RESOLVED FIXED    
Severity: normal CC: agk, ahferroin7, cardoe, itumaykin+gentoo, mlen, nshephard, robbat2
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Austin S. Hemmelgarn 2017-02-15 12:36:21 UTC
This new line in the init script:
`lvm_commands="${lvm_commands}vgchange --lock-start --lock-opt auto\n"`
requires lvmlockd to be running, but is invoked unconditionally.

This causes the init script to fail consistently on the default configuration and causes systems with root on LVM to fail to boot correctly (root remains read-only since lvm failed to start).

At a minimum, this should be conditional on lvmlockd running.  Ideally, lvmlockd should be an automatic dependency based on the value of 'use_lvmlockd' in /etc/lvm/lvm.conf (like the lvmetad dependency is in newer ebuilds), and this line should only be invoked if lvmlockd is in use.
Comment 1 Neil 2017-02-15 20:08:23 UTC
I've encountered this problem too.  Can't find any evidence of lvmlockd though as `equery b lvmlockd` doesn't reveal it belonging to any package and there is no init script for such a process.
Comment 2 Austin S. Hemmelgarn 2017-02-15 20:20:04 UTC
lvmlockd is a clustered locking daemon that's part of LVM2 itself.    It doesn't appear to be installed by default though, and arguably shouldn't be since most people will never need it.

Quick fix to just get things working again is to just manually comment out the line in the init script
Comment 3 Neil 2017-02-15 21:32:59 UTC
Thanks for the info and workaround.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-02-16 20:09:34 UTC
mschiff:
This was your change, please fix.
Comment 5 Nicole O'Connor 2017-02-18 16:19:11 UTC
(In reply to Austin S. Hemmelgarn from comment #2)
> Quick fix to just get things working again is to just manually comment out
> the line in the init script

Doesn't work on my system. Complains about "invalid command, try help", and fails to boot anyway.

Perhaps this version should be masked - if not in Portage then definitely on my system.
Comment 6 Marc Schiffbauer gentoo-dev 2017-02-18 22:25:33 UTC
Fixed in =sys-fs/lvm2-2.02.166-r2, works for me on a System with USE=-sanlock

I updated the init script to not call lock stuff if use_lvmlockd=0 (similar to lvmetad)