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-08 16:37:12 -0500
commit261f99e04507f29c1020eff211674b351e89fd6e (patch)
tree177fa671fb9bd9483663501b33d77f5325afd760
parent1e1e3f74758587739ed0e4d7a21f1d3a69300b8a (diff)
downloadlvm2-261f99e04507f29c1020eff211674b351e89fd6e.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;
/*