Ensuring dm-multipath devices are named consistently across cluster nodes


If you are using the Linux dm-multipath package to provide mulit-pathing in clustered environments, it is super important that the dev-mapper devices show up with the same name on each node. One way to achieve this is through multipath.conf aliases, which allow you to assign a name to a mapper device based on it’s WWID:

multipath {
wwid 3600144f049e0361000000c29877ac600
alias iscsidisk1
path_grouping_policy failover
path_selector "round-robin 0"
failback immediate
}

If you want to stick with mpath[0-9]+ names, you can propagate the /var/lib/multipath/bindings file to each node in the cluster. This file contains the name of each mpath device, along with the WWID that is assigned to it:

$ cat /var/lib/multipath/bindings

# Multipath bindings, Version : 1.0
# NOTE: this file is automatically maintained by the multipath program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# alias wwid
#
mpath0 3600144f049e0360f00000c29877ac600
mpath1 3600144f049e0361000000c29877ac600
mpath2 3600144f049e0361100000c29877ac600

The device-mapper is pretty sweet, and the price tag (free) is even better!

This article was posted by Matty on 2009-04-18 09:39:00 -0400 -0400