Skip to content

Commit 1d7464c

Browse files
bmarzinsConan-Kudo
authored andcommitted
fix(multipath): disable user_friendly_names with mpathconf
If dracut is creating /etc/multipath.conf by calling mpathconf in either multipathd-configure.service or multipathd.sh, there is a chance that the multipath config in the real root differs. Specifically, it might have chosen different user_friendly_names for the devices. When the systems switches to the real root, multipath may not be able to switch the devices to their configured names because those might already be in use. To avoid this, call mpathconf with "--user_friendly_names n" to create a multipath.conf with user_friendly_names disabled. If all devices use WWID names, it is always possible for multipath to rename them later. Fixes b8a92b7 ("multipath: add automatic configuration for multipath")
1 parent f344157 commit 1d7464c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

modules.d/90multipath/multipathd-configure.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Type=oneshot
1515
RemainAfterExit=yes
1616
# mpathconf requires /etc/multipath to already exist
1717
ExecStartPre=-/usr/bin/mkdir -p /etc/multipath
18-
ExecStart=/usr/sbin/mpathconf --enable
18+
ExecStart=/usr/sbin/mpathconf --enable --user_friendly_names n
1919

2020
[Install]
2121
WantedBy=sysinit.target

modules.d/90multipath/multipathd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ command -v getarg > /dev/null || . /lib/dracut-lib.sh
55
if [ "$(getarg rd.multipath)" = "default" ] && [ ! -e /etc/multipath.conf ]; then
66
# mpathconf requires /etc/multipath to already exist
77
mkdir -p /etc/multipath
8-
mpathconf --enable
8+
mpathconf --enable --user_friendly_names n
99
fi
1010

1111
if getargbool 1 rd.multipath && [ -e /etc/multipath.conf ]; then

0 commit comments

Comments
 (0)