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-15 13:06:03 -0500
commit00e5ab7bb322133c196dd6949d1138bbc3d06725 (patch)
tree00fc27623243cf3d54a63252aeba1217201e2f3d
parent03d109dbb0f2e07d5f1dc43424ae95d0252ea672 (diff)
downloadlvm2-00e5ab7bb322133c196dd6949d1138bbc3d06725.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 e2c86c46d..c13b09264 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;
/*