diff options
author | David Teigland <teigland@redhat.com> | 2016-01-29 12:25:20 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2016-04-22 13:19:52 -0500 |
commit | 7454b975cf47dfaff5402eb2fbd285d30119d14b (patch) | |
tree | 17b7e51a83457b64e67d4ed7c5d125a72e142135 | |
parent | 31b11d02281a3d141fa2c69d9155baacd158bf50 (diff) | |
download | lvm2-7454b975cf47dfaff5402eb2fbd285d30119d14b.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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index e2c86c46d..8ac113f68 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -27,6 +27,7 @@ #include "config.h" #include "lvmetad.h" +#include "lvmetad-client.h" #define CACHE_INVALID 0x00000001 #define CACHE_LOCKED 0x00000002 @@ -1840,6 +1841,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, LVMETAD_DISABLE_REASON_DUPLICATES); + } _found_duplicate_pvs = 1; /* |