|
|
c608c9 |
From 4f6ebfc537b2d3671112a54873081685d47066db Mon Sep 17 00:00:00 2001
|
|
|
c608c9 |
From: David Vossel <dvossel@redhat.com>
|
|
|
c608c9 |
Date: Fri, 18 Jul 2014 12:31:55 -0400
|
|
|
c608c9 |
Subject: [PATCH] Low: LVM: Warn users about the danger of lvmetad
|
|
|
c608c9 |
|
|
|
c608c9 |
---
|
|
|
c608c9 |
heartbeat/LVM | 19 +++++++++++++++++++
|
|
|
c608c9 |
1 file changed, 19 insertions(+)
|
|
|
c608c9 |
|
|
|
c608c9 |
diff --git a/heartbeat/LVM b/heartbeat/LVM
|
|
|
c608c9 |
index 4378cd3..27cdfbd 100755
|
|
|
c608c9 |
--- a/heartbeat/LVM
|
|
|
c608c9 |
+++ b/heartbeat/LVM
|
|
|
c608c9 |
@@ -545,6 +545,25 @@ LVM_validate_all() {
|
|
|
c608c9 |
check_binary $AWK
|
|
|
c608c9 |
|
|
|
c608c9 |
##
|
|
|
c608c9 |
+ # lvmetad is a daemon that caches lvm metadata to improve the
|
|
|
c608c9 |
+ # performance of LVM commands. This daemon should never be used when
|
|
|
c608c9 |
+ # volume groups exist that are being managed by the cluster. The lvmetad
|
|
|
c608c9 |
+ # daemon introduces a response lag, where certain LVM commands look like
|
|
|
c608c9 |
+ # they have completed (like vg activation) when in fact the command
|
|
|
c608c9 |
+ # is still in progress by the lvmetad. This can cause reliability issues
|
|
|
c608c9 |
+ # when managing volume groups in the cluster. For Example, if you have a
|
|
|
c608c9 |
+ # volume group that is a dependency for another application, it is possible
|
|
|
c608c9 |
+ # the cluster will think the volume group is activated and attempt to start
|
|
|
c608c9 |
+ # the application before volume group is really accesible... lvmetad is bad.
|
|
|
c608c9 |
+ ##
|
|
|
c608c9 |
+ lvm dumpconfig global/use_lvmetad | grep 'use_lvmetad.*=.*1' > /dev/null 2>&1
|
|
|
c608c9 |
+ if [ $? -eq 0 ]; then
|
|
|
c608c9 |
+ # for now warn users that lvmetad is enabled and that they should disable it. In the
|
|
|
c608c9 |
+ # future we may want to consider refusing to start, or killing the lvmetad daemon.
|
|
|
c608c9 |
+ ocf_log warn "Disable lvmetad in lvm.conf. lvmetad should never be enabled in a clustered environment. Set use_lvmetad=0 and kill the lvmetad process"
|
|
|
c608c9 |
+ fi
|
|
|
c608c9 |
+
|
|
|
c608c9 |
+ ##
|
|
|
c608c9 |
# Off-the-shelf tests...
|
|
|
c608c9 |
##
|
|
|
c608c9 |
VGOUT=`vgck ${VOLUME} 2>&1`
|
|
|
c608c9 |
--
|
|
|
c608c9 |
1.8.4.2
|
|
|
c608c9 |
|