785220f1ca
- Add lvm2-activation-generator systemd generator to automatically systemd units to activate LVM2 volumes even if lvmetad is not This replaces lvm activation part of the former fedora-storage-init script that was included in the initscripts package before. - Enable lvmetad - the LVM metadata daemon by default. - Don't use lvmetad in lvm2-monitor.service ExecStop to avoid a systemd issue. - Remove dependency on fedora-storage-init.service in lvm2 systemd units. - Depend on lvm2-lvmetad.socket in lvm2-monitor.service systemd unit. - Init lvmetad lazily to avoid early socket access on config overrides. - Hardcode use_lvmetad=0 if cluster locking used and issue a warning msg. - Fix dm_task_set_cookie to properly process udev flags if udev_sync disabled.
59 lines
2.0 KiB
Diff
59 lines
2.0 KiB
Diff
diff --git a/WHATS_NEW b/WHATS_NEW
|
|
index c0ae3df..5887ec7 100644
|
|
--- a/WHATS_NEW
|
|
+++ b/WHATS_NEW
|
|
@@ -1,3 +1,7 @@
|
|
+Version 2.02.99 -
|
|
+===================================
|
|
+ Hardcode use_lvmetad=0 if cluster locking used and issue a warning msg.
|
|
+
|
|
Version 2.02.98 - 15th October 2012
|
|
===================================
|
|
Switch from DEBUG() to DEBUGLOG() in lvmetad as -DDEBUG is already used.
|
|
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
|
|
index d7f8ece..eb1a90b 100644
|
|
--- a/lib/commands/toolcontext.c
|
|
+++ b/lib/commands/toolcontext.c
|
|
@@ -413,7 +413,15 @@ static int _process_config(struct cmd_context *cmd)
|
|
lvmetad_set_socket(lvmetad_socket);
|
|
cn = find_config_tree_node(cmd, "devices/global_filter");
|
|
lvmetad_set_token(cn ? cn->v : NULL);
|
|
- lvmetad_set_active(find_config_tree_int(cmd, "global/use_lvmetad", 1));
|
|
+
|
|
+ if (find_config_tree_int(cmd, "global/locking_type", 1) == 3 &&
|
|
+ find_config_tree_int(cmd, "global/use_lvmetad", 1)) {
|
|
+ log_warn("WARNING: configuration setting use_lvmetad overriden to 0 due to locking_type 3. "
|
|
+ "Clustered environment not supported by lvmetad yet.");
|
|
+ lvmetad_set_active(0);
|
|
+ } else
|
|
+ lvmetad_set_active(find_config_tree_int(cmd, "global/use_lvmetad", 1));
|
|
+
|
|
lvmetad_init(cmd);
|
|
|
|
return 1;
|
|
diff --git a/test/shell/lvmetad-no-cluster.sh b/test/shell/lvmetad-no-cluster.sh
|
|
new file mode 100644
|
|
index 0000000..db68e77
|
|
--- /dev/null
|
|
+++ b/test/shell/lvmetad-no-cluster.sh
|
|
@@ -0,0 +1,19 @@
|
|
+#!/bin/sh
|
|
+# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
|
|
+#
|
|
+# This copyrighted material is made available to anyone wishing to use,
|
|
+# modify, copy, or redistribute it subject to the terms and conditions
|
|
+# of the GNU General Public License v.2.
|
|
+#
|
|
+# You should have received a copy of the GNU General Public License
|
|
+# along with this program; if not, write to the Free Software Foundation,
|
|
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
+
|
|
+. lib/test
|
|
+
|
|
+test -e LOCAL_CLVMD || skip
|
|
+aux prepare_vg 2
|
|
+aux prepare_lvmetad
|
|
+vgs -vv 2> errs
|
|
+cat errs
|
|
+grep 'use_lvmetad' errs
|