Skip to content

Handle remapped LUNs better

Benjamin Marzinski dm-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesIn review
  2. v12 patches 10 repliesSuperseded

Changes in v2 from the cover letter

0001: New patch to cleanup trailing whitespace stripping, as suggested
by Martin
0002: New patch to simplify the uid_attribute checking code 0003: Numerous changes based on Martin's review.
- The option is now simply on or off instead of having a time limit, since the overhead of checking the vpd page isn't too high.
- The option can now be set in the devices section as well.
- handle_path_wwid_change() consistently uses a constant for the strings.
- handle_path_wwid_change() grabs a reference to the udev device and then removes the path first, before triggering the uevent.
- handle_path_wwid_change() and uev_update_path() now trigger a rescan of the path device, when the wwid has changed, to update the sysfs info.
- the code now determines if it is safe to recheck the wwid the same way it does for the uid fallback code.
- When I was retesting I couldn't trigger add uevents on paths being remapped. I suspect I never could, and was accidentally looking at the add uevents for the new LUN that was mapped to the old LUN id, instead of seeing add event when the old LUN was remapped to a new LUN id. This means that the uev_add_path() code is unnecessary, as Martin suspected. It's been removed.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3libmultipath: cleanup code to strip wwid trailing spaceslibmultipath/discovery.c+4 -71 reply
2/3libmultipath: cleanup uid_attribute checking codelibmultipath/discovery.c+8 -91 reply
3/3multipathd: add recheck_wwid option to verify the path wwidlibmultipath/config.c libmultipath/config.h libmultipath/configure.c +13 more+164 -43 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMartin Wilck
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [dm-devel] [PATCH v2 0/3] Handle remapped LUNs better

This patchset adds a new config option, recheck_wwid, to help deal with devices getting remapped. It's based on Chongyun's patch. 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. To deal with this, the code also triggers a rescan of the device.

Changes from v1:
0001: New patch to cleanup trailing whitespace stripping, as suggested
by Martin
0002: New patch to simplify the uid_attribute checking code 0003: Numerous changes based on Martin's review.
- The option is now simply on or off instead of having a time limit, since the overhead of checking the vpd page isn't too high.
- The option can now be set in the devices section as well.
- handle_path_wwid_change() consistently uses a constant for the strings.
- handle_path_wwid_change() grabs a reference to the udev device and then removes the path first, before triggering the uevent.
- handle_path_wwid_change() and uev_update_path() now trigger a rescan of the path device, when the wwid has changed, to update the sysfs info.
- the code now determines if it is safe to recheck the wwid the same way it does for the uid fallback code.
- When I was retesting I couldn't trigger add uevents on paths being remapped. I suspect I never could, and was accidentally looking at the add uevents for the new LUN that was mapped to the old LUN id, instead of seeing add event when the old LUN was remapped to a new LUN id. This means that the uev_add_path() code is unnecessary, as Martin suspected. It's been removed.

Benjamin Marzinski (3):
libmultipath: cleanup code to strip wwid trailing spaces
libmultipath: cleanup uid_attribute checking code
multipathd: add recheck_wwid option to verify the path wwid

 libmultipath/config.c             |  2 +
 libmultipath/config.h             |  2 +
 libmultipath/configure.c          |  4 +-
 libmultipath/configure.h          |  2 +
 libmultipath/defaults.h           |  1 +
 libmultipath/dict.c               | 11 +++++
 libmultipath/discovery.c          | 35 +++++++-------
 libmultipath/discovery.h          |  1 +
 libmultipath/libmultipath.version |  6 +++
 libmultipath/propsel.c            | 21 +++++++++
 libmultipath/propsel.h            |  1 +
 libmultipath/structs.h            |  7 +++
 multipath/multipath.conf.5        | 14 ++++++
 multipathd/cli_handlers.c         |  9 ++++
 multipathd/main.c                 | 78 +++++++++++++++++++++++++++++++
 multipathd/main.h                 |  2 +
 16 files changed, 176 insertions(+), 20 deletions(-)
Signature · 6 lines
2.17.2

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel