[Bug 1556967] Comment bridged from LTC Bugzilla

bugproxy bugproxy at us.ibm.com
Mon Mar 14 22:18:07 UTC 2016


------- Comment From mauricfo at br.ibm.com 2016-03-14 18:08 EDT-------
(In reply to comment #6)
> I've triaged this bug, but it's quite very late in the cycle to ship new
> features, especially one such as this one which appears to be mostly just a
> convenient way of adding WWIDs to the multipath list.

Interestingly I forgot the point in time we are currently.

Yes, indeed, it's just a convenient way of adding WWIDs, however, its
importance lies if Ubuntu wants to enable its users to install
multipath-tools-boot (say, in a LVM/multipath scenario) to boot from
multipath.

If the root fs is locked due to a LVM volume, it cannot be multipathed, thus its WWID won't be added to the list.
During boot, the only chance for the LVM volume to be mounted from the multipath device is if the WWID is present (so the udev rule which removes the partition block devices from individual paths can succeed).

So it's now a chicken and egg problem. You need to boot from multipath
in order to be able to multipath the device with the root fs LVM LV. :-)

With multipath -a, you can just install multipath-tools-boot, multipath -a /dev/sdX, update-initramfs -u; done.
Without it, well, you can replace multipath -a for some multipath -v3 /dev/sdX | grep 'uid =' | sed/awk >> /etc/multipath/wwids.. but you see, it doesn't look quite 'this is how it should be done'.

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

Title:
  Support 'multipath -a'

Status in multipath-tools package in Ubuntu:
  Triaged

Bug description:
  == Comment: #0 - Mauricio Faria De Oliveira <mauricfo at br.ibm.com> - 2016-03-14 09:39:20 ==
  Support 'multipath -a' to facilitate post-install migration to multipath environment.

  The attached patch adds 2 upstream commits to support 'multipath -a'.

  Verification:
  --------------

  The new '-a' option:

      # multipath -h 2>&1 | grep -- -a
        multipath [-a|-c|-w|-W] [-d] [-r] [-v lvl] [-p pol] [-b fil] [-q] [dev]
        -a      add a device wwid to the wwids file

  If the device's wwid is not on the wwids file, it's not multipathed:

      # grep -v '^#' /etc/multipath/wwids
      /0QEMU_QEMU_HARDDISK_xenialroot/

      # multipath -v3 | grep wwid
      Mar 14 10:23:10 | wwid 0QEMU_QEMU_HARDDISK_xenialother not in wwids file, skipping sdc

  Now, 'multipath -a' adds it to the wwids file:

      # multipath -a /dev/sdc
      wwid '0QEMU_QEMU_HARDDISK_xenialother' added

      # grep -v '^#' /etc/multipath/wwids 
      /0QEMU_QEMU_HARDDISK_xenialroot/
      /0QEMU_QEMU_HARDDISK_xenialother/

  And it is successfully multipathed:

      # multipath -v3 | grep wwid
      Mar 14 10:24:14 | found wwid 0QEMU_QEMU_HARDDISK_xenialother in wwids file, multipathing sdc
      Mar 14 10:24:14 | Found matching wwid [0QEMU_QEMU_HARDDISK_xenialother] in bindings file. Setting alias to mpathb

  By the way, it works even if the device is locked by a LVM member
  (which doesn't if you try just 'multipath <device>').
  This helps a lot on LVM/multipath scenarios, which had boot issues:

      # dmsetup table | grep VG
      VGsdc-LVsdc: 0 8388608 linear 8:32 2048

      # ls -l /dev/sdc
      brw-rw---- 1 root disk 8, 32 Mar 14 10:28 /dev/sdc

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



More information about the foundations-bugs mailing list