diff options
author | David Teigland <teigland@redhat.com> | 2019-08-01 15:04:10 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2019-08-16 13:26:12 -0500 |
commit | e01fddc5789b10d1bd15e8aee8985f14e81d3087 (patch) | |
tree | 6e3eca38589bcaee5d63c39e6c318e8f874fde25 /lib/label/label.c | |
parent | ee4a32e99224a0d4d2156c55d195e217967490b1 (diff) | |
download | lvm2-e01fddc5789b10d1bd15e8aee8985f14e81d3087.tar.gz |
improve duplicate pv handling for md components
Eliminate md components at the start so they don't
interfere with actual duplicates, and don't need
to be removed later. This also allows for choosing
no copy of a PVID if they all happen to be md
components.
Diffstat (limited to 'lib/label/label.c')
-rw-r--r-- | lib/label/label.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/label/label.c b/lib/label/label.c index 9454fc834..3c8e10c5b 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -441,7 +441,7 @@ static int _process_block(struct cmd_context *cmd, struct dev_filter *f, * struct for this dev, but added this dev to the list * of duplicate devs. */ - log_warn("WARNING: scan found duplicate PVID %s on %s", dev->pvid, dev_name(dev)); + log_debug("label scan found duplicate PVID %s on %s", dev->pvid, dev_name(dev)); } else { /* * Leave the info in lvmcache because the device is @@ -1117,9 +1117,10 @@ int label_scan(struct cmd_context *cmd) log_debug_devs("Scanning end of PVs with no udev info for MD components"); if (dev_is_md_component(devl->dev, NULL, 1)) { - log_debug_devs("Drop PV from MD component %s", dev_name(devl->dev)); + log_debug_devs("Scan dropping PV from MD component %s", dev_name(devl->dev)); devl->dev->flags &= ~DEV_SCAN_FOUND_LABEL; lvmcache_del_dev(devl->dev); + lvmcache_del_dev_from_duplicates(devl->dev); } } } |