From 9f29ca469f0cdde3bb494f2c20923e9166b5fe723c9dff667efc37667debd13a Mon Sep 17 00:00:00 2001 From: heming zhao Date: Fri, 23 Jun 2023 09:00:10 +0000 Subject: [PATCH] Accepting request 1094778 from home:hmzhao:branches:Base:System - multipath_component_detection = 0 in lvm.conf does not have any effect (bsc#1212613) - bug-1212613_apply-multipath_component_detection-0-to-duplicate-P.patch OBS-URL: https://build.opensuse.org/request/show/1094778 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=326 --- ...component_detection-0-to-duplicate-P.patch | 53 +++++++++++++++++++ lvm.conf | 2 +- lvm2.changes | 6 +++ lvm2.spec | 9 ++-- 4 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 bug-1212613_apply-multipath_component_detection-0-to-duplicate-P.patch diff --git a/bug-1212613_apply-multipath_component_detection-0-to-duplicate-P.patch b/bug-1212613_apply-multipath_component_detection-0-to-duplicate-P.patch new file mode 100644 index 0000000..b7cd177 --- /dev/null +++ b/bug-1212613_apply-multipath_component_detection-0-to-duplicate-P.patch @@ -0,0 +1,53 @@ +From 99ce09ae778c2cc4aa2611e425bba5287b8b9513 Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Mon, 25 Jul 2022 13:50:43 -0500 +Subject: [PATCH] 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.) +--- + lib/cache/lvmcache.c | 3 +++ + test/shell/duplicate-pvs-multipath.sh | 10 +++++++--- + 2 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c +index a1c4a61c82fa..00916885c509 100644 +--- a/lib/cache/lvmcache.c ++++ b/lib/cache/lvmcache.c +@@ -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); +diff --git a/test/shell/duplicate-pvs-multipath.sh b/test/shell/duplicate-pvs-multipath.sh +index 59c15b0d4f9b..bc98d2d5aa8c 100644 +--- a/test/shell/duplicate-pvs-multipath.sh ++++ b/test/shell/duplicate-pvs-multipath.sh +@@ -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 +-- +2.35.3 + diff --git a/lvm.conf b/lvm.conf index 5785074..413eb93 100644 --- a/lvm.conf +++ b/lvm.conf @@ -2421,7 +2421,7 @@ dmeventd { # Configuration option dmeventd/executable. # The full path to the dmeventd binary. # This configuration option has an automatic default value. - # executable = "" + # executable = "/usr/sbin/dmeventd" } # Configuration section tags. diff --git a/lvm2.changes b/lvm2.changes index 0b7a38f..8e5f523 100644 --- a/lvm2.changes +++ b/lvm2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 23 06:38:00 UTC 2023 - Heming Zhao + +- multipath_component_detection = 0 in lvm.conf does not have any effect (bsc#1212613) + - bug-1212613_apply-multipath_component_detection-0-to-duplicate-P.patch + ------------------------------------------------------------------- Tue Dec 27 13:08:23 UTC 2022 - Ludwig Nussel diff --git a/lvm2.spec b/lvm2.spec index ae53e97..e711b82 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -86,6 +86,7 @@ Patch0012: 0012-devices-file-fix-pvcreate-uuid-matching-pvid-entry-w.patch Patch0013: 0013-vgimportdevices-change-result-when-devices-are-not-a.patch Patch0014: 0014-vgimportdevices-fix-locking-when-creating-devices-fi.patch Patch0015: bug-1203216_lvmlockd-purge-the-lock-resources-left-in-previous-l.patch +Patch0016: bug-1212613_apply-multipath_component_detection-0-to-duplicate-P.patch # SUSE patches: 1000+ for LVM # Never upstream Patch1001: cmirrord_remove_date_time_from_compilation.patch @@ -106,8 +107,10 @@ Patch4001: bug-1037309_Makefile-skip-compliling-daemons-lvmlockd-directory. BuildRequires: kmod-compat BuildRequires: libaio-devel BuildRequires: pkgconfig +BuildRequires: systemd-devel BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version} BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(systemd) Requires: device-mapper >= %{device_mapper_version} Requires: modutils Requires(post): coreutils @@ -121,13 +124,11 @@ BuildRequires: gcc-c++ BuildRequires: suse-module-tools BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(libsepol) -BuildRequires: pkgconfig(systemd) %else BuildRequires: libcorosync-devel BuildRequires: pkgconfig(blkid) %if %{with lockd} BuildRequires: libdlm-devel >= %{dlm_version} -BuildRequires: pkgconfig(libsystemd) %if 0%{_supportsanlock} == 1 BuildRequires: sanlock-devel >= %{sanlock_version} %endif @@ -135,7 +136,6 @@ BuildRequires: sanlock-devel >= %{sanlock_version} BuildRequires: gcc-c++ BuildRequires: libselinux-devel BuildRequires: readline-devel -BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(udev) %endif %endif @@ -161,6 +161,7 @@ Volume Manager. %patch0013 -p1 %patch0014 -p1 %patch0015 -p1 +%patch0016 -p1 %patch1001 -p1 %patch1002 -p1 %patch1003 -p1