[Bug 1561103] [NEW] Multipath assigned user_friendly_names during initramfs

Launchpad Bug Tracker 1561103 at bugs.launchpad.net
Wed Mar 23 17:08:47 UTC 2016


You have been subscribed to a public bug:

== 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-multipath,post-multipath:

Skip the 2 breakpoints in scripts/init-top/multipath.

    ...
    (initramfs) exit
    ...
    (initramfs) exit
    starting version 229
    ...

Skip the 1st breakpoint in scripts/local-top/multipath.

    (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_friendly_names.

That is enabled, but there are no names defined in /etc/multipath/bindings,
so 'multipath -B' will not use user_friendly_names.

    (initramfs) multipath -l -v1
    36005076303ffd2a40000000000000349
    36005076303ffd2a40000000000000348
    36005076303ffd2a40000000000000347
    36005076303ffd2a40000000000000346

    (initramfs) grep user_friendly_names /etc/multipath.conf
        user_friendly_names    yes


    (initramfs) cat /etc/multipath/bindings
    # 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/local-bottom/multipath:

    (initramfs) exit
    done.
    Begin: Running /scripts/local-premount ... Begin: Waiting for udev to settle (multipath) ... done.
    done.
    ...
    Begin: Running /scripts/local-bottom ... Spawning shell within the initramfs
    ...

And now we've got user_friendly_names:

    (initramfs) multipath -l -v1
    mpathd
    mpathc
    mpathb
    mpatha

That's because the multipath call in /scripts/local-premount/multipath
has no -B option.

    (initramfs) grep multipath /scripts/local-premount/multipath 
    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/bindings, 
which is not desired for the initramfs (may conflict w/ the rootfs's file).

    (initramfs) cat /etc/multipath/bindings 
    # 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 36005076303ffd2a40000000000000346
    mpathb 36005076303ffd2a40000000000000347
    mpathc 36005076303ffd2a40000000000000348
    mpathd 36005076303ffd2a40000000000000349
    (initramfs)


--- Solution verification ---

On another boot, appending -B on that multipath command, things work
fine:

    (initramfs) sed -i '/multipath -r/ s/$/ -B/' /scripts/local-
premount/multipath

    (initramfs) grep multipath /scripts/local-premount/multipath
    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/local-bottom ... Spawning shell within the initramfs
    ...

    (initramfs) multipath -l -v1
    36005076303ffd2a40000000000000349
    36005076303ffd2a40000000000000348
    36005076303ffd2a40000000000000347
    36005076303ffd2a40000000000000346

    (initramfs) cat /etc/multipath/bindings
    # 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: multipath-tools (Ubuntu)
     Importance: Undecided
     Assignee: Taco Screen team (taco-screen-team)
         Status: New


** Tags: architecture-ppc64le bugnameltc-139569 severity-critical targetmilestone-inin1604
-- 
Multipath assigned user_friendly_names during initramfs
https://bugs.launchpad.net/bugs/1561103
You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to multipath-tools in Ubuntu.



More information about the Ubuntu-server-bugs mailing list