Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0fed9b097120648301faa…
Commit: 0fed9b097120648301faa586970a47b8b4d629ff
Parent: 8e9410594b3113386a667df400b2c229c745cb6a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 4 17:00:48 2022 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Nov 8 11:10:21 2022 +0100
tests: update test to handle different status
Since now we change deduplication with V4 table line change,
the modification tends to be faster and we can capture for a few ms
also 'status' about opening or closing deduplication index.
Use 'grep -E' to handle both words.
---
test/shell/lvchange-vdo.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/test/shell/lvchange-vdo.sh b/test/shell/lvchange-vdo.sh
index 7cc44d6bc..b11edf35c 100644
--- a/test/shell/lvchange-vdo.sh
+++ b/test/shell/lvchange-vdo.sh
@@ -40,13 +40,14 @@ check grep_dmsetup status $vg-vdopool-vpool " online online "
# dedulication_ARG
lvchange --deduplication n $vg/vdopool
-check grep_dmsetup status $vg-vdopool-vpool " offline online "
+check grep_dmsetup status $vg-vdopool-vpool -E " offline|closed online "
+
lvchange --deduplication y $vg/vdopool
-check grep_dmsetup status $vg-vdopool-vpool " online online "
+check grep_dmsetup status $vg-vdopool-vpool -E " online|opening online "
lvchange --compression n --deduplication n $vg/vdopool
-check grep_dmsetup status $vg-vdopool-vpool " offline offline "
+check grep_dmsetup status $vg-vdopool-vpool -E " offline|closed offline "
# --vdosettings needs inactive LV
not lvchange --vdosettings 'ack_threads=8' $vg/vdopool
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=377ed7d9bac948e1be97e…
Commit: 377ed7d9bac948e1be97e78aa9f9e525e9af470d
Parent: 73b9a2805ca2f2c70f6f631b405f8fea3f72f23b
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Jul 25 13:50:43 2022 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Nov 2 12:20:07 2022 -0500
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 61a2fee6d..04e9f0605 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -640,6 +640,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 59c15b0d4..bc98d2d5a 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