Skip to contentSkip to conversation

Selectively start multipathd

dm-devel Sergio Durigan Junior 1 participant 1 message Sep 16, 2023 Device mapper

lore
Share & tools
lore
#0 lore raw

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,

Signature · 7 lines
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0  EB2F 106D A1C8 C3CB BF14

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