Multipath assigned user_friendly_names during initramfs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
multipath-tools (Ubuntu) |
Fix Released
|
High
|
Taco Screen team |
Bug Description
== Comment: #0 - Mauricio Faria De Oliveira - 2016-03-23 10:40:56 ==
---Problem Description---
Multipath assigned user_friendly_names during initramfs
In the initramfs, there's one call to multipath which has no -B argument (local-premount).
It assigns new/different user_friendly_names to devices which might differ from that in the rootfs.
The names should not be assigned during initramfs time, and dealt w/ during rootfs time, then updated to initramfs accordingly.
--- Steps to Reproduce ---
Boot with break=pre-
Skip the 2 breakpoints in scripts/
...
(initramfs) exit
...
(initramfs) exit
starting version 229
...
Skip the 1st breakpoint in scripts/
(initramfs) exit
Begin: Loading multipath modules ... Success: loaded module dm-multipath.
Failure: failed to load module dm-emc.
done.
Begin: Starting multipathd ... Spawning shell within the initramfs
...
The multipath device names are not-user_
That is enabled, but there are no names defined in /etc/multipath/
so 'multipath -B' will not use user_friendly_
(initramfs) multipath -l -v1
36005076303
36005076303
36005076303
36005076303
(initramfs) grep user_friendly_names /etc/multipath.conf
(initramfs) cat /etc/multipath/
# Multipath bindings, Version : 1.0
# NOTE: this file is automatically maintained by the multipath program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# alias wwid
#
(initramfs)
Skip until the 1st breakpoint in /scripts/
(initramfs) exit
done.
Begin: Running /scripts/
done.
...
Begin: Running /scripts/
...
And now we've got user_friendly_
(initramfs) multipath -l -v1
mpathd
mpathc
mpathb
mpatha
That's because the multipath call in /scripts/
(initramfs) grep multipath /scripts/
if [ -x /sbin/multipath ]
[ "$quiet" != "y" ] && log_begin_msg "Waiting for udev to settle (multipath)"
multipath -r -v0
And it changed the contents of /etc/multipath/
which is not desired for the initramfs (may conflict w/ the rootfs's file).
(initramfs) cat /etc/multipath/
# Multipath bindings, Version : 1.0
# NOTE: this file is automatically maintained by the multipath program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# alias wwid
#
mpatha 36005076303ffd2
mpathb 36005076303ffd2
mpathc 36005076303ffd2
mpathd 36005076303ffd2
(initramfs)
--- Solution verification ---
On another boot, appending -B on that multipath command, things work fine:
(initramfs) sed -i '/multipath -r/ s/$/ -B/' /scripts/
(initramfs) grep multipath /scripts/
if [ -x /sbin/multipath ]
[ "$quiet" != "y" ] && log_begin_msg "Waiting for udev to settle (multipath)"
multipath -r -v0 -B
(initramfs) exit # a few times until
...
Begin: Running /scripts/
...
(initramfs) multipath -l -v1
36005076303
36005076303
36005076303
36005076303
(initramfs) cat /etc/multipath/
# Multipath bindings, Version : 1.0
# NOTE: this file is automatically maintained by the multipath program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# alias wwid
#
(initramfs)
== Comment: #3 - Mauricio Faria De Oliveira - 2016-03-23 10:43:24 ==
Hi @taco-screen-team,
@mathieu-tl is the suggested contact for this bug (multipath bugs et al.)
Thanks
affects: | ubuntu → multipath-tools (Ubuntu) |
Changed in multipath-tools (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Default Comment by Bridge