[dm-devel] Selectively start multipathd

Sergio Durigan Junior sergio.durigan at canonical.com
Sat Sep 16 18:12:29 UTC 2023


Hello,

I have been working on this proof of concept to see if it's feasible to
start multipathd only on situations where there is actually a multipath
device present in the system.

The motivation behind this investigation is the fact that, in Ubuntu
(and Debian), we're always starting multipathd irrespective of whether
there's a multipath device to be acted upon.  This is OK when the user
needs the service, but can become problematic if we're dealing with
e.g. a limited-resource system like a Raspberry Pi.

My initial (and somewhat naïve) plan was to use systemd and do something
like ConditionPathExistsGlob to check if there's an "mpathX" device
present, but obviously this is not possible because the device name can
be easily changed.

I'm now thinking whether it is possible to implement some udev rule for
that.  Maybe extend the existing 60-multipath.rules file, even though it
seems to be executed when the device is not yet ready (as is suggested
by the "ENV{SYSTEMD_READY}=0" sections).

My multipath-fu is lacking a bit as can be seen above, so I would really
appreciate some expert advice/opinion here.  I tried finding related
discussions in the mailing list but couldn't see anything promising
there.

Thank you,

-- 
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0  EB2F 106D A1C8 C3CB BF14



More information about the dm-devel mailing list