Sep
20
2010

Multipath – which path should we choose?

Fortunately in Linux  in contrast to our lives we don’t need to choose one path, we are able to choose all paths!

In this article, you can find simple description about configuring multipath under Linux for iSCSI (internet Small Computer System Interface) and FC (Fibre Channel) environments.

At the very beginning we must configure iSCSI or FC target.
We can use trial version of Open-E DSS V6 software.

If we decide to use iSCSI target then it is necessary to connect at least two NICs (Network Interface Cards) on target and initiator sides.
For configuring FC we need to have at least one Qlogic FC HBA (Host Bus Adapter) 2/4/8 Gb with dual-port on target side and also on initiator side.

Next step will be exports of one LU (Logical Unit) via iSCSI or FC target.

After that we must configure our initiator. In case of using iSCSI target we need to connect to it  twice, using iSCSI initiator via both NICs. Using FC target the drives should be visible automatically after loading specific driver.

Now we could check if LU is visible locally on initiators side twice by typing command lsscsi.
Example output for lsscsi command:

[8:0:0:0]    disk    SCST_BIO sB6glXbw6LxyZnCv  101  /dev/sdb
[9:0:0:0]    disk    SCST_BIO sB6glXbw6LxyZnCv  101  /dev/sdc

Now we will generate configuration file for multipath software. To do that properly we need to get WWID (World Wide Identifier) for disks /dev/sdb and /dev/sdc by using command scsi_id.
Example output for command  /lib/udev/scsi_id –page=0×80 –whitelisted –device=/dev/sdb

SSCST_BIOsB6glXbw6LxyZnC2279e18

The same output will be for disk /dev/sdc

Getting this information we are able to generate proper configuration file.

--- /etc/multipath.conf ---
defaults {
udev_dir        /dev
path_grouping_policy    multibus
getuid_callout        "/lib/udev/scsi_id --page=0x80 --whitelisted --device=/dev/%n"
}
multipaths {
multipath {
wwid        SSCST_BIOsB6glXbw6LxyZnC2279e18
alias        multipath
}
}
--- /etc/multipath.conf ---

After multipath start by using script /etc/init.d/multipath-tools start (depending on your Linux distribution), we could type command multipath -l
Example output is:

multipath (SSCST_BIOsB6glXbw6LxyZnC2279e18) dm-0 SCST_BIO,sB6glXbw6LxyZn
[size=3.0G][features=0][hwhandler=0]
\_ round-robin 0 [prio=0][active]
\_ 8:0:0:0 sdb 8:16  [active][undef]
\_ 9:0:0:0 sdc 8:32  [active][undef]

Our new device is available here: /dev/mapper/multipath, we could format it by our favorite file system and mount.

Now we have an access to one LU via two paths! Good luck with testing it! I’m looking forward for some feedback.

1 Comment + Add Comment

  • Sounds really easy. Slightly wondering, why is Open-e in last 6 years not able to add multipathing support on iSCSI/FC initiator side in DSS then ?

Leave a comment