Message ID | 20241022233349.247087-1-bmarzins@redhat.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | Benjamin Marzinski |
Headers | show |
Series | [RFC] 11-dm-mpath.rules: Disable blkid runs when updating the device | expand |
On Tue, 2024-10-22 at 19:33 -0400, Benjamin Marzinski wrote: > When multipath reloads a device or fails or restores a path, the udev > rules disable LVM scanning, but since .DM_NOSCAN isn't set, blkid is > still run on the device. When multipath devices that are set to > queue_if_no_path lose all their paths at close to the same time, udev > workers can hang trying to run blkid. The blkid results shouldn't > change when multipathd is adding, removing, failing or reinstating > paths, aside from avoiding hanging udev processes, we're skipping > unnecessary work. > > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> > --- > multipath/11-dm-mpath.rules.in | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) This is correct. It conflicts with my own late udev rule patch set. While your patch was sent first, I believe it makes more sense to apply this change after mine. I'll to send a v2 with the .DM_NOSCAN logic improved. Regards Martin
diff --git a/multipath/11-dm-mpath.rules.in b/multipath/11-dm-mpath.rules.in index 30647b99..6a76a348 100644 --- a/multipath/11-dm-mpath.rules.in +++ b/multipath/11-dm-mpath.rules.in @@ -80,12 +80,12 @@ ENV{DM_COLDPLUG_SUSPENDED}=="1", ENV{.DM_SUSPENDED}!="1", \ # It's exactly mpath's job to provide *seamless* device access to any of the # paths that are available underneath. ENV{DM_SUBSYSTEM_UDEV_FLAG0}=="1", \ - ENV{DM_ACTIVATION}="0", ENV{MPATH_UNCHANGED}="1" + ENV{DM_ACTIVATION}="0", ENV{.DM_NOSCAN}="1", ENV{MPATH_UNCHANGED}="1" # For path failed or reinstated events, unset DM_ACTIVATION. # This is similar to the DM_SUBSYSTEM_UDEV_FLAG0 case above. ENV{DM_ACTION}=="PATH_FAILED|PATH_REINSTATED", \ - ENV{DM_ACTIVATION}="0", ENV{MPATH_UNCHANGED}="1" + ENV{DM_ACTIVATION}="0", ENV{.DM_NOSCAN}="1", ENV{MPATH_UNCHANGED}="1" LABEL="check_mpath_ready" @@ -113,7 +113,7 @@ LABEL="mpath_is_ready" ENV{.MPATH_DEVICE_READY_OLD}!="0", GOTO="scan_import" ENV{.DM_SUSPENDED}=="1", ENV{MPATH_DEVICE_READY}="0", GOTO="scan_import" -ENV{DM_ACTIVATION}="1", ENV{MPATH_UNCHANGED}="0" +ENV{DM_ACTIVATION}="1", ENV{.DM_NOSCAN}="0", ENV{MPATH_UNCHANGED}="0" # The code to check multipath state ends here. We need to set # properties and symlinks regardless whether the map is usable or
When multipath reloads a device or fails or restores a path, the udev rules disable LVM scanning, but since .DM_NOSCAN isn't set, blkid is still run on the device. When multipath devices that are set to queue_if_no_path lose all their paths at close to the same time, udev workers can hang trying to run blkid. The blkid results shouldn't change when multipathd is adding, removing, failing or reinstating paths, aside from avoiding hanging udev processes, we're skipping unnecessary work. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> --- multipath/11-dm-mpath.rules.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)