All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] config: set external_device_info_source=none if udev isn't running
Date: Fri, 29 Jan 2021 14:39:39 -0600	[thread overview]
Message-ID: <20210129203939.GC7644@redhat.com> (raw)
In-Reply-To: <8f0c242bce1d4efed73ae852e8d89111aa709c7f.camel@suse.com>

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



  reply	other threads:[~2021-01-29 20:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 17:28 [PATCH] config: set external_device_info_source=none if udev isn't running mwilck
2021-01-28 10:10 ` Zdenek Kabelac
2021-01-28 10:27   ` Martin Wilck
2021-01-28 22:56     ` Zdenek Kabelac
2021-01-29  0:41       ` heming.zhao
2021-01-29 10:07       ` Martin Wilck
2021-01-29 11:11         ` Zdenek Kabelac
2021-01-29 13:02           ` Martin Wilck
2021-01-29 16:38             ` Zdenek Kabelac
2021-01-29 17:58               ` Martin Wilck
2021-01-29 20:36                 ` Zdenek Kabelac
2021-01-29 17:34             ` David Teigland
2021-01-29 19:58               ` Martin Wilck
2021-01-29 20:39                 ` David Teigland [this message]
2021-01-29 20:43                   ` Martin Wilck
2021-01-29 16:59         ` David Teigland
2021-01-29 18:13           ` Martin Wilck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210129203939.GC7644@redhat.com \
    --to=teigland@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.