Fix for Bug 2109351 - multipath_component_detection = 0 in lvm.conf does not have any effect

"Marappan, Gopinath" <[email protected]>
Newsgroups gmane.linux.lvm.general
Message-ID <DM6PR19MB249191C1C763815BDDFE998588919@DM6PR19MB2491.namprd19.prod.outlook.com>
Regarding a fix for this bug -  https://bugzilla.redhat.com/show_bug.cgi?id=2109351

multipath_component_detection parameter is not considered when lvm scans for PVs.

This patch should fix that issue.  It ensures that the multipath_component_detction parameter
from lvm.conf is considered before checking for duplicated PVIDs and ignoring them if they are
multipath components.

I have built the patch and verified that it works.

diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 22edcfd84..892636aa7 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -898,7 +898,8 @@ next:
        /*
         * Get rid of multipath components based on matching wwids.
         */
-       if (_all_multipath_components(cmd, info, pvid, &altdevs, &dev_mpath)) {
+        if ( find_config_tree_bool(cmd, devices_multipath_component_detection_CFG, NULL) &&
+             _all_multipath_components(cmd, info, pvid, &altdevs, &dev_mpath) ){
                if (info && dev_mpath && (info->dev != dev_mpath)) {
                        /*
                         * info should be dropped from lvmcache and info->dev

I tried to create a pull request on https://github.com/lvmteam/lvm2, but I couldn't as I don't have access.

If I am granted access to the lvm2 github repo, I can create a PR for this patch.

Kindly let me know how to proceed with this.

Thanks,
Gopi



Internal Use - Confidential

_______________________________________________
linux-lvm mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.