[Bug 1432062] Re: multipath-tools-boot: support booting without user_friendly_names on devices with spaces in identifiers

Mauricio Faria de Oliveira mauricfo at linux.vnet.ibm.com
Fri Feb 5 12:16:51 UTC 2016


Marking as verification-done.

Details:
-------

qemu-kvm guest w/ rootfs on multipath

	# mount | grep ' / '
	/dev/mapper/mauricfo4--vg-root on / type ext4 (rw,errors=remount-ro)

	# lvm pvdisplay | grep Name
	  PV Name               /dev/mapper/mpath0-part3
	  VG Name               mauricfo4-vg

the disk WWID contains spaces

	# multipath -l
	mpath0 (0QEMU    QEMU HARDDISK   trustyroot) dm-0 QEMU    ,QEMU HARDDISK   
	size=32G features='0' hwhandler='0' wp=rw
	|-+- policy='round-robin 0' prio=-1 status=active
	| `- 0:0:0:0 sda 8:0  active undef running
	`-+- policy='round-robin 0' prio=-1 status=enabled
	  `- 0:0:1:0 sdb 8:16 active undef running

install new version

        # apt-get install multipath-tools-boot=0.4.9-3ubuntu7.8

	# dpkg -s kpartx | grep Version
	Version: 0.4.9-3ubuntu7.8

remove multipath configuration (user_friendly_names, bindings, wwids)
from rootfs and initramfs

        # rm -rf /etc/multipath*

	# mount /boot
	# update-initramfs -u
	update-initramfs: Generating /boot/initrd.img-4.2.0-27-generic

verify

	# reboot
	...
	Loading, please wait...
	[    0.482143] systemd-udevd[92]: starting version 204
	Begin: Loading essential drivers ... done.
	Begin: Running /scripts/init-premount ... done.
	Begin: Mounting root file system ... Begin: Running /scripts/local-top ... Begin: Loading multipath modules ... 
	[    0.546011] device-mapper: multipath: version 1.9.0 loaded
	Success: loaded module dm-multipath.
	Failure: failed to load module dm-emc.
	done.
	Begin: Starting multipathd ... [    0.558504] multipathd (125): /proc/125/oom_adj is deprecated, please use /proc/125/oom_score_adj instead.
	[    0.571510] device-mapper: multipath round-robin: version 1.0.0 loaded
	[    0.661820] random: lvm urandom read with 60 bits of entropy available
	[    0.910243] random: nonblocking pool is initialized
	done.
	Begin: Running /scripts/local-premount ... Begin: Waiting for udev to settle (multipath) ... done.
	done.
	[    1.122520] EXT4-fs (dm-4): mounted filesystem with ordered data mode. Opts: (null)
	Begin: Running /scripts/local-bottom ... Begin: Stopping multipathd ... done.
	done.
	done.
	Begin: Running /scripts/init-bottom ... done.
	[    1.211793] init: plymouth-upstart-bridge main process (339) terminated with status 1
	[    1.211889] init: plymouth-upstart-bridge main process ended, respawning
	[    1.230100] init: plymouth-upstart-bridge main process (350) terminated with status 1
	[    1.230199] init: plymouth-upstart-bridge main process ended, respawning
	[    1.415024] Adding 1417152k swap on /dev/mapper/mauricfo4--vg-swap_1.  Priority:-1 extents:1 across:1417152k FS
	[    1.417519] EXT4-fs (dm-4): re-mounted. Opts: errors=remount-ro

Great, the rootfs is found and mounted.

Notice this setup (LVM on multipath) hits LP #1540401, 
but non-LVM on multipath doesn't, as originally reported.

	The disk drive for /boot is not ready yet or not present.
	keys:Continue to wait, or Press S to skip mounting or M for manual recovery

        keys: S

And the system boots successfully:

	# mount | grep ' / '
	/dev/mapper/mauricfo4--vg-root on / type ext4 (rw,errors=remount-ro)

	# pvdisplay | grep Name
	  PV Name               /dev/HARDDISK
	  VG Name               mauricfo4-vg

	# multipath -l
	0QEMU    QEMU HARDDISK   trustyroot dm-0 QEMU    ,QEMU HARDDISK   
	size=32G features='0' hwhandler='0' wp=rw
	|-+- policy='round-robin 0' prio=-1 status=active
	| `- 0:0:0:0 sda 8:0  active undef running
	`-+- policy='round-robin 0' prio=-1 status=enabled
	  `- 0:0:1:0 sdb 8:16 active undef running

