[Bug 1473903] Re: parted will generate two devices when adding one partition on mpath device

Launchpad Bug Tracker 1473903 at bugs.launchpad.net
Mon Feb 15 23:15:28 UTC 2016


This bug was fixed in the package multipath-tools - 0.4.9-3ubuntu7.9

---------------
multipath-tools (0.4.9-3ubuntu7.9) trusty; urgency=medium

  * debian/patches/kpartx-support-device-names-with-spaces.patch: fix loopback
    files unmapping. (LP: #1543430)

multipath-tools (0.4.9-3ubuntu7.8) trusty; urgency=medium

  * debian/patches/kpartx-support-device-names-with-spaces.patch: deal with
    spaces in device names in kpartx too (LP: #1432062)
  * debian/initramfs/local-premount: wait for udev to settle before mounting
    so the by-uuid/ symlinks have a chance to be updated by udev rules.
    (LP: #1503286)
  * Allow device detection all through the initramfs: run multipathd instead
    of only scanning once for devices, so those that come up slower can still
    be used as a root device (LP: #1526984):
    - debian/patches/0050-readonly-bindings_prefix.patch,
      debian/patches/0051-readonly-bindings_multipath.patch,
      debian/patches/0052-readonly-bindings_multipathd.patch,
      debian/patches/0053-readonly-bindings_multipathd_prod.patch: support -B
      to allow multipathd to handle cases where the bindings file is read-only.
    - debian/initramfs/hooks: install multipathd and required directories.
    - debian/initramfs/local-premount: also reload all maps to make sure
      they're ready before we mount.
    - debian/initramfs/local-top: run multipathd rather than a one-off call to
      multipath so that new paths can be correctly added as detected while
      we're still in the initramfs.
    - debian/initramfs/local-bottom: remember to stop multipathd.
    - debian/initramfs/local-bottom, debian/rules: install local-bottom for
      initramfs.
  * debian/patches/lp1496210_add_IBM_XIV_defaults.patch: add support (default
    config values) for the IBM 2810XIV storage system. (LP: #1496210)
  * debian/patches/0054-kpartx-update-option.patch: run kpartx -u rather than
    kpartx -a, so as to remove old partition entries if the partition table
    has changed. (LP: #1473903)
  * debian/patches/multipath_enable_sync_support_1b8082c8.patch,
    debian/patches/kpartx_rely_on_udev_dev_creation_9a632fff.patch: synchronize
    udev, device-mapper and multipath, and let udev deal with creating device
    nodes and symlinks. (LP: #1486370)
  * debian/initramfs/local-top: drop scsi_wait_scan stanza, that module is no
    longer available. (LP: #1538775)

 -- Mathieu Trudel-Lapierre <mathieu-tl at ubuntu.com>  Tue, 09 Feb 2016
16:03:10 -0500

** Changed in: multipath-tools (Ubuntu Trusty)
       Status: Fix Committed => Fix Released

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

Title:
  parted will generate two devices when adding one partition on mpath
  device

Status in multipath-tools package in Ubuntu:
  Triaged
Status in parted package in Ubuntu:
  Triaged
Status in multipath-tools source package in Trusty:
  Fix Released
Status in parted source package in Trusty:
  Fix Committed

Bug description:
  [Impact]
  Admins who use parted to partition a multipath device after installation will find that more than one device may be generated for the same partition: one in the form XXXXpN, and one in the form XXXX-partN.

  [Test case]
  See below; use parted to partition a multipath device.

  [Regression Potential]
  Scripted tools which deal with the partitioning via parted and would depend on the devices from multipath being named "XXXXpN" will find that the device node is no longer available, since it was chosen to align with general udev rules for multipath coming from udev and multipath-tools, using the "XXXX-partN" form.

  ---

  Problem Description
  =============================
  Two deivce created when creating 1 partition on a mpath device:

  % sudo parted /dev/mapper/mpath2
  GNU Parted 2.3
  Using /dev/mapper/mpath2
  Welcome to GNU Parted! Type 'help' to view a list of commands.
  (parted) p
  Model: Linux device-mapper (multipath) (dm)
  Disk /dev/mapper/mpath2: 284GB
  Sector size (logical/physical): 512B/4096B
  Partition Table: msdos

  Number  Start  End  Size  Type  File system  Flags

  (parted) mkpart
  mkpart    mkpartfs
  (parted) mkpart
  Partition type?  primary/extended? primary
  File system type?  [ext2]?
  Start? 0%
  End? 10%
  Device /dev/mapper/mpath2p1 not found
  device-mapper: table ioctl on  failed: No such device or address
  Device /dev/mapper/mpath2p1 not found
  device-mapper: table ioctl on  failed: No such device or address
  (parted) p
  Model: Linux device-mapper (multipath) (dm)
  Disk /dev/mapper/mpath2: 284GB
  Sector size (logical/physical): 512B/4096B
  Partition Table: msdos

  Number  Start   End     Size    Type     File system  Flags
   1      1049kB  28.4GB  28.4GB  primary

  (parted) q
  Information: You may need to update /etc/fstab.

  % ls /dev/mapper/mpath2*
  /dev/mapper/mpath2  /dev/mapper/mpath2p1  /dev/mapper/mpath2-part1
  %

  Steps to Reproduce
  ===================================
  1. install ubuntu 14.04.3 on a system which has mpath device
  2. try to partition the mpath device, add one partition

  ---uname output---
  Linux dilllp1 3.19.0-22-generic #22~14.04.1-Ubuntu SMP Wed Jun 17 10:03:39 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux

  Userspace tool common name: parted
  Userspace rpm: parted, version: 2.3-19ubuntu1
  The userspace tool has the following bit modes: 64-bit

  == Comment: #2 - David Heller <hellerda at us.ibm.com> - 2015-07-09 20:16:11 ==
  Hi Ping,

  Are you sure that /dev/mapper/mpath2p1 device was not left over from
  install, and perhaps existed before you did the parted?  Remember
  there were some changes to multipath in the installer, and the
  installer now uses mpathXpX, and the running os uses mpathX-partX.. I
  think that is right?

  If the two devices truly were created in the same parted operation, if
  you can reproduce it, can you run "udevadm monitor -p" during the
  operation, and provide the output?  thx.

  == Comment: #3 - Ping Tian Han <pthan at cn.ibm.com> - 2015-07-09 22:03:53 ==
  (In reply to comment #2)
  > Hi Ping,
  >
  > Are you sure that /dev/mapper/mpath2p1 device was not left over from
  > install, and perhaps existed before you did the parted?  Remember there were
  Yes, I'm pretty sure the device wasn't left over from install:

  % ls /dev/mapper/mpath4*
  /dev/mapper/mpath4
  % sudo parted /dev/mapper/mpath4*
  GNU Parted 2.3
  Using /dev/mapper/mpath4
  Welcome to GNU Parted! Type 'help' to view a list of commands.
  (parted) p
  Error: /dev/mapper/mpath4: unrecognised disk label
  (parted) mklabel msdos
  (parted) p
  Model: Linux device-mapper (multipath) (dm)
  Disk /dev/mapper/mpath4: 284GB
  Sector size (logical/physical): 512B/4096B
  Partition Table: msdos

  Number  Start  End  Size  Type  File system  Flags

  (parted) mkpart 1
  parted: invalid token: 1
  Partition type?  primary/extended? primary
  File system type?  [ext2]?
  Start? 0%
  End? 10%
  Device /dev/mapper/mpath4p1 not found
  device-mapper: table ioctl on  failed: No such device or address
  Device /dev/mapper/mpath4p1 not found
  device-mapper: table ioctl on  failed: No such device or address
  (parted) p
  Model: Linux device-mapper (multipath) (dm)
  Disk /dev/mapper/mpath4: 284GB
  Sector size (logical/physical): 512B/4096B
  Partition Table: msdos

  Number  Start   End     Size    Type     File system  Flags
   1      1049kB  28.4GB  28.4GB  primary

  (parted) q
  Information: You may need to update /etc/fstab.

  % ls /dev/mapper/mpath4*
  /dev/mapper/mpath4  /dev/mapper/mpath4p1  /dev/mapper/mpath4-part1
  %
  > some changes to multipath in the installer, and the installer now uses
  > mpathXpX, and the running os uses mpathX-partX.. I think that is right?
  >
  > If the two devices truly were created in the same parted operation, if you
  > can reproduce it, can you run "udevadm monitor -p" during the operation, and
  > provide the output?  thx.
  No problem, I'll upload the result.

  == Comment: #5 - Ping Tian Han <pthan at cn.ibm.com> - 2015-07-09 22:09:59 ==
  (In reply to comment #4)
  > Created attachment 100079 [details]
  > udevadm monitor -p outputs when bug reproduced

  This is the outputs when creating mpath4-part2.

  == Comment: #6 - Vaishnavi Bhat <vaish123 at in.ibm.com> - 2015-07-10 11:08:42 ==
  Hi Ping Tian Han,

  Can you please try to install the latest parted package from
  http://ftp.gnu.org/gnu/parted/ and check if the issue is reproduced ?

  Thank you.

  == Comment: #7 - Ping Tian Han <pthan at cn.ibm.com> - 2015-07-12 22:05:17 ==
  (In reply to comment #6)
  > Hi Ping Tian Han,
  >
  > Can you please try to install the latest parted package from
  > http://ftp.gnu.org/gnu/parted/ and check if the issue is reproduced ?
  >
  > Thank you.

  The latest 3.2 version doesn't have this problem on dilllp1.

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



More information about the foundations-bugs mailing list