On Sat, 14 Apr 2018 00:00:12 +0200 Martin Wilck <mwilck@xxxxxxxx> wrote: > Setting SYSTEMD_READY=0 on a device that has previously been passed to > systemd is dangerous - already mounted file systems might be > unmounted by systemd. > > Avoid that by checking for previously set DM_MULTIPATH_DEVICE_PATH > environment variable. > > This requires to change the exit status of multipath -u - it needs to > exit with status 0 even if the path is not a multipath device path, > otherwise udev doesn't import the printed key-value pairs. We do this > only for "multipath -u"; legacy "multipath -c", which is more likely > to be run in user scripts, still exits with 1 for non-multipath > devices. > > The condition ENV{DM_MULTIPATH_DEVICE_PATH}!="1" before the > "multipath -u" statement in multipath.rules needs to be removed. This > condition was pointless anyway, because until this patch, > DM_MULTIPATH_DEVICE_PATH hadn't been imported from the db and thus > was never set, and "multipath -u" was always invoked. We want to keep > this behavior. > > Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> > --- > multipath/main.c | 46 > +++++++++++++++++++++++++++++++++++++++++++++- > multipath/multipath.rules | 5 ++++- 2 files changed, 49 > insertions(+), 2 deletions(-) > Reviewed-by: Hannes Reinecke <hare@xxxxxxxx> Cheers, Hannes -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel