summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2016-01-29 12:25:20 -0600
committerDavid Teigland <teigland@redhat.com>2016-02-11 16:48:56 -0600
commit5fb4bd487415c25804df4a51840e1e9263f1c2fd (patch)
treec9d77ddf6786ad89cb1a730ae548dbbb7450f5e5
parentc5c60e03b016d62ab8424d3a5757db80c8af87d9 (diff)
downloadlvm2-5fb4bd487415c25804df4a51840e1e9263f1c2fd.tar.gz
pvscan: disable lvmetad if duplicate PVs are found
-rw-r--r--lib/cache/lvmcache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 4a4b53f90..9eb99bc0f 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -1834,6 +1834,11 @@ struct lvmcache_info *lvmcache_add(struct labeller *labeller, const char *pvid,
* pv->dev under the VG, and its duplicate outside
* the VG context.)
*/
+
+ if (!_found_duplicate_pvs && lvmetad_used()) {
+ log_warn("WARNING: Disabling lvmetad cache which does not support duplicate PVs.");
+ lvmetad_set_disabled(fmt->cmd, "DUPLICATES");
+ }
_found_duplicate_pvs = 1;
/*