Linux‎ > ‎

Multipath

Linux SAN connection with Multipath

Overview

This document is intended to describe how to configure a fault-tolerant SAN connection on a Debian server using the multipath tools.

Installation

Install multipath-tools

aptitude -y install multipath-tools

Configuration

/etc/multipath.conf is the configuration file that needs to be created. See the Resources section below, or the multipath.conf man page for any details that are not covered here.

defaults {
udev_dir /dev
polling_interval 2
default_getuid_callout "/lib/udev/scsi_id -g -u -s /block/%n"
user_friendly_names yes
}

devnode_blacklist {
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^hd[a-z][[0-9]*]"
devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*]"
}

devices {
device {
vendor "DGC"
product "*"
path_grouping_policy group_by_prio
prio_callout "/sbin/mpath_prio_emc /dev/%n"
hardware_handler "1 emc"
features "1 queue_if_no_path"
no_path_retry 300
path_checker emc_clariion
path_selector "round-robin 0"
failback immediate
}
}

multipaths {
multipath {
wwid 3600601602e601d00c0234414ddc4de11
alias test
}
}

The only section that really needs to be customized is the multipaths section. The wwid needs to match the wwid of the LUN, and the alias should be an applicable name. To find the wwid of a san device (/dev/sda for example), use the following:

/lib/udev/scsi_id -g -u -s /block/sda

Once this is configured, and multipath-tools are running, you should be able to see the paths with "multipath -ll"

rorr-test1# multipath -ll
sda: checker msg is "directio checker reports path is down"
sdc: checker msg is "directio checker reports path is down"
test (3600601602e601d00c0234414ddc4de11) dm-5 DGC ,RAID 5
[size=10G][features=1 queue_if_no_path][hwhandler=1 emc]
\_ round-robin 0 [prio=0][enabled]
\_ 0:0:0:0 sda 8:0 [failed][faulty]
\_ 1:0:0:0 sdc 8:32 [failed][faulty]
\_ round-robin 0 [prio=2][active]
\_ 0:0:1:0 sdb 8:16 [active][ready]
\_ 1:0:1:0 sdd 8:48 [active][ready]

In this example, dm-5 is the mapped device, and /dev/mapper/test is the name of the device to mount.


Comments