diff options
author | David Teigland <teigland@redhat.com> | 2016-01-29 12:25:20 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2016-04-11 13:17:33 -0500 |
commit | a07e69e63326657fb6f6df251e70390edec6bf14 (patch) | |
tree | 3705e2510ff8a792b356c4fc24e0e83da39e8292 | |
parent | 5fa864d47d73b77fba7830760ced84e3be6b4d79 (diff) | |
download | lvm2-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.c | 5 |
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; /* |