master - test: update lvm1 test
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c9cf85f606d14b...
Commit: c9cf85f606d14bcffdbdfaf19e0fa3a8e8b2a5d3
Parent: 2a17610899f6dc5d5e5acf5f0a4b427f2cdfeea8
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Apr 19 09:18:31 2016 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 19 11:45:19 2016 -0500
test: update lvm1 test
Make it a generic lvm1 test, which should work
with or without lvmetad now that lvmetad is just
disabled when lvm1 is used.
---
test/shell/lvm1-basic.sh | 35 +++++++++++++++++++++++++++++++++++
test/shell/lvmetad-lvm1.sh | 39 ---------------------------------------
2 files changed, 35 insertions(+), 39 deletions(-)
diff --git a/test/shell/lvm1-basic.sh b/test/shell/lvm1-basic.sh
new file mode 100644
index 0000000..8884bc1
--- /dev/null
+++ b/test/shell/lvm1-basic.sh
@@ -0,0 +1,35 @@
+#!/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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+SKIP_WITH_LVMLOCKD=1
+SKIP_WITHOUT_LVMETAD=1
+SKIP_WITH_LVMPOLLD=1
+
+. lib/inittest
+
+aux prepare_devs 2
+pvcreate --metadatatype 1 "$dev1"
+pvs | tee out
+grep "$dev1" out
+vgcreate --metadatatype 1 $vg1 "$dev1"
+vgs | tee out
+grep $vg1 out
+pvs | tee out
+grep "$dev1" out
+
+# check for RHBZ 1080189 -- SEGV in lvremove/vgremove
+pvcreate -ff -y --metadatatype 1 "$dev1" "$dev2"
+vgcreate --metadatatype 1 $vg1 "$dev1" "$dev2"
+lvcreate -l1 $vg1
+pvremove -ff -y "$dev2"
+vgchange -an $vg1
+not lvremove $vg1
+not vgremove -ff -y $vg1
diff --git a/test/shell/lvmetad-lvm1.sh b/test/shell/lvmetad-lvm1.sh
deleted file mode 100644
index 824c1d5..0000000
--- a/test/shell/lvmetad-lvm1.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-SKIP_WITH_LVMLOCKD=1
-SKIP_WITHOUT_LVMETAD=1
-SKIP_WITH_LVMPOLLD=1
-
-. lib/inittest
-
-# lvmetad does not support lvm1 format
-
-aux prepare_devs 2
-pvcreate --metadatatype 1 "$dev1"
-should not vgscan --cache
-pvs | tee out
-not grep "$dev1" out
-vgcreate --metadatatype 1 $vg1 "$dev1"
-should not vgscan --cache
-vgs | tee out
-not grep $vg1 out
-pvs | tee out
-not grep "$dev1" out
-
-# check for RHBZ 1080189 -- SEGV in lvremove/vgremove
-pvcreate -ff -y --metadatatype 1 "$dev1" "$dev2"
-vgcreate --metadatatype 1 $vg1 "$dev1" "$dev2"
-lvcreate -l1 $vg1
-pvremove -ff -y "$dev2"
-vgchange -an $vg1
-not lvremove $vg1
-not vgremove -ff -y $vg1
8 years, 2 months
master - lvmetad: disable if command uses lvm1
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2a17610899f6dc...
Commit: 2a17610899f6dc5d5e5acf5f0a4b427f2cdfeea8
Parent: 1e380864e5b6e0773ddf48189b6563c3033e6354
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Apr 6 15:57:09 2016 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 19 09:41:18 2016 -0500
lvmetad: disable if command uses lvm1
Alternatively, a command could return an error saying
that lvm1 and lvmetad are not compatible.
---
tools/lvmcmdline.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 404c835..dd89a7b 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -22,6 +22,7 @@
#include "stub.h"
#include "last-path-component.h"
+#include "format1.h"
#include <signal.h>
#include <sys/stat.h>
@@ -1601,6 +1602,13 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
goto out;
}
+ if (!strcmp(cmd->fmt->name, FMT_LVM1_NAME) && lvmetad_used()) {
+ log_warn("WARNING: Disabling lvmetad cache which does not support obsolete metadata.");
+ lvmetad_set_disabled(cmd, "LVM1");
+ log_warn("WARNING: Not using lvmetad because lvm1 format is used.");
+ lvmetad_set_active(cmd, 0);
+ }
+
if (cmd->metadata_read_only &&
!(cmd->command->flags & PERMITTED_READ_ONLY)) {
log_error("%s: Command not permitted while global/metadata_read_only "
8 years, 2 months
master - lvmetad: clear the disabled flag in lvmetad
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1e380864e5b6e0...
Commit: 1e380864e5b6e0773ddf48189b6563c3033e6354
Parent: 04a83148cea3b3c7ec7f6ffccb4d84e2372c3f4a
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Apr 6 15:37:52 2016 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 19 09:41:18 2016 -0500
lvmetad: clear the disabled flag in lvmetad
After a device rescan that repopulates lvmetad,
if no reason for disabling lvmetad was seen
(lvm1 metadata or duplicate PVs), then clear
the disabled flag in lvmetad. This allows
commands to resume using the lvmetad cache
after the cause for disabling it has been removed.
---
lib/cache/lvmetad.c | 37 +++++++++++++++++++++++++++++++++++++
lib/cache/lvmetad.h | 2 ++
2 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index dba7e5b..bcf6f93 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -37,6 +37,8 @@ static char *_lvmetad_token = NULL;
static const char *_lvmetad_socket = NULL;
static struct cmd_context *_lvmetad_cmd = NULL;
+static int _found_lvm1_metadata = 0;
+
static struct volume_group *lvmetad_pvscan_vg(struct cmd_context *cmd, struct volume_group *vg);
static uint64_t _monotonic_seconds(void)
@@ -1597,6 +1599,7 @@ static struct volume_group *lvmetad_pvscan_vg(struct cmd_context *cmd, struct vo
lvmcache_fmt(info)->ops->destroy_instance(baton.fid);
log_warn("WARNING: Disabling lvmetad cache which does not support obsolete metadata.");
lvmetad_set_disabled(cmd, "LVM1");
+ _found_lvm1_metadata = 1;
return NULL;
}
@@ -1720,6 +1723,7 @@ int lvmetad_pvscan_single(struct cmd_context *cmd, struct device *dev,
log_warn("WARNING: Disabling lvmetad cache which does not support obsolete metadata.");
lvmetad_set_disabled(cmd, "LVM1");
+ _found_lvm1_metadata = 1;
if (ignore_obsolete)
return 1;
@@ -1795,6 +1799,7 @@ static int _lvmetad_pvscan_all_devs(struct cmd_context *cmd, activation_handler
daemon_reply reply;
int r = 1;
char *future_token;
+ const char *reason;
int was_silent;
int replacing_other_update = 0;
int replaced_update = 0;
@@ -1880,6 +1885,16 @@ static int _lvmetad_pvscan_all_devs(struct cmd_context *cmd, activation_handler
if (!_token_update(NULL))
return 0;
+ /*
+ * If lvmetad is disabled, and no lvm1 metadata was seen and no
+ * duplicate PVs were seen, then re-enable lvmetad.
+ */
+ if (lvmetad_is_disabled(cmd, &reason) &&
+ !lvmcache_found_duplicate_pvs() && !_found_lvm1_metadata) {
+ log_debug_lvmetad("Enabling lvmetad which was previously disabled.");
+ lvmetad_clear_disabled(cmd);
+ }
+
return r;
}
@@ -2285,6 +2300,28 @@ void lvmetad_set_disabled(struct cmd_context *cmd, const char *reason)
daemon_reply_destroy(reply);
}
+void lvmetad_clear_disabled(struct cmd_context *cmd)
+{
+ daemon_reply reply;
+
+ if (!_lvmetad_use)
+ return;
+
+ log_debug_lvmetad("lvmetad send disabled 0");
+
+ reply = daemon_send_simple(_lvmetad, "set_global_info",
+ "token = %s", "skip",
+ "global_disable = " FMTd64, (int64_t)0,
+ NULL);
+ if (reply.error)
+ log_error("Failed to send message to lvmetad %d", reply.error);
+
+ if (strcmp(daemon_reply_str(reply, "response", ""), "OK"))
+ log_error("Failed response from lvmetad.");
+
+ daemon_reply_destroy(reply);
+}
+
int lvmetad_is_disabled(struct cmd_context *cmd, const char **reason)
{
daemon_reply reply;
diff --git a/lib/cache/lvmetad.h b/lib/cache/lvmetad.h
index 76e8fd2..9ae3f26 100644
--- a/lib/cache/lvmetad.h
+++ b/lib/cache/lvmetad.h
@@ -174,6 +174,7 @@ int lvmetad_vg_is_foreign(struct cmd_context *cmd, const char *vgname, const cha
int lvmetad_is_disabled(struct cmd_context *cmd, const char **reason);
void lvmetad_set_disabled(struct cmd_context *cmd, const char *reason);
+void lvmetad_clear_disabled(struct cmd_context *cmd);
# else /* LVMETAD_SUPPORT */
@@ -207,6 +208,7 @@ void lvmetad_set_disabled(struct cmd_context *cmd, const char *reason);
# define lvmetad_token_matches(cmd) (1)
# define lvmetad_is_disabled(cmd, reason) (0)
# define lvmetad_set_disabled(cmd, reason) do { } while (0)
+# define lvmetad_clear_disabled(cmd) do { } while (0)
# endif /* LVMETAD_SUPPORT */
8 years, 2 months
master - lvmetad: use the disabled flag in commands
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=04a83148cea3b3...
Commit: 04a83148cea3b3c7ec7f6ffccb4d84e2372c3f4a
Parent: ff867c2ef6b0717c26f2073f0b79041156a6af58
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Apr 6 15:31:15 2016 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 19 09:41:18 2016 -0500
lvmetad: use the disabled flag in commands
Commands already check if the lvmetad token is valid,
and if not, they rescan devices to repopulate lvmetad
before running. Now, in addition to checking the
lvmetad token, they also check if the lvmetad disabled
flag is set. If so, they do not use the lvmetad cache
and revert to disk scanning.
---
lib/cache/lvmetad.c | 7 +++++++
tools/lvmcmdline.c | 13 ++++++++++++-
tools/lvscan.c | 9 ++++++++-
tools/pvscan.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
tools/vgimport.c | 7 +++++++
tools/vgscan.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
6 files changed, 123 insertions(+), 4 deletions(-)
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index 642a407..dba7e5b 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -2119,6 +2119,7 @@ void lvmetad_validate_global_cache(struct cmd_context *cmd, int force)
{
struct dm_list pvc_before; /* pv_cache_list */
struct dm_list pvc_after; /* pv_cache_list */
+ const char *reason = NULL;
daemon_reply reply;
int global_invalid;
@@ -2183,6 +2184,12 @@ void lvmetad_validate_global_cache(struct cmd_context *cmd, int force)
return;
}
+ if (lvmetad_is_disabled(cmd, &reason)) {
+ log_warn("WARNING: Not using lvmetad because %s.", reason);
+ lvmetad_set_active(cmd, 0);
+ return;
+ }
+
/*
* Clear the global_invalid flag in lvmetad.
* Subsequent local commands that read global state
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 48c660b..404c835 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -1475,6 +1475,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
{
struct dm_config_tree *config_string_cft;
struct dm_config_tree *config_profile_command_cft, *config_profile_metadata_cft;
+ const char *reason = NULL;
int ret = 0;
int locking_type;
int monitoring;
@@ -1625,7 +1626,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
if (lvmetad_used()) {
lvmetad_set_active(cmd, 0);
- log_verbose("Disabling use of lvmetad because read-only is set.");
+ log_verbose("Not using lvmetad because read-only is set.");
}
} else if (arg_count(cmd, nolocking_ARG))
locking_type = 0;
@@ -1655,6 +1656,11 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
* - Another local command may have run with a different global filter
* which changed the content of lvmetad from what we want (recognized
* by different token values.)
+ *
+ * lvmetad may have been previously disabled (or disabled during the
+ * rescan done here) because duplicate devices or lvm1 metadata were seen.
+ * In this case, disable the *use* of lvmetad by this command, reverting to
+ * disk scanning.
*/
if (lvmetad_used() && !(cmd->command->flags & NO_LVMETAD_AUTOSCAN)) {
if (cmd->include_foreign_vgs || !lvmetad_token_matches(cmd)) {
@@ -1663,6 +1669,11 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
lvmetad_set_active(cmd, 0);
}
}
+
+ if (lvmetad_used() && lvmetad_is_disabled(cmd, &reason)) {
+ log_warn("WARNING: Not using lvmetad because %s.", reason);
+ lvmetad_set_active(cmd, 0);
+ }
}
/*
diff --git a/tools/lvscan.c b/tools/lvscan.c
index 666626c..4f13587 100644
--- a/tools/lvscan.c
+++ b/tools/lvscan.c
@@ -91,6 +91,8 @@ static int lvscan_single(struct cmd_context *cmd, struct logical_volume *lv,
int lvscan(struct cmd_context *cmd, int argc, char **argv)
{
+ const char *reason = NULL;
+
if (argc && !arg_count(cmd, cache_long_ARG)) {
log_error("No additional command line arguments allowed");
return EINVALID_CMD_LINE;
@@ -100,12 +102,17 @@ int lvscan(struct cmd_context *cmd, int argc, char **argv)
log_verbose("Ignoring lvscan --cache because lvmetad is not in use.");
/* Needed because this command has NO_LVMETAD_AUTOSCAN. */
- if (lvmetad_used() && !lvmetad_token_matches(cmd)) {
+ if (lvmetad_used() && (!lvmetad_token_matches(cmd) || lvmetad_is_disabled(cmd, &reason))) {
if (lvmetad_used() && !lvmetad_pvscan_all_devs(cmd, NULL, 0)) {
log_warn("WARNING: Not using lvmetad because cache update failed.");
lvmetad_set_active(cmd, 0);
}
+ if (lvmetad_used() && lvmetad_is_disabled(cmd, &reason)) {
+ log_warn("WARNING: Not using lvmetad because %s.", reason);
+ lvmetad_set_active(cmd, 0);
+ }
+
/*
* FIXME: doing lvscan --cache after a full scan is pointless.
* Should the cache case just exit here?
diff --git a/tools/pvscan.c b/tools/pvscan.c
index 10297a3..44e7737 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -386,10 +386,51 @@ out:
return ret;
}
+/*
+ * Three main pvscan cases related to lvmetad usage:
+ * 1. pvscan
+ * 2. pvscan --cache
+ * 3. pvscan --cache <dev>
+ *
+ * 1. The 'pvscan' command (without --cache) may or may not attempt to
+ * repopulate the lvmetad cache, and may or may not use the lvmetad
+ * cache to display PV info:
+ *
+ * i. If lvmetad is being used and is in a normal state, then 'pvscan'
+ * will simply read and display PV info from the lvmetad cache.
+ *
+ * ii. If lvmetad is not being used, 'pvscan' will read all devices to
+ * display the PV info.
+ *
+ * iii. If lvmetad is being used, but has been disabled (because of
+ * duplicate devs or lvm1 metadata), or has a non-matching token
+ * (because the device filter is different from the device filter last
+ * used to populate lvmetad), then 'pvscan' will begin by rescanning
+ * devices to repopulate lvmetad. If lvmetad is enabled after the
+ * rescan, then 'pvscan' will simply read and display PV info from the
+ * lvmetad cache (like case i). If lvmetad is disabled after the
+ * rescan, then 'pvscan' will read all devices to display PV info
+ * (like case ii).
+ *
+ * 2. The 'pvscan --cache' command (without named devs) will always
+ * attempt to repopulate the lvmetad cache by rescanning all devs
+ * (regardless of whether lvmetad was previously disabled or had an
+ * unmatching token.) lvmetad may be enabled or disabled after the
+ * rescan (depending on whether duplicate devs or lvm1 metadata was
+ * found).
+ *
+ * 3. The 'pvscan --cache <dev>' command will attempt to repopulate the
+ * lvmetad cache by rescanning all devs if lvmetad has a non-matching
+ * token (e.g. because it has not yet been populated, see FIXME above).
+ * Otherwise, the command will only rescan the named <dev> and send
+ * their metadata to lvmetad.
+ */
+
int pvscan(struct cmd_context *cmd, int argc, char **argv)
{
struct pvscan_params params = { 0 };
struct processing_handle *handle = NULL;
+ const char *reason = NULL;
int ret;
if (arg_count(cmd, cache_long_ARG))
@@ -421,11 +462,16 @@ int pvscan(struct cmd_context *cmd, int argc, char **argv)
"of exported volume group(s)" : "in no volume group");
/* Needed because this command has NO_LVMETAD_AUTOSCAN. */
- if (lvmetad_used() && !lvmetad_token_matches(cmd)) {
+ if (lvmetad_used() && (!lvmetad_token_matches(cmd) || lvmetad_is_disabled(cmd, &reason))) {
if (lvmetad_used() && !lvmetad_pvscan_all_devs(cmd, NULL, 0)) {
log_warn("WARNING: Not using lvmetad because cache update failed.");
lvmetad_set_active(cmd, 0);
}
+
+ if (lvmetad_used() && lvmetad_is_disabled(cmd, &reason)) {
+ log_warn("WARNING: Not using lvmetad because %s.", reason);
+ lvmetad_set_active(cmd, 0);
+ }
}
if (!lock_vol(cmd, VG_GLOBAL, LCK_VG_WRITE, NULL)) {
diff --git a/tools/vgimport.c b/tools/vgimport.c
index 3c08876..f5980a1 100644
--- a/tools/vgimport.c
+++ b/tools/vgimport.c
@@ -61,6 +61,8 @@ bad:
int vgimport(struct cmd_context *cmd, int argc, char **argv)
{
+ const char *reason = NULL;
+
if (!argc && !arg_count(cmd, all_ARG) && !arg_is_set(cmd, select_ARG)) {
log_error("Please supply volume groups or -S for selection or use -a for all.");
return EINVALID_CMD_LINE;
@@ -98,6 +100,11 @@ int vgimport(struct cmd_context *cmd, int argc, char **argv)
log_warn("WARNING: Not using lvmetad because cache update failed.");
lvmetad_set_active(cmd, 0);
}
+
+ if (lvmetad_used() && lvmetad_is_disabled(cmd, &reason)) {
+ log_warn("WARNING: Not using lvmetad because %s.", reason);
+ lvmetad_set_active(cmd, 0);
+ }
}
return process_each_vg(cmd, argc, argv, NULL,
diff --git a/tools/vgscan.c b/tools/vgscan.c
index 9dc0000..78048c0 100644
--- a/tools/vgscan.c
+++ b/tools/vgscan.c
@@ -28,8 +28,44 @@ static int vgscan_single(struct cmd_context *cmd, const char *vg_name,
return ECMD_PROCESSED;
}
+/*
+ * Two main vgscan cases related to lvmetad usage:
+ * 1. vgscan
+ * 2. vgscan --cache
+ *
+ * 1. The 'vgscan' command (without --cache) may or may not attempt to
+ * repopulate the lvmetad cache, and may or may not use the lvmetad
+ * cache to display VG info:
+ *
+ * i. If lvmetad is being used and is in a normal state, then 'vgscan'
+ * will simply read and display VG info from the lvmetad cache.
+ *
+ * ii. If lvmetad is not being used, 'vgscan' will read all devices to
+ * display the VG info.
+ *
+ * iii. If lvmetad is being used, but has been disabled (because of
+ * duplicate devs or lvm1 metadata), or has a non-matching token
+ * (because the device filter is different from the device filter last
+ * used to populate lvmetad), then 'vgscan' will begin by rescanning
+ * devices to repopulate lvmetad. If lvmetad is enabled after the
+ * rescan, then 'vgscan' will simply read and display VG info from the
+ * lvmetad cache (like case i). If lvmetad is disabled after the
+ * rescan, then 'vgscan' will read all devices to display VG info
+ * (like case ii).
+ *
+ * 2. The 'vgscan --cache' command will always attempt to repopulate
+ * the lvmetad cache by rescanning all devs (regardless of whether
+ * lvmetad was previously disabled or had an unmatching token.)
+ * lvmetad may be enabled or disabled after the rescan (depending
+ * on whether duplicate devs or lvm1 metadata was found).
+ * If enabled, then it will simply read and display VG info from the
+ * lvmetad cache (like case 1.i.). If disabled, then it will
+ * read all devices to display VG info (like case 1.ii.)
+ */
+
int vgscan(struct cmd_context *cmd, int argc, char **argv)
{
+ const char *reason = NULL;
int maxret, ret;
if (argc) {
@@ -64,11 +100,16 @@ int vgscan(struct cmd_context *cmd, int argc, char **argv)
if (!lvmetad_used() && arg_is_set(cmd, cache_long_ARG))
log_verbose("Ignoring vgscan --cache command because lvmetad is not in use.");
- if (lvmetad_used() && (arg_is_set(cmd, cache_long_ARG) || !lvmetad_token_matches(cmd))) {
+ if (lvmetad_used() && (arg_is_set(cmd, cache_long_ARG) || !lvmetad_token_matches(cmd) || lvmetad_is_disabled(cmd, &reason))) {
if (lvmetad_used() && !lvmetad_pvscan_all_devs(cmd, NULL, arg_is_set(cmd, cache_long_ARG))) {
log_warn("WARNING: Not using lvmetad because cache update failed.");
lvmetad_set_active(cmd, 0);
}
+
+ if (lvmetad_used() && lvmetad_is_disabled(cmd, &reason)) {
+ log_warn("WARNING: Not using lvmetad because %s.", reason);
+ lvmetad_set_active(cmd, 0);
+ }
}
if (!lvmetad_used())
8 years, 2 months
master - lvmetad: set disabled flag in lvmetad if lvm1 metadata is found
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ff867c2ef6b071...
Commit: ff867c2ef6b0717c26f2073f0b79041156a6af58
Parent: a4ef8fa25e4a8e14bef132393070006819b30935
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Jan 29 11:30:57 2016 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 19 09:41:18 2016 -0500
lvmetad: set disabled flag in lvmetad if lvm1 metadata is found
When devices are being scanned, if lvm1 metadata is seen,
tell lvmetad to set its disabled flag because of lvm1 metadata.
---
lib/cache/lvmetad.c | 28 ++++++++++++++++++++++++++++
lib/cache/lvmetad.h | 2 ++
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index f2831f1..642a407 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -1595,6 +1595,8 @@ static struct volume_group *lvmetad_pvscan_vg(struct cmd_context *cmd, struct vo
log_error("WARNING: Ignoring obsolete format of metadata (%s) on device %s when using lvmetad",
baton.fid->fmt->name, dev_name(pvl->pv->dev));
lvmcache_fmt(info)->ops->destroy_instance(baton.fid);
+ log_warn("WARNING: Disabling lvmetad cache which does not support obsolete metadata.");
+ lvmetad_set_disabled(cmd, "LVM1");
return NULL;
}
@@ -1716,6 +1718,9 @@ int lvmetad_pvscan_single(struct cmd_context *cmd, struct device *dev,
baton.fid->fmt->name, dev_name(dev));
lvmcache_fmt(info)->ops->destroy_instance(baton.fid);
+ log_warn("WARNING: Disabling lvmetad cache which does not support obsolete metadata.");
+ lvmetad_set_disabled(cmd, "LVM1");
+
if (ignore_obsolete)
return 1;
return 0;
@@ -2250,6 +2255,29 @@ int lvmetad_vg_is_foreign(struct cmd_context *cmd, const char *vgname, const cha
return ret;
}
+void lvmetad_set_disabled(struct cmd_context *cmd, const char *reason)
+{
+ daemon_reply reply;
+
+ if (!_lvmetad_use)
+ return;
+
+ log_debug_lvmetad("lvmetad send disabled %s", reason);
+
+ reply = daemon_send_simple(_lvmetad, "set_global_info",
+ "token = %s", "skip",
+ "global_disable = " FMTd64, (int64_t)1,
+ "disable_reason = %s", reason,
+ NULL);
+ if (reply.error)
+ log_error("Failed to send message to lvmetad %d", reply.error);
+
+ if (strcmp(daemon_reply_str(reply, "response", ""), "OK"))
+ log_error("Failed response from lvmetad.");
+
+ daemon_reply_destroy(reply);
+}
+
int lvmetad_is_disabled(struct cmd_context *cmd, const char **reason)
{
daemon_reply reply;
diff --git a/lib/cache/lvmetad.h b/lib/cache/lvmetad.h
index 10283bb..76e8fd2 100644
--- a/lib/cache/lvmetad.h
+++ b/lib/cache/lvmetad.h
@@ -173,6 +173,7 @@ int lvmetad_token_matches(struct cmd_context *cmd);
int lvmetad_vg_is_foreign(struct cmd_context *cmd, const char *vgname, const char *vgid);
int lvmetad_is_disabled(struct cmd_context *cmd, const char **reason);
+void lvmetad_set_disabled(struct cmd_context *cmd, const char *reason);
# else /* LVMETAD_SUPPORT */
@@ -205,6 +206,7 @@ int lvmetad_is_disabled(struct cmd_context *cmd, const char **reason);
# define lvmetad_vg_is_foreign(cmd, vgname, vgid) (0)
# define lvmetad_token_matches(cmd) (1)
# define lvmetad_is_disabled(cmd, reason) (0)
+# define lvmetad_set_disabled(cmd, reason) do { } while (0)
# endif /* LVMETAD_SUPPORT */
8 years, 2 months
master - lvmetad: add disabled state
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a4ef8fa25e4a8e...
Commit: a4ef8fa25e4a8e14bef132393070006819b30935
Parent: e41ee70accbc604e3a7daea0ab10f9405e95a531
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Jan 28 16:54:36 2016 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 19 09:41:18 2016 -0500
lvmetad: add disabled state
A global flag in lvmetad indicates it has been disabled.
Other flags indicate the reason it was disabled.
These flags can be queried using get_global_info.
The lvmetactl debugging utility can set and clear the
disabled flag in lvmetad. Nothing else sets the
disabled flag yet.
Commands will check these flags after connecting to
lvmetad. If the disabled flag is set, the command
will not use the lvmetad cache, but revert to disk
scanning.
To test this feature:
$ lvmetactl get_global_info
response = "OK"
global_invalid = 0
global_disable = 0
disable_reason = "none"
token = "filter:3041577944"
$ vgs
(should report VGs from lvmetad)
$ lvmetactl set_global_disable 1
$ lvmetactl get_global_info
response = "OK"
global_invalid = 0
global_disable = 1
disable_reason = "DIRECT"
token = "filter:3041577944"
$ vgs
WARNING: Not using lvmetad because the disable flag was set directly.
(should report VGs without contacting lvmetad)
$ lvmetactl set_global_disable 0
$ vgs
(should report VGs from lvmetad)
---
daemons/lvmetad/lvmetactl.c | 23 ++++++++++--
daemons/lvmetad/lvmetad-core.c | 74 +++++++++++++++++++++++++++++++++++++++-
lib/cache/lvmetad.c | 49 ++++++++++++++++++++++++++
lib/cache/lvmetad.h | 3 ++
4 files changed, 144 insertions(+), 5 deletions(-)
diff --git a/daemons/lvmetad/lvmetactl.c b/daemons/lvmetad/lvmetactl.c
index de40bef..90db173 100644
--- a/daemons/lvmetad/lvmetactl.c
+++ b/daemons/lvmetad/lvmetactl.c
@@ -37,11 +37,12 @@ int main(int argc, char **argv)
printf("lvmetactl dump\n");
printf("lvmetactl pv_list\n");
printf("lvmetactl vg_list\n");
+ printf("lvmetactl get_global_info\n");
printf("lvmetactl vg_lookup_name <name>\n");
printf("lvmetactl vg_lookup_uuid <uuid>\n");
printf("lvmetactl pv_lookup_uuid <uuid>\n");
printf("lvmetactl set_global_invalid 0|1\n");
- printf("lvmetactl get_global_invalid\n");
+ printf("lvmetactl set_global_disable 0|1\n");
printf("lvmetactl set_vg_version <uuid> <name> <version>\n");
printf("lvmetactl vg_lock_type <uuid>\n");
return -1;
@@ -69,6 +70,12 @@ int main(int argc, char **argv)
NULL);
printf("%s\n", reply.buffer.mem);
+ } else if (!strcmp(cmd, "get_global_info")) {
+ reply = daemon_send_simple(h, "get_global_info",
+ "token = %s", "skip",
+ NULL);
+ printf("%s\n", reply.buffer.mem);
+
} else if (!strcmp(cmd, "set_global_invalid")) {
if (argc < 3) {
printf("set_global_invalid 0|1\n");
@@ -82,11 +89,19 @@ int main(int argc, char **argv)
NULL);
print_reply(reply);
- } else if (!strcmp(cmd, "get_global_invalid")) {
- reply = daemon_send_simple(h, "get_global_info",
+ } else if (!strcmp(cmd, "set_global_disable")) {
+ if (argc < 3) {
+ printf("set_global_disable 0|1\n");
+ return -1;
+ }
+ val = atoi(argv[2]);
+
+ reply = daemon_send_simple(h, "set_global_info",
+ "global_disable = " FMTd64, (int64_t) val,
+ "disable_reason = %s", "DIRECT",
"token = %s", "skip",
NULL);
- printf("%s\n", reply.buffer.mem);
+ print_reply(reply);
} else if (!strcmp(cmd, "set_vg_version")) {
if (argc < 5) {
diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c
index 090255a..1c2ac81 100644
--- a/daemons/lvmetad/lvmetad-core.c
+++ b/daemons/lvmetad/lvmetad-core.c
@@ -196,7 +196,14 @@ struct vg_info {
uint32_t flags; /* VGFL_ */
};
-#define GLFL_INVALID 0x00000001
+#define GLFL_INVALID 0x00000001
+#define GLFL_DISABLE 0x00000002
+#define GLFL_DISABLE_REASON_DIRECT 0x00000004
+#define GLFL_DISABLE_REASON_LVM1 0x00000008
+#define GLFL_DISABLE_REASON_DUPLICATES 0x00000010
+
+#define GLFL_DISABLE_REASON_ALL (GLFL_DISABLE_REASON_DIRECT | GLFL_DISABLE_REASON_LVM1 | GLFL_DISABLE_REASON_DUPLICATES)
+
#define VGFL_INVALID 0x00000001
typedef struct {
@@ -2601,9 +2608,42 @@ static response vg_remove(lvmetad_state *s, request r)
return daemon_reply_simple("OK", NULL);
}
+/*
+ * Whether lvmetad is disabled is determined only by the single
+ * flag GLFL_DISABLE. The REASON flags are only explanatory
+ * additions to GLFL_DISABLE, and do not control the disabled state.
+ * The REASON flags can accumulate if multiple reasons exist for
+ * the disabled flag. When clearing GLFL_DISABLE, all REASON flags
+ * are cleared. The caller clearing GLFL_DISABLE should only do so
+ * when all the reasons for it have gone.
+ */
+
static response set_global_info(lvmetad_state *s, request r)
{
const int global_invalid = daemon_request_int(r, "global_invalid", -1);
+ const int global_disable = daemon_request_int(r, "global_disable", -1);
+ const char *reason;
+ uint32_t reason_flags = 0;
+
+ if ((reason = daemon_request_str(r, "disable_reason", NULL))) {
+ if (strstr(reason, "DIRECT"))
+ reason_flags |= GLFL_DISABLE_REASON_DIRECT;
+ if (strstr(reason, "LVM1"))
+ reason_flags |= GLFL_DISABLE_REASON_LVM1;
+ if (strstr(reason, "DUPLICATES"))
+ reason_flags |= GLFL_DISABLE_REASON_DUPLICATES;
+ }
+
+ if (global_invalid != -1) {
+ DEBUGLOG(s, "set global info invalid from %d to %d",
+ (s->flags & GLFL_INVALID) ? 1 : 0, global_invalid);
+ }
+
+ if (global_disable != -1) {
+ DEBUGLOG(s, "set global info disable from %d to %d %s",
+ (s->flags & GLFL_DISABLE) ? 1 : 0, global_disable,
+ reason ? reason : "");
+ }
if (global_invalid == 1)
s->flags |= GLFL_INVALID;
@@ -2611,6 +2651,15 @@ static response set_global_info(lvmetad_state *s, request r)
else if (global_invalid == 0)
s->flags &= ~GLFL_INVALID;
+ if (global_disable == 1) {
+ s->flags |= GLFL_DISABLE;
+ s->flags |= reason_flags;
+
+ } else if (global_disable == 0) {
+ s->flags &= ~GLFL_DISABLE;
+ s->flags &= ~GLFL_DISABLE_REASON_ALL;
+ }
+
return daemon_reply_simple("OK", NULL);
}
@@ -2629,8 +2678,31 @@ static response set_global_info(lvmetad_state *s, request r)
static response get_global_info(lvmetad_state *s, request r)
{
+ char reason[REASON_BUF_SIZE];
+
+ /* This buffer should be large enough to hold all the possible reasons. */
+
+ memset(reason, 0, sizeof(reason));
+
+ if (s->flags & GLFL_DISABLE) {
+ snprintf(reason, REASON_BUF_SIZE - 1, "%s%s%s",
+ (s->flags & GLFL_DISABLE_REASON_DIRECT) ? "DIRECT," : "",
+ (s->flags & GLFL_DISABLE_REASON_LVM1) ? "LVM1," : "",
+ (s->flags & GLFL_DISABLE_REASON_DUPLICATES) ? "DUPLICATES," : "");
+ }
+
+ if (!reason[0])
+ strcpy(reason, "none");
+
+ DEBUGLOG(s, "global info invalid is %d disable is %d reason %s",
+ (s->flags & GLFL_INVALID) ? 1 : 0,
+ (s->flags & GLFL_DISABLE) ? 1 : 0, reason);
+
return daemon_reply_simple("OK", "global_invalid = " FMTd64,
(int64_t)((s->flags & GLFL_INVALID) ? 1 : 0),
+ "global_disable = " FMTd64,
+ (int64_t)((s->flags & GLFL_DISABLE) ? 1 : 0),
+ "disable_reason = %s", reason,
"token = %s",
s->token[0] ? s->token : "none",
NULL);
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index a680441..f2831f1 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -2249,3 +2249,52 @@ int lvmetad_vg_is_foreign(struct cmd_context *cmd, const char *vgname, const cha
return ret;
}
+
+int lvmetad_is_disabled(struct cmd_context *cmd, const char **reason)
+{
+ daemon_reply reply;
+ const char *reply_reason;
+ int ret = 0;
+
+ reply = daemon_send_simple(_lvmetad, "get_global_info",
+ "token = %s", "skip",
+ NULL);
+
+ if (reply.error) {
+ *reason = "send error";
+ ret = 1;
+ goto out;
+ }
+
+ if (strcmp(daemon_reply_str(reply, "response", ""), "OK")) {
+ *reason = "response error";
+ ret = 1;
+ goto out;
+ }
+
+ if (daemon_reply_int(reply, "global_disable", 0)) {
+ ret = 1;
+
+ reply_reason = daemon_reply_str(reply, "disable_reason", NULL);
+
+ if (!reply_reason) {
+ *reason = "<not set>";
+
+ } else if (strstr(reply_reason, "DIRECT")) {
+ *reason = "the disable flag was set directly";
+
+ } else if (strstr(reply_reason, "LVM1")) {
+ *reason = "LVM1 metadata was found";
+
+ } else if (strstr(reply_reason, "DUPLICATES")) {
+ *reason = "duplicate PVs were found";
+
+ } else {
+ *reason = "<unknown>";
+ }
+ }
+out:
+ daemon_reply_destroy(reply);
+ return ret;
+}
+
diff --git a/lib/cache/lvmetad.h b/lib/cache/lvmetad.h
index 5820956..10283bb 100644
--- a/lib/cache/lvmetad.h
+++ b/lib/cache/lvmetad.h
@@ -172,6 +172,8 @@ int lvmetad_token_matches(struct cmd_context *cmd);
int lvmetad_vg_is_foreign(struct cmd_context *cmd, const char *vgname, const char *vgid);
+int lvmetad_is_disabled(struct cmd_context *cmd, const char **reason);
+
# else /* LVMETAD_SUPPORT */
# define lvmetad_init(cmd) do { } while (0)
@@ -202,6 +204,7 @@ int lvmetad_vg_is_foreign(struct cmd_context *cmd, const char *vgname, const cha
# define lvmetad_validate_global_cache(cmd, force) do { } while (0)
# define lvmetad_vg_is_foreign(cmd, vgname, vgid) (0)
# define lvmetad_token_matches(cmd) (1)
+# define lvmetad_is_disabled(cmd, reason) (0)
# endif /* LVMETAD_SUPPORT */
8 years, 2 months
master - toollib: remove unneeded call in process_each_pv
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e41ee70accbc60...
Commit: e41ee70accbc604e3a7daea0ab10f9405e95a531
Parent: a6a32a7c0e6ed9ef9e61e82b2d1353a1c06a9dd3
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Apr 7 13:45:26 2016 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 19 09:40:24 2016 -0500
toollib: remove unneeded call in process_each_pv
process_each_pv was doing:
1. lvmcache_seed_infos_from_lvmetad()
sends pv_list request to lvmetad.
2. get_vgnameids()
sends vg_list request to lvmetad.
3. _get_all_devices()
first calls lvmcache_seed_infos_from_lvmetad(),
which is a no-op if it's already been called.
Because get_vgnameids() does not use the information
from lvmcache_seed_infos_from_lvmetad(), it does not
need to be called prior to get_all_devices where
it is actually needed.
---
tools/toollib.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/tools/toollib.c b/tools/toollib.c
index b9db9cb..ac2a57a 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -3372,12 +3372,6 @@ int process_each_pv(struct cmd_context *cmd,
dev_cache_full_scan(cmd->full_filter);
}
- /*
- * Need pvid's set on all PVs before processing so that pvid's
- * can be compared to find duplicates while processing.
- */
- lvmcache_seed_infos_from_lvmetad(cmd);
-
if (!get_vgnameids(cmd, &all_vgnameids, only_this_vgname, 1)) {
stack;
return ret;
8 years, 2 months
master - metadata: don't repair shared VGs
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a6a32a7c0e6ed9...
Commit: a6a32a7c0e6ed9ef9e61e82b2d1353a1c06a9dd3
Parent: a400eba1740c335ed715c67b978dd0ed8228d73a
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Apr 14 16:40:26 2016 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 19 09:19:32 2016 -0500
metadata: don't repair shared VGs
When the in-use flag looks like it needs to be repaired.
---
lib/metadata/metadata.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index ecdb5af..782235e 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -4037,6 +4037,14 @@ static int _check_or_repair_pv_ext(struct cmd_context *cmd,
"VG %s but not marked as used.",
pv_dev_name(pvl->pv), vg->name);
*inconsistent_pvs = 1;
+ } else if (is_lockd_type(vg->lock_type)) {
+ /*
+ * FIXME: decide how to handle repair for shared VGs.
+ */
+ log_warn("Skip repair of PV %s that is in shared "
+ "VG %s but not marked as used.",
+ pv_dev_name(pvl->pv), vg->name);
+ *inconsistent_pvs = 1;
} else {
log_warn("WARNING: Repairing Physical Volume %s that is "
"in Volume Group %s but not marked as used.",
8 years, 2 months
master - lvmlockd: skip unnecessary lvmetad cache update
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a400eba1740c33...
Commit: a400eba1740c335ed715c67b978dd0ed8228d73a
Parent: 50633039bfb5ef9a89e419ca7ad7ad49304d1c0d
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Apr 14 13:45:10 2016 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 19 09:19:32 2016 -0500
lvmlockd: skip unnecessary lvmetad cache update
In cases where a VG is reread from disk, but the
seqno matches what is currently in lvmetad, the
metadata in lvmetad doesn't need to be updated.
---
lib/cache/lvmetad.c | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index 7ca5d4a..a680441 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -872,7 +872,7 @@ struct volume_group *lvmetad_vg_lookup(struct cmd_context *cmd, const char *vgna
} else {
log_error(INTERNAL_ERROR "VG name required (VGID not available)");
- goto out;
+ return NULL;
}
if (_lvmetad_handle_reply(reply, "vg_lookup", diag_name, &found) && found) {
@@ -958,16 +958,14 @@ struct volume_group *lvmetad_vg_lookup(struct cmd_context *cmd, const char *vgna
* invalidated the cached vg.
*/
if (rescan) {
- log_debug_lvmetad("Update invalid lvmetad cache for VG %s", vgname);
- vg2 = lvmetad_pvscan_vg(cmd, vg);
- release_vg(vg);
- vg = vg2;
- if (!vg) {
+ if (!(vg2 = lvmetad_pvscan_vg(cmd, vg))) {
log_debug_lvmetad("VG %s from lvmetad not found during rescan.", vgname);
fid = NULL;
goto out;
- } else
- fid = vg->fid;
+ }
+ release_vg(vg);
+ vg = vg2;
+ fid = vg2->fid;
}
dm_list_iterate_items(pvl, &vg->pvs) {
@@ -1575,6 +1573,7 @@ static struct volume_group *lvmetad_pvscan_vg(struct cmd_context *cmd, struct vo
struct format_instance_ctx fic = { .type = 0 };
struct _lvmetad_pvscan_baton baton;
struct device *save_dev = NULL;
+ uint32_t save_seqno = 0;
dm_list_iterate_items(pvl, &vg->pvs) {
/* missing pv */
@@ -1622,6 +1621,9 @@ static struct volume_group *lvmetad_pvscan_vg(struct cmd_context *cmd, struct vo
continue;
}
+ if (!save_seqno)
+ save_seqno = baton.vg->seqno;
+
if (!(vgmeta = export_vg_to_config_tree(baton.vg))) {
log_error("VG export to config tree failed");
release_vg(baton.vg);
@@ -1661,10 +1663,14 @@ static struct volume_group *lvmetad_pvscan_vg(struct cmd_context *cmd, struct vo
* but that is the field which lvmetad_vg_update() uses
* to send the metadata cft to lvmetad.
*/
- vg_ret->cft_precommitted = vgmeta_ret;
- if (!lvmetad_vg_update(vg_ret))
- log_error("Failed to update lvmetad with new VG meta");
- vg_ret->cft_precommitted = NULL;
+ if (save_seqno != vg->seqno) {
+ log_debug_lvmetad("Update lvmetad from seqno %u to seqno %u for VG %s",
+ vg->seqno, save_seqno, vg->name);
+ vg_ret->cft_precommitted = vgmeta_ret;
+ if (!lvmetad_vg_update(vg_ret))
+ log_error("Failed to update lvmetad with new VG meta");
+ vg_ret->cft_precommitted = NULL;
+ }
dm_config_destroy(vgmeta_ret);
}
out:
8 years, 2 months
master - tests: use should for failing test
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=50633039bfb5ef...
Commit: 50633039bfb5ef9a89e419ca7ad7ad49304d1c0d
Parent: 59b0bd7b6445d0c09568eae4cbf75577ce190803
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Apr 18 23:12:05 2016 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Apr 18 23:12:05 2016 +0200
tests: use should for failing test
It's better to use 'should' for failing test before it gets fixed,
when we ignore failing result.
---
test/shell/lvmetad-lvm1.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/shell/lvmetad-lvm1.sh b/test/shell/lvmetad-lvm1.sh
index 9720833..824c1d5 100644
--- a/test/shell/lvmetad-lvm1.sh
+++ b/test/shell/lvmetad-lvm1.sh
@@ -19,11 +19,11 @@ SKIP_WITH_LVMPOLLD=1
aux prepare_devs 2
pvcreate --metadatatype 1 "$dev1"
-vgscan --cache
+should not vgscan --cache
pvs | tee out
not grep "$dev1" out
vgcreate --metadatatype 1 $vg1 "$dev1"
-vgscan --cache
+should not vgscan --cache
vgs | tee out
not grep $vg1 out
pvs | tee out
8 years, 2 months