summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2019-03-14 16:25:55 -0500
committerDavid Teigland <teigland@redhat.com>2019-04-05 14:04:42 -0500
commitf58a70c168f8ac225b0e4e40c2f0e1d1c98357fa (patch)
treed3c3b9b4180714d74c02979042dd9e6fdbcadd4b
parent0ba316f102ac3fcea48a6e60dfb8c0ddef8d197e (diff)
downloadlvm2-f58a70c168f8ac225b0e4e40c2f0e1d1c98357fa.tar.gz
pvscan: don't print warning about lvmlockd not running
pvscan --cache ignores shared VGs, so it doesn't need to consider lvmlockd, and shouldn't include a warning about it.
-rw-r--r--tools/lvmcmdline.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 44b7724b8..1e3b1e382 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -2714,6 +2714,13 @@ static int _init_lvmlockd(struct cmd_context *cmd)
const char *lvmlockd_socket;
int use_lvmlockd = find_config_tree_bool(cmd, global_use_lvmlockd_CFG, NULL);
+ if (cmd->command->command_enum == pvscan_cache_CMD) {
+ /* pvscan cache ignores shared vgs, it only activates local vgs. */
+ if (use_lvmlockd)
+ log_debug("Ignore lvmlockd for pvscan cache.");
+ return 1;
+ }
+
/*
* Think about when/how to enable hints with lvmlockd.
*/