Starting a clustered volume with monitoring disabled is not allowed:

http://www.redhat.com/archives/lvm-devel/2010-March/msg00289.html

Which would be fine, as activation/monitoring = 1 ships as the default
in lvm.conf. However, at least some versions of LVM seem to ignore this,
throwing an error on vgchange unless "--monitor y" is explicitly set
on the command line:

https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/833368

Thus, for cloned instances, always invoke vgchange with "--monitor y".

Thanks to Nils Meyer <n...@nm.cx> for pointing out this issue.
---
 heartbeat/LVM |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/heartbeat/LVM b/heartbeat/LVM
index d8ad3ca..05eefe7 100755
--- a/heartbeat/LVM
+++ b/heartbeat/LVM
@@ -224,6 +224,12 @@ LVM_start() {
        vgchange_options="$vgchange_options --partial"
   fi
 
+  # for clones (clustered volume groups), we'll also have to force
+  # monitoring, even if disabled in lvm.conf.
+  if ocf_is_clone; then
+       vgchange_options="$vgchange_options --monitor y"
+  fi
+
   ocf_run vgchange $vgchange_options $1 || return $OCF_ERR_GENERIC
 
   if LVM_status $1; then
-- 
1.7.5.4

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to