Currently, whenever getting the uid_attribute from the udev database
fails, multipath will try to get it from the environment variables. This
normally isn't a problem, since either multipath -u is getting called
from a uevent and the environment will have the correct value in that
variable, or something else is being run and that variable won't be set.
However, when find_multipaths is configured to "smart", this causes
problems. For maybe devices, multipath needs to get the WWIDs of all the
other block devices, to see if they match the maybe device wwid. If one
of those devices doesn't have uid_attribute set in its udev database,
multipath will fall back to checking the environment for it, and it will
find that variable set to the WWID of the maybe device that this uevent
is for. This means that all devices with no WWID will end up appearing
to have the same WWID as the maybe device, causing multipath to
incorrectly claim it.
(cherry picked from commit 07e08e42400b8c37b2dacdc63e8ea4c737cc11b3)
"multipath -t" and "multipath -T" might show the wrong
multipathd configuration items "retrigger_tries" and
"force_sync". Make sure they don't.
(cherry picked from commit df7cdf4f6eba3ba27093a67bad278a9ec173899f)
This aligns the description of prio_args for path_latency prio and
the actual code.
(cherry picked from commit a91d47c1e822753fe9d07b469c16ec55f39929cb)
This aligns 'multipathd' socket and service units, by adding the
start conditions that are set on the service but not on the socket.
It should help avoiding situations where the socket unit ends up
marked as failed after hitting its retry-limit.
(cherry picked from commit d51e66c57b798f4f22bde28d72f4c11afd474f7e)
backport two patches from community.
1. libmultipath: use directio checker for LIO target
2. multipathd: make pr registration consistent
Signed-off-by: liubo <liubo254@huawei.com>
and multipathd. It may cause command multipathd and mpathpersist
execute error.
Signed-off-by: gqmiao <miaoguanqin@huawei.com>
(cherry picked from commit 1945932368cc168091982f81e46d1a3e00dc8b65)
/dev/shm may have unsafe permissions. Use /run instead.
Use systemd's tmpfiles.d mechanism to create /run/multipath
early during boot.
For backward compatibilty, make the runtime directory configurable
via the "runtimedir" make variable.
Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
(cherry picked from commit ece61bee4ca9432cc712ea832637d39118074750)
We must set the return value in configure().
Signed-off-by: xueyamao <xueyamao@kylinos.cn>
(cherry picked from commit d3b45029abc80a0eabd77b760a254f24a95e76fd)
When "multipath -f" is run on a device that doesn't exist or isn't a
multipath device, the command will not remove any device, but it will
still return success.
Signed-off-by: xueyamao <xueyamao@kylinos.cn>
(cherry picked from commit b68fc8b7d9312d204b04cf1af290f50dd6a425fa)