[Bug 1561103] multipath-tools_multipath-B.debdiff

bugproxy bugproxy at us.ibm.com
Wed Mar 23 17:21:30 UTC 2016


Default Comment by Bridge

** Attachment added: "multipath-tools_multipath-B.debdiff"
   https://bugs.launchpad.net/bugs/1561103/+attachment/4608823/+files/multipath-tools_mpath-B.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to multipath-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1561103

Title:
  Multipath assigned user_friendly_names during initramfs

Status in multipath-tools package in Ubuntu:
  New

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-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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1561103/+subscriptions



More information about the foundations-bugs mailing list