Browse files

LVM Agents: Warn instead of fail if initrd is newer than lvm.conf

There are many reasons why a user may change the lvm.conf file.  They might
change filters or default segment types, etc.  Making the HA LVM scripts
error our every time the lvm.conf file is newer than the initrd, can cause
serious problems.  For example, if a service is running and lvm.conf is
changed, a subsequent fail-over would not work because the HA LVM script
would abort on this condition.

Instead of making things potentially worse, we have the scripts warn the
user (rather than failing) whenever this condition is hit.  That way,
the user isn't suddenly surprised by things not working.

Signed-off-by: Jonathan Brassow <>
  • Loading branch information...
1 parent 615182e commit 414431e5da0a1cb7184c0255ff52f69f5a4ae4c9 @jbrassow jbrassow committed Oct 5, 2012
Showing with 7 additions and 4 deletions.
  1. +7 −4 rgmanager/src/resources/
@@ -107,7 +107,12 @@ function ha_lvm_proper_setup_check
if [ "$(find /boot -name *.img -newer /etc/lvm/lvm.conf)" == "" ]; then
ocf_log err "HA LVM: Improper setup detected"
ocf_log err "* initrd image needs to be newer than lvm.conf"
+ # While dangerous if not done the first time, there are many
+ # cases where we don't simply want to fail here. Instead,
+ # keep warning until the user remakes the initrd - or has
+ # it done for them by upgrading the kernel.
+ #return $OCF_ERR_GENERIC
@@ -139,9 +144,7 @@ status|monitor)
- if ! ha_lvm_proper_setup_check; then
- ocf_log err "WARNING: An improper setup can cause data corruption!"
- fi
+ ha_lvm_proper_setup_check
if [ -z $OCF_RESKEY_lv_name ]; then
vg_stop || exit 1

0 comments on commit 414431e

Please sign in to comment.