[lvm-devel] [PATCH] config: set external_device_info_source=none if udev isn't running
Martin Wilck
mwilck at suse.com
Fri Jan 29 20:43:10 UTC 2021
On Fri, 2021-01-29 at 14:39 -0600, David Teigland wrote:
> 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.
If it works :-)
> "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.
>
Nice work, looks pretty solid to me. Perhaps we could add automation to
multipath-tools for creating such entries ....
Cheers,
Martin
More information about the lvm-devel
mailing list