dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [dm-devel] [PATCH 0/2] Handle remapped LUNs better
@ 2021-02-09  5:19 Benjamin Marzinski
  2021-02-09  5:19 ` [dm-devel] [PATCH 1/2] libmultipath: fix use-after-free in uev_add_path Benjamin Marzinski
  2021-02-09  5:19 ` [dm-devel] [PATCH 2/2] multipathd: add recheck_wwid_time option to verify the path wwid Benjamin Marzinski
  0 siblings, 2 replies; 13+ messages in thread
From: Benjamin Marzinski @ 2021-02-09  5:19 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: device-mapper development, Chongyun Wu, Martin Wilck

This patchset adds a new config option, recheck_wwid_time, to help deal
with devices getting remapped. It's based on Chongyun's patch, but
instead of always checking if the LUN is remapped, users can set how
many seconds the LUN must be down before it gets rechecked, or disable
this checking entirely, since it is simply there to keep users from
shooting themselves in the foot.  Setting the value to 0 makes this
always recheck when a path is restored.

Unlike Chongyun's patch, it doesn't issue a remove uevent. I'm not
actually sure what the purpose of the remove uevent was, since it
doesn't cause the path to be removed, and multipath already removed it.
Instead, it works like Martin's uev_update_path code, and re-adds the
path after it removes it.  There is one issue I noticed here.  While
udev will update the WWID in the database when it gets a new uevent,
sysfs will still record the original WWID, so if multipathd ever fails
back to using sysfs for the WWID, it will see the wrong value.

Another possible check that I didn't include is this patchset is to have
multipath look at the LUN number whenever it adds a new path to a
multipath device. If the LUN number doesn't match the existing LUN
numbers, all the old paths should have their wwids checked as soon as
possible (immediately, if the path is up), since mismatching LUN numbers
is a red flag that something has gone wrong.

Benjamin Marzinski (2):
  libmultipath: fix use-after-free in uev_add_path
  multipathd: add recheck_wwid_time option to verify the path wwid

 libmultipath/config.c             |   1 +
 libmultipath/config.h             |   1 +
 libmultipath/configure.c          |   4 +-
 libmultipath/configure.h          |   2 +
 libmultipath/defaults.h           |   1 +
 libmultipath/dict.c               |  36 ++++++++++
 libmultipath/libmultipath.version |   6 ++
 libmultipath/structs.h            |  10 +++
 multipath/multipath.conf.5        |  18 +++++
 multipathd/cli_handlers.c         |   9 +++
 multipathd/main.c                 | 107 +++++++++++++++++++++++++++---
 multipathd/main.h                 |   2 +
 12 files changed, 187 insertions(+), 10 deletions(-)

-- 
2.17.2

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


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

end of thread, other threads:[~2021-02-27  6:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09  5:19 [dm-devel] [PATCH 0/2] Handle remapped LUNs better Benjamin Marzinski
2021-02-09  5:19 ` [dm-devel] [PATCH 1/2] libmultipath: fix use-after-free in uev_add_path Benjamin Marzinski
2021-02-09 20:57   ` Martin Wilck
2021-02-09  5:19 ` [dm-devel] [PATCH 2/2] multipathd: add recheck_wwid_time option to verify the path wwid Benjamin Marzinski
2021-02-09 22:19   ` Martin Wilck
2021-02-10 18:09     ` Benjamin Block
2021-02-10 19:57       ` Martin Wilck
2021-02-11 11:25       ` Benjamin Block
2021-02-11  4:48     ` Benjamin Marzinski
2021-02-11 12:14       ` Martin Wilck
2021-02-18  3:22         ` Chongyun Wu
2021-02-19 10:46           ` Martin Wilck
2021-02-27  6:02     ` Benjamin Marzinski

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).