All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Marzinski <bmarzins@redhat.com>
To: Martin Wilck <martin.wilck@suse.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>,
	device-mapper development <dm-devel@lists.linux.dev>
Subject: Re: [PATCH 1/3] multipathd: monitor new multipath dev even if we can't update it
Date: Thu, 27 Mar 2025 19:51:25 -0400	[thread overview]
Message-ID: <Z-XkfUIhidQymNhf@redhat.com> (raw)
In-Reply-To: <99b1d67f46298eed77b2d77ec396a1b0727481d0.camel@suse.com>

On Tue, Mar 25, 2025 at 11:33:12PM +0100, Martin Wilck wrote:
> On Mon, 2025-03-24 at 16:55 -0400, Benjamin Marzinski wrote:
> > If a multipath device was created by the multipath command,
> > multipathd
> > might not agree with how the device was created. ev_add_map() can
> > reload
> > the device with a different table by calling add_map_without_path() -
> > >
> > update_map(). If this reloading of the map failed, multipathd was
> > simply
> > ignoring the multipath device, even though it still existed.
> > 
> > One way that reloading can fail is if a path that multipathd already
> > has
> > initialized goes offline. If a multipath device is created by the
> > multipath command while the path is offline, it will not use the
> > offline
> > path, since multipath won't be able to get the necessary pathinfo.
> > However, multipathd will already have the pathinfo for the path, and
> > may
> > not even know that it's offline, since the path is an orphan. When it
> > tries to reload the device, it will include the offline path, and the
> > reload will fail.
> 
> Am I understanding correctly that during the reload, bdev_open() failed
> in the kernel because the path was offline?

Yep. It's failing in sd_open() -> scsi_block_when_processing_errors()
see the comment here:
https://github.com/torvalds/linux/blob/5c2a430e85994f4873ea5ec42091baa1153bc731/drivers/scsi/sd.c#L1523
 
> I was thinking about my recent tests [1] where I'd come to the
> conclusion that reload failure is hardly possible. While I'd realized
> that "trying to add a path device that was not previously mapped" might
> fail, I didn't think of the scenario you describe here.
> 
> [1] https://lore.kernel.org/dm-devel/ee6fcbda31fd1f13969653782417fbed748f5bc7.camel@suse.com/
> 
> > 
> > Instead of ignoring the device if it can't reload it, multipathd
> > should
> > just montior it as it is. When the path device is no longer offline,
> > it
> > can be added back to the multipath device by calling
> > "multipathd reconfigure" or "multipathd add path <path>".
> 
> 
> > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> 
> Reviewed-by: Martin Wilck <mwilck@suse.com>


  reply	other threads:[~2025-03-27 23:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-24 20:55 [PATCH 0/3] fix issue of multipathd not tracking device Benjamin Marzinski
2025-03-24 20:55 ` [PATCH 1/3] multipathd: monitor new multipath dev even if we can't update it Benjamin Marzinski
2025-03-25 22:33   ` Martin Wilck
2025-03-27 23:51     ` Benjamin Marzinski [this message]
2025-03-24 20:55 ` [PATCH 2/3] multipathd: re-add paths skipped because they were offline Benjamin Marzinski
2025-03-25 22:33   ` Martin Wilck
2025-03-28 16:36     ` Benjamin Marzinski
2025-03-28 19:15       ` Martin Wilck
2025-03-24 20:55 ` [PATCH 3/3] multipathd: don't update paths in INIT_MISSING_UDEV Benjamin Marzinski
2025-03-25 22:40   ` 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=Z-XkfUIhidQymNhf@redhat.com \
    --to=bmarzins@redhat.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=martin.wilck@suse.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.