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-13 14:14:26 -0500
commitec4057454fbcd3a50a041fa2be9cde9831cce63c (patch)
treec77ca878a6b4f9d6fdf9ff3a10611077496b258a
parentc4f4dc88b4a1f60c26a70ae73b808c6495415ee3 (diff)
downloadlvm2-ec4057454fbcd3a50a041fa2be9cde9831cce63c.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 3432ef690..a89f78ab8 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -1840,6 +1840,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;
/*