Notice the LVM PV senses the multiple symlinks problem
(due to the spaces in the WWIDs) but this can be fixed 
(if desired) on a later update,
and does not occur w/ user_friendly_names.

The system *is* bootable, and the device-mapper table is correct
(LVM stacked on multipath devices):

	root at mauricfo4:~# dmsetup table | sort
	0QEMU    QEMU HARDDISK   trustyroot: 0 67108864 multipath 0 0 2 1 round-robin 0 1 1 8:0 1000 round-robin 0 1 1 8:16 1000 
	0QEMU    QEMU HARDDISK   trustyroot-part1: 0 14336 linear 252:0 2048
	0QEMU    QEMU HARDDISK   trustyroot-part2: 0 499712 linear 252:0 16384
	0QEMU    QEMU HARDDISK   trustyroot-part3: 0 66590720 linear 252:0 516096
	mauricfo4--vg-root: 0 63750144 linear 252:3 2048
	mauricfo4--vg-swap_1: 0 2834432 linear 252:3 63752192

The boot problem is fixed.
Marking as verification-done.

** Tags removed: verification-needed
** Tags added: verification-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/1432062

Title:
  multipath-tools-boot: support booting without user_friendly_names on
  devices with spaces in identifiers

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

Bug description:
  [Impact]
  If a system is not installed w/ multipath support (i.e., no disk-detect/multipath/enable=true), the /etc/multipath.conf file is not installed.
  If an user later installs multipath-tools-boot, it will enable the udev rules for multipath support.
  Those rules don't handle disk devices w/ spaces on their names/uuids/models very well..

  That's because of udev's SYMLINK command using spaces to separate
  multiple links, and the kernel sysfs/dm informing \x20 instead, which
  is not correctly interpreted by some commands, resulting in file not
  found errors, for example.

  Thus, the system fails to boot.

  [Test case]
  Requires installing on a system where there are spaces in the name of the device make/model data; for instance, on POWER8 with IPR disks, or with QEMU.
  1) Install system with multipath support ('disk-detect/multipath/enable=true').
  2) Boot the system.
  3) Edit /etc/multipath.conf, remove "user_friendly_names yes" ; replace with "user_friendly_names no", or remove /etc/multipath.conf.
  4) Update the initramfs: sudo update-initramfs -u
  5) Reboot.

  [Regression potential]
  Minimal. Systems with names in the disk make/model data would not boot without user_friendly_names enabled. This patch will allow multipath-tools to correctly handle these devices in the case where friendly names are not enabled by using the devices major/minor numbers rather that its path.

  ----

  There's no problem, however, if user_friendly_names is enabled in
  multipath.conf (which is enabled in the default multipath.conf from
  the installer, if it has multipath enabled).

  Notice it's an acceptable case to install w/out multipath support, and
  enable it later for booting.

  Disk devices w/ spaces in naming is not common over SAN/storage systems, but that happens often for conventional disks; for example:
  - IBM IPR  ( IBM     IPR-0   5DB6F40000000080 )
  - IBM VDASD ( AIX     VDASD           00c96f0700004c000000014bb8e713f0.14 )
  - QEMU HARDDISK ( QEMU QEMU HARDDISK <serial> )

  So, please, is it possible to ship the default multipath.conf (e.g.,
  from installer) w/ multipath-tools-boot?

  For users not to their systems failing to boot after installing
  multipath-tools-boot manually, after a non-multipath install.

  Related bugs:
   * bug 1371634: block devices appear twice

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



More information about the foundations-bugs mailing list