multipathd fails to create mappings when multipath.conf is present
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
multipath-tools (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I have a SAN connected via a dual-port HBA that I'm trying to get to work with multipath.
I'm running 12.04.2 installed via netboot (clean install).
Setup options: partitioning=guided with LVM (onto internal DRAC 6/i RAID) packages=Basic server,
Out of the box things work okay:
root@PE2950:~# multipath -ll
3600c0ff000d5ae
size=1.4T features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 3:0:0:1 sdb 8:16 active ready running
`- 4:0:1:1 sdc 8:32 active ready running
mappings are created:
root@PE2950:~# ll /dev/mapper/
total 0
drwxr-xr-x 2 root root 140 maj 10 16:57 ./
drwxr-xr-x 16 root root 4460 maj 10 16:57 ../
brw-rw---- 1 root disk 252, 2 maj 10 16:57 360022190ba84f8
lrwxrwxrwx 1 root root 7 maj 10 16:57 3600c0ff000d5ae
crw------- 1 root root 10, 236 maj 9 23:13 control
lrwxrwxrwx 1 root root 7 maj 9 23:14 PE2950-root -> ../dm-1
lrwxrwxrwx 1 root root 7 maj 9 23:14 PE2950-swap -> ../dm-0
Then I created /etc/multipath.conf with following contents (mostly copied from running multipathd config):
multipath.conf:
------------------
defaults {
verbosity 2
}
blacklist {
devnode "^(ram|
devnode "^hd[a-z]"
devnode "^dcssblk[0-9]*"
devnode "^cciss!
device {
}
device {
}
device {
}
device {
}
device {
}
device {
}
}
blacklist_
}
devices {
device {
}
}
multipaths {
}
(point is in trying to turn off the feature 'queue_if_no_path')
root@PE2950:~# ll /etc/multipath.conf
-rw-r--r-- 1 root root 0 maj 10 17:14 /etc/multipath.conf
Have to reboot:
root@PE2950:~$ reboot
Things get ugly - no more mappings:
root@PE2950:~# multipath -ll
root@PE2950:~#
root@PE2950:~# ls -la /dev/mapper/
total 0
drwxr-xr-x 2 root root 100 maj 10 17:23 .
drwxr-xr-x 16 root root 4420 maj 10 17:23 ..
crw------- 1 root root 10, 236 maj 10 17:22 control
lrwxrwxrwx 1 root root 7 maj 10 17:22 PE2950-root -> ../dm-1
lrwxrwxrwx 1 root root 7 maj 10 17:22 PE2950-swap -> ../dm-0
syslog:
--snip--
May 10 17:23:33 PE2950 udevd[380]: '/lib/udev/
May 10 17:23:33 PE2950 udevd[380]: '/lib/udev/
May 10 17:23:33 PE2950 scsi_id[1156]: custom logging function 0x7f93cbe8d010 registered
May 10 17:23:33 PE2950 udevd[380]: '/lib/udev/
May 10 17:23:33 PE2950 udevd[380]: '/lib/udev/
May 10 17:23:33 PE2950 udevd[380]: '/lib/udev/
May 10 17:23:33 PE2950 udevd[380]: '/lib/udev/
--snip--
May 10 17:23:33 PE2950 kernel: [ 90.706237] device-mapper: multipath round-robin: version 1.0.0 loaded
May 10 17:23:33 PE2950 kernel: [ 90.706403] device-mapper: table: 252:2: multipath: not enough path parameters
May 10 17:23:33 PE2950 kernel: [ 90.706405] device-mapper: ioctl: error adding target to table
--snip--
May 10 17:23:33 PE2950 udevd[379]: no db file to read /run/udev/
May 10 17:23:33 PE2950 udevd[378]: '/sbin/blkid -o udev -p /dev/.tmp-
--snip--
May 10 17:23:33 PE2950 udevd[378]: '/lib/udev/
May 10 17:23:33 PE2950 udevd[378]: '/lib/udev/
May 10 17:23:33 PE2950 udevd[378]: '/lib/udev/
May 10 17:23:33 PE2950 udevd[378]: '/lib/udev/
May 10 17:23:33 PE2950 udevd[378]: '/lib/udev/
May 10 17:23:33 PE2950 udevd[378]: '/lib/udev/
--snip--
May 10 17:23:33 PE2950 udevd[1183]: starting '/sbin/dmsetup info -j 252 -m 2 -c --nameprefixes --noheadings --rows -o suspended'
May 10 17:23:33 PE2950 udevd[378]: '/sbin/dmsetup info -j 252 -m 2 -c --nameprefixes --noheadings --rows -o suspended'(err) 'Device does not exist.'
May 10 17:23:33 PE2950 udevd[378]: '/sbin/dmsetup info -j 252 -m 2 -c --nameprefixes --noheadings --rows -o suspended'(err) 'Command failed'
May 10 17:23:33 PE2950 udevd[378]: '/sbin/dmsetup info -j 252 -m 2 -c --nameprefixes --noheadings --rows -o suspended' [1183] exit with return code 1
--snip--
May 10 17:23:33 PE2950 kernel: [ 90.712666] device-mapper: table: 252:2: multipath: not enough path parameters
May 10 17:23:33 PE2950 kernel: [ 90.712668] device-mapper: ioctl: error adding target to table
May 10 17:23:33 PE2950 kernel: [ 90.713856] device-mapper: table: 252:2: multipath: not enough path parameters
May 10 17:23:33 PE2950 kernel: [ 90.713858] device-mapper: ioctl: error adding target to table
May 10 17:23:33 PE2950 udevd[379]: passed -1 bytes to socket monitor 0x7f133e032330
May 10 17:23:33 PE2950 kernel: [ 90.714250] device-mapper: table: 252:2: multipath: not enough path parameters
May 10 17:23:33 PE2950 kernel: [ 90.714252] device-mapper: ioctl: error adding target to table
May 10 17:23:33 PE2950 kernel: [ 90.717242] device-mapper: table: 252:2: multipath: not enough path parameters
May 10 17:23:33 PE2950 kernel: [ 90.717245] device-mapper: ioctl: error adding target to table
May 10 17:23:33 PE2950 kernel: [ 90.717840] device-mapper: table: 252:2: multipath: not enough path parameters
May 10 17:23:33 PE2950 kernel: [ 90.717842] device-mapper: ioctl: error adding target to table
May 10 17:23:33 PE2950 kernel: [ 90.747257] device-mapper: table: 252:2: multipath: not enough path parameters
May 10 17:23:33 PE2950 kernel: [ 90.747259] device-mapper: ioctl: error adding target to table
(the whole syslog is attached)
When things were working, I also tried creating a multipath storage pool in virt-manager pointing to /dev/mapper, and now libvirtd is crashing. (should I file a seperate bug report for this? or wait if this turns out to be a related problem)
May 10 17:04:26 PE2950 kernel: [64283.865145] init: libvirt-bin main process (24372) killed by SEGV signal
May 10 17:04:26 PE2950 kernel: [64283.865186] init: libvirt-bin main process ended, respawning
May 10 17:04:26 PE2950 kernel: [64284.030613] init: libvirt-bin main process (24469) killed by SEGV signal
May 10 17:04:26 PE2950 kernel: [64284.030645] init: libvirt-bin main process ended, respawning
May 10 17:04:26 PE2950 kernel: [64284.189976] init: libvirt-bin main process (24515) killed by SEGV signal
May 10 17:04:26 PE2950 kernel: [64284.190002] init: libvirt-bin main process ended, respawning
May 10 17:04:26 PE2950 kernel: [64284.353151] init: libvirt-bin main process (24559) killed by SEGV signal
May 10 17:04:26 PE2950 kernel: [64284.353182] init: libvirt-bin main process ended, respawning
May 10 17:04:27 PE2950 kernel: [64284.520619] init: libvirt-bin main process (24613) killed by SEGV signal
May 10 17:04:27 PE2950 kernel: [64284.520645] init: libvirt-bin main process ended, respawning
May 10 17:04:27 PE2950 kernel: [64284.682288] init: libvirt-bin main process (24657) killed by SEGV signal
May 10 17:04:27 PE2950 kernel: [64284.682321] init: libvirt-bin main process ended, respawning
May 10 17:04:27 PE2950 kernel: [64284.844660] init: libvirt-bin main process (24701) killed by SEGV signal
May 10 17:04:27 PE2950 kernel: [64284.844690] init: libvirt-bin main process ended, respawning
May 10 17:04:27 PE2950 kernel: [64285.006189] init: libvirt-bin main process (24745) killed by SEGV signal
May 10 17:04:27 PE2950 kernel: [64285.006214] init: libvirt-bin main process ended, respawning
May 10 17:04:27 PE2950 kernel: [64285.195574] init: libvirt-bin main process (24789) killed by SEGV signal
May 10 17:04:27 PE2950 kernel: [64285.195605] init: libvirt-bin main process ended, respawning
May 10 17:04:27 PE2950 kernel: [64285.366351] init: libvirt-bin main process (24833) killed by SEGV signal
May 10 17:04:27 PE2950 kernel: [64285.366379] init: libvirt-bin main process ended, respawning
May 10 17:04:28 PE2950 kernel: [64285.528396] init: libvirt-bin main process (24892) killed by SEGV signal
May 10 17:04:28 PE2950 kernel: [64285.528426] init: libvirt-bin respawning too fast, stopped
I reproduced the bug with a virtual machine install without the SAN, so this is definitively a problem with multipath-tools or udev.
Steps to reproduce:
1.create VM with three disks: virtio for root, two SCSI pointing to same file for multipath
(same file is not really neccesary, as it detects as two seperate disks anyway)
2.install 12.04.2 amd64(from PXE netboot)
select guided partitioning with LVM
install packages Basic Ubuntu server,
3.after booting create multipath.conf, then reboot
4.bug appears
Changed in multipath-tools (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in multipath-tools (Ubuntu): | |
status: | Triaged → Invalid |
https:/ /help.ubuntu. com/12. 10/serverguide/ multipath- devices. html
You cannot have a default LVM config co-exist with multipath. They will
race to grab the SD device for map creation and whoever gets there first wins;
they both use device mapper. LVM is configured using UDEV so it's the
first pass, multipath in run by legacy rc script.
You must configure LVM to blacklist all SD devices.
Then, you must configure LVM to use allow the disks necessary for the
root volume using the UDEV names e.g. /dev/disk/by-id
SD names are never deterministic, sorry, that's what udev us for.
When the multipath volume is not root, you can easily test the config
per the documentation.
Any time a change is made to either multipath.conf or lvm.conf, the initrd
must be updated; also in the documentation. Multipath usually runs last, so if
you didn't push the lvm blacklist to the ramdisk, by the time multipath runs there's
nothing left for it to attach to.
Your "virtual multipath" is bogus, there's nothing that will arbitrate write
ordering, the block names aren't deterministic, and they never can be because
they don't have make/model/serial# which udev uses to create unique names.
You could easily "multipath" your root disk + a MP leg and be left with
swiss cheese based on scan ordering or hotplug events.
If you remove LVM from the stack and follow the directions for properly
propagating multipath to the ramdisk, it will work. Start small, then add an
additional layer of complexity.
There does not exist a tool which integrates the deployment of LVM + multipath
anywhere, you have to understand both and configure by hand. It is challenging
to deploy an LVM config that co-exits with multipath. Good luck.