linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* discuss about commit 3b0f9ce: filter-mpath: get wwids from sysfs vpd_pg83
@ 2023-11-11 12:51 Heming Zhao
  2023-11-13 11:52 ` Martin Wilck
  0 siblings, 1 reply; 47+ messages in thread
From: Heming Zhao @ 2023-11-11 12:51 UTC (permalink / raw)
  To: teigland, linux-lvm, Martin Wilck, Zdenek Kabelac; +Cc: Glass Su

Hello List,

I remember we discussed about the mpath filter before. It looks lvm2 developers didn't trust udev and wrote hard-coded scanning actions (see commit 3b0f9cec7e999, and below function dev_is_mpath_component()) to replace mpath+udev. But in SUSE env, we had tested/ran a long time and worked fine with setting up lvm2 under obtain_device_list_from_udev=1 & external_device_info_source = "udev".

 From SUSE env, below function at least should put line 702~705 to the beginning of this function. In the other word, consulting udev first, then back off to hard-coded checks.
I don't know if the "udev+mpio+lvm2" combination in RedHat environments often encounters problems with abnormal startup. From SUSE env, it seems we do revert 3b0f9cec7e999 may got better result.

677 int dev_is_mpath_component(struct cmd_context *cmd, struct device *dev, dev_t *holder_devno)
678 {
679     struct dev_types *dt = cmd->dev_types;
680     int primary_result;
681     dev_t primary_dev;
682
683     /*
684      * multipath only uses SCSI or NVME devices
685      */
686     if (!major_is_scsi_device(dt, MAJOR(dev->dev)) && !dev_is_nvme(dt, dev))
687         return 0;
688
689     /*
690      * primary_result 2: dev is a partition, primary_dev is the whole device
691      * primary_result 1: dev is a whole device
692      */
693     if (!(primary_result = dev_get_primary_dev(dt, dev, &primary_dev)))
694         return_0;
695
696     if (_dev_is_mpath_component_sysfs(cmd, dev, primary_result, primary_dev, holder_devno)  == 1)
697         goto found;
698
699     if (_dev_in_wwid_file(cmd, dev, primary_result, primary_dev))
700         goto found;
701
702     if (external_device_info_source() == DEV_EXT_UDEV) {
703         if (_dev_is_mpath_component_udev(dev) == 1)
704             goto found;
705     }
706
707     /*
708      * TODO: save the result of this function in dev->flags and use those
709      * flags on repeated calls to avoid repeating the work multiple times
710      * for the same device when there are partitions on the device.
711      */
712
713     return 0;
714 found:
715     return 1;
716 }

Thanks,
Heming

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2023-11-21 20:35 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-11 12:51 discuss about commit 3b0f9ce: filter-mpath: get wwids from sysfs vpd_pg83 Heming Zhao
2023-11-13 11:52 ` Martin Wilck
2023-11-13 13:52   ` Peter Rajnoha
2023-11-13 18:38     ` David Teigland
2023-11-14  7:55       ` Peter Rajnoha
2023-11-14 16:30         ` David Teigland
2023-11-15  8:51           ` Peter Rajnoha
2023-11-15 11:36             ` Heming Zhao
2023-11-15 19:12               ` David Teigland
2023-11-16 13:37                 ` Zdenek Kabelac
2023-11-16 13:46                   ` Martin Wilck
2023-11-16 14:03                     ` Zdenek Kabelac
2023-11-16 15:29                       ` Martin Wilck
2023-11-16 17:13                         ` David Teigland
2023-11-16 15:10                   ` David Teigland
2023-11-16 15:40                     ` Martin Wilck
2023-11-16 15:48                       ` Zdenek Kabelac
2023-11-16 17:27                         ` David Teigland
2023-11-16 15:59                     ` Zdenek Kabelac
2023-11-17  1:47                   ` Demi Marie Obenour
2023-11-17 15:25                     ` David Teigland
2023-11-17 19:57                       ` Demi Marie Obenour
2023-11-17 20:16                         ` David Teigland
2023-11-17 21:03                           ` Demi Marie Obenour
2023-11-17 21:05                             ` Martin Wilck
2023-11-20 10:13                               ` Zdenek Kabelac
2023-11-15 21:02             ` David Teigland
2023-11-15 21:46               ` Martin Wilck
2023-11-16 16:11                 ` David Teigland
2023-11-14 10:44       ` Martin Wilck
2023-11-14 12:18         ` Heming Zhao
2023-11-14 17:16           ` David Teigland
2023-11-14 17:00         ` David Teigland
2023-11-14 17:48           ` Martin Wilck
2023-11-14 17:58             ` Martin Wilck
2023-11-14 21:02               ` David Teigland
2023-11-15  7:35                 ` Martin Wilck
2023-11-16 16:34                   ` David Teigland
2023-11-16 20:22                     ` Benjamin Marzinski
2023-11-14 20:51             ` David Teigland
2023-11-15  5:15               ` Heming Zhao
2023-11-15  7:39                 ` Martin Wilck
2023-11-21 14:39   ` Martin Wilck
2023-11-21 17:56     ` David Teigland
2023-11-21 18:10       ` Martin Wilck
2023-11-21 18:25         ` David Teigland
2023-11-21 20:35           ` Martin Wilck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).