multipath-tools FAQ



1. How to set up System-on-multipath ?

prerequisite : udev and multipath-tools installed

here are the steps on a Debian SID system :


At reboot, you should see some info like :

path /dev/sda : multipath system

...
gpt: 0 slices
dos: 5 slices
reduced size of partition #2 to 63
Added system1 : 0 70685937 linear /dev/system 63
Added system2 : 0 63 linear /dev/system 7068600
Added system5 : 0 995967 linear /dev/system 70686063
...


2. How does it compare to commercial product XXX ?

Here are a few distinctive features :



3. LVM2 doesn't see my multipathed devices as PV, what's up ?

By default, lvm2 does not consider device-mapper block devices (such as a dm-crypt device) for use as physical volumes.

In order to use a dm-crypt device as an lvm2 pv, add this line to the devices block in /etc/lvm/lvm.conf:

types = [ "device-mapper", 1 ]

If /etc/lvm/lvm.conf does not exist, you can create one based on your current/default config like so:

lvm dumpconfig > /etc/lvm/lvm.conf

(tip from Christophe Saout)


4. LVM2 pvscan reports duplicate PVs

LVM2 must be instructed not to look at the path but only at the multipaths.
add this line to the devices block in /etc/lvm/lvm.conf:

filter = [ "r/sd.*/", "a/.*/" ]

This might be a little too drastic a filter for your context. Adapt at need.


5. I see my multipath nodes in /dev/mapper/ but not in /dev/

Verify you have a naming rule configured in udev *and* no bypass rule for dm-* devices.
The naming rule may use dmsetup or multipath-tools'-provided devmap_name.

# Commented out :
# KERNEL="dm-[0-9]*", OPTIONS ="ignore_device"
KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"

Partition mapping through kpartx won't work unless devices appear in /dev/.


6. How do I partition my multipathed devices

The device mapper now routes the partitioning ioctl submitted on the multipath device.
If your system rejects the ioctl, fallback to partitioning a constituant path instead, and reload the map through multipath(8)


7. I know my multipath is partitioned but I can't find the partition nodes

Partition mapping through kpartx won't work unless devices appear in /dev/.
See {5}.


8. Upon path error the failover takes forever

Check the driver and transport timeout values.
They should be lowered when using multipath, usually in the rang of 1-6 seconds.
These timeouts should be hot-tunables through sysfs:

# find /sys/class/ -name "*tmo*"
/sys/class/fc_remote_ports/rport-1:0-0/dev_loss_tmo
...
# echo 1 > /sys/class/fc_remote_ports/rport-1:0-0/dev_loss_tmo
# cat /sys/class/fc_remote_ports/rport-1:0-0/dev_loss_tmo
6

The system adds 5 seconds to the entered value.


9. How to debug multipathd?


Log to console:

# multipathd -d

Log to syslog:

# multipathd -v4

Use strace:

# strace -f multipathd