1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-30 17:18:21 +03:00

apply multipath_component_detection=0 to duplicate PV handling

multipath_component_detection=0 has always applied to the filter-based
component detection.  Also apply this setting to the duplicate-PV
handling which also eliminates multipath components (based on duplicate
PVs having the same wwid.)
This commit is contained in:
David Teigland 2022-07-25 13:50:43 -05:00
parent c0f8e6675c
commit 99ce09ae77
2 changed files with 10 additions and 3 deletions

View File

@ -652,6 +652,9 @@ static int _all_multipath_components(struct cmd_context *cmd, struct lvmcache_in
*dev_mpath = NULL;
if (!find_config_tree_bool(cmd, devices_multipath_component_detection_CFG, NULL))
return 0;
/* This function only makes sense with more than one dev. */
if ((info && dm_list_empty(altdevs)) || (!info && (dm_list_size(altdevs) == 1))) {
log_debug("Skip multipath component checks with single device for PVID %s", pvid);

View File

@ -24,9 +24,13 @@ modprobe --dry-run scsi_debug || skip
multipath -l || skip
multipath -l | grep scsi_debug && skip
# Turn off multipath_component_detection so that the duplicate
# resolution of mpath components is used.
aux lvmconf 'devices/multipath_component_detection = 0'
# FIXME: setting multipath_component_detection=0 now also disables
# the wwid-based mpath component detection, so this test will need
# to find another way to disable only the filter-mpath code (using
# sysfs and multipath/wwids) while keeping the code enabled that
# eliminates duplicates based on their matching wwids which this
# tries to test.
# Prevent wwids from being used for filtering.
aux lvmconf 'devices/multipath_wwids_file = "/dev/null"'
# Need to use /dev/mapper/mpath