[lvm-devel] [PATCH] config: set external_device_info_source=none if udev isn't running

David Teigland teigland at redhat.com
Fri Jan 29 20:39:39 UTC 2021


On Fri, Jan 29, 2021 at 08:58:21PM +0100, Martin Wilck wrote:
> If there are both SCSI devices and multipath devices with the given
> WWID, multipath would be preferred, I suppose? What would happen during
> device detection, when a SCSI device with the given WWID pops up? How
> would lvm "know" that this device was going to be added to a multipath
> map without asking udev?

Multipath devs and scsi devs are recorded as different types in the
devices file.  So, when looking for the wwid lvm will only look at mpath
devices to find a match for it.

Ideally the user does not also include the scsi component in the devices
file, but if they do lvm's existing mpath component filter is used to
ignore it.

As an example, I have /dev/mapper/mpatha over /dev/sdf.

The devices file mpatha entry is:
IDTYPE=mpath_uuid IDNAME=mpath-3690b11c0000438ad0000057150910423 DEVNAME=/dev/mapper/mpatha PVID=G7YCC9mQZPSvu21oWivrjM2yPtTb55dU

in this case lvm never looks at /dev/sdf.

After adding sdf to the devices file (ignoring the warnings about it):
IDTYPE=sys_wwid IDNAME=naa.690b11c0000438ad0000057150910423 DEVNAME=/dev/sdf PVID=G7YCC9mQZPSvu21oWivrjM2yPtTb55dU
IDTYPE=mpath_uuid IDNAME=mpath-3690b11c0000438ad0000057150910423 DEVNAME=/dev/mapper/mpatha PVID=G7YCC9mQZPSvu21oWivrjM2yPtTb55dU

in this case lvm's mpath filter ignores sdf.

"sys_wwid" entries are matched based on the /sys/.../device/wwid value and
"mpath_uuid" entries are matched based on the /sys/.../dm/uuid value.

(Note the unreliable DEVNAME values in there are used only as hints and
lvm corrects these when it finds they've become incorrect.)

Dave




More information about the lvm-devel mailing list