Blame SOURCES/bz773395-clvm-autoset-locking-type.patch

c608c9
From 22203b45ef3c3a66512c60f2a2381cf5e490abf6 Mon Sep 17 00:00:00 2001
c608c9
From: David Vossel <dvossel@redhat.com>
c608c9
Date: Mon, 4 Aug 2014 17:23:47 -0400
c608c9
Subject: [PATCH] High: clvm: automatically set lvm.conf's locking_type=3
c608c9
c608c9
lvm comes with a cli tool we can use to set/unset the
c608c9
locking type. When clvmd is in use, it is safe to assume
c608c9
that locking_type=3  (clustered locking) should be in use.
c608c9
Otherwise there would be no reason to run the clvmd to begin
c608c9
with.
c608c9
---
c608c9
 heartbeat/clvm | 6 ++++++
c608c9
 1 file changed, 6 insertions(+)
c608c9
c608c9
diff --git a/heartbeat/clvm b/heartbeat/clvm
c608c9
index 3e7701d..20bb40c 100644
c608c9
--- a/heartbeat/clvm
c608c9
+++ b/heartbeat/clvm
c608c9
@@ -86,6 +86,7 @@ DAEMON="clvmd"
c608c9
 CMIRROR="cmirrord"
c608c9
 DAEMON_PATH="${sbindir}/clvmd"
c608c9
 CMIRROR_PATH="${sbindir}/cmirrord"
c608c9
+LVMCONF="${sbindir}/lvmconf"
c608c9
 LOCK_FILE="/var/lock/subsys/$DAEMON"
c608c9
 LVM_VGCHANGE=${sbindir}/vgchange
c608c9
 LVM_VGDISPLAY=${sbindir}/vgdisplay
c608c9
@@ -342,6 +343,11 @@ clvmd_start()
c608c9
 		return $?;
c608c9
 	fi
c608c9
 
c608c9
+	# autoset locking type to clusted when lvmconf tool is available
c608c9
+	if [ -x "$LVMCONF"  ]; then
c608c9
+		$LVMCONF --enable-cluster > /dev/null 2>&1
c608c9
+	fi
c608c9
+
c608c9
 	# if either of these fail, script will exit OCF_ERR_GENERIC
c608c9
 	if ocf_is_true $OCF_RESKEY_with_cmirrord; then
c608c9
 		start_process $CMIRROR_PATH
c608c9
-- 
c608c9
1.8.4.2
c608c9