]> git.ipfire.org Git - thirdparty/dracut-ng.git/commit
fix(multipath): include module with "find_multipaths strict"
authorMartin Wilck <mwilck@suse.com>
Tue, 16 Jul 2024 14:55:03 +0000 (16:55 +0200)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Wed, 17 Jul 2024 19:37:51 +0000 (15:37 -0400)
commit1e802f15fee3d6402d83e0efefef8bb88c5a33e3
tree5f72533581109cfe55f4a94443ee85b37e8f242b
parentef0972fe5349bdf6e821cb79a47cf412caf99059
fix(multipath): include module with "find_multipaths strict"

The previous commits 377d52c and 4957ffa excluded the multipath module in
non-hostonly mode, with the purpose of avoiding to start multipath in the
initramfs on systems that don't use multipath. This is against the idea of
non-hostonly, which is to build an initramfs with all kernel modules and tools
that may be necessary to bring up the system.

This patch takes a different approach. In non-hostonly mode, if there are no
multipath devices and no multipath.conf, include the multipath module, but
require "find_multipaths strict" policy. This will ensure that users that don't
use dm-multipath won't be surprised by finding their root device under
multipath control. But the multipath tools will still be included in the
initramfs, allowing users to set up multipathing e.g. on the emergency shell if
necessary. Also, if /etc/multipath/wwids exists, it will be included in the
initramfs and will cause the WWIDs listed in that file to be multipathed.

Note that in multipath-tools upstream and many Linux distributions,
"find_multipaths strict" is the default anyway. Users of distributions with
different defaults (e.g. openSUSE) would just need to create
/etc/multipath.conf (possibly with empty contents) to override this behavior if
they intend to activate multipath in the initramfs.

Fixes: 377d52c ("fix(multipath): omit module if included with no multipath devices")
Fixes: 4957ffa ("fix(multipath): omit module if included with no multipath devices")
modules.d/90multipath/module-setup.sh