multipath-tools-boot: support booting without user_friendly_names on devices with spaces in identifiers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
multipath-tools (Ubuntu) |
Fix Released
|
Medium
|
Mathieu Trudel-Lapierre | ||
Trusty |
Fix Released
|
Medium
|
Mathieu Trudel-Lapierre |
Bug Description
[Impact]
If a system is not installed w/ multipath support (i.e., no disk-detect/
If an user later installs multipath-
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-
2) Boot the system.
3) Edit /etc/multipath.
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 00c96f0700004c0
- QEMU HARDDISK ( QEMU QEMU HARDDISK <serial> )
So, please, is it possible to ship the default multipath.conf (e.g., from installer) w/ multipath-
For users not to their systems failing to boot after installing multipath-
Related bugs:
* bug 1371634: block devices appear twice
* bug 1551937: lvm and multipath and xenial not happy together
* bug 1429327: Boot from a unique, stable, multipath-dependent symlink
description: | updated |
tags: | added: targetmilestone-inin1404 targetmilestone-inin1504 |
Changed in multipath-tools (Ubuntu Trusty): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Mathieu Trudel-Lapierre (mathieu-tl) |
description: | updated |
description: | updated |
BTW, I have prototype patches to fix the spacing issue in udev rules
(pathes for kpartx.rules, multipath.rules, and kpartx_id IIRC)
But I guess that at this point of the schedule it'd be safer to go w/ shipping a default thing which could have been installed, rather than changing stuff at the udev rules level.
The problem seems to emerge from the general dm.rules, which on recent kernels will set DM_NAME as the mangled name which is obtained from sysfs/.../dm/name, but some Debian-specific thing related to dmsetup not exporting variables correctly will re-set DM_NAME to a non-mangled name.. this is leading to problem in the rest of that rules file.. Also, kpartx_id IIRC-2 gets a non-mangled name, in variable dmname IIRC-3.)
I can provide those patches if you're interested in taking a look.