summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2016-01-29 12:25:20 -0600
committerDavid Teigland <teigland@redhat.com>2016-04-11 13:17:33 -0500
commita07e69e63326657fb6f6df251e70390edec6bf14 (patch)
tree3705e2510ff8a792b356c4fc24e0e83da39e8292
parent5fa864d47d73b77fba7830760ced84e3be6b4d79 (diff)
downloadlvm2-a07e69e63326657fb6f6df251e70390edec6bf14.tar.gz
lvmetad: set disabled flag in lvmetad if duplicate PVs are found
When devices are being scanned, if duplicate PVs are seen, tell lvmetad to set its disabled flag because of duplicate PVs.
-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 394745a9e..57095c588 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -1837,6 +1837,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;
/*