Solaris 10’s new multipath storage tool (Part 1)

Solaris 10 11/06 was released in late 2006 with a plethora of new features, and among them a new tool called mpathadm, which comes as part of the SUNWmpathadm package.

Before I delve into how this specific tool works and how it helps when managing multipathed storage in Solaris, I’ll give some background on what multipathing is and how it is implemented in Solaris.

What is multipathing?

Multipathing is a generic term relating to a certain SAN configuration where a host on that SAN (ie; a server) has multiple physical paths to a target (ie; a disk array) on said SAN. A common multipath configuration consists of a server with multiple fibre channel ports, and each port is connected to a separate fibre channel switch in the SAN. Optionally, the target device or disk array may also have multiple physical links in the same manner. In the end, though, the host “sees” multiple instances of the same target – once through each connection to the SAN. It’s up to the host to then manage this. The end result is higher reliability. If a switch were to go down or the optical cable between the host and a switch were damaged, the host’s connectivity to its SAN disks would not be interrupted. IO traffic is also multiplexed over the multiple links, thus providing fail-over and higher throughput.

How multipathing works in Solaris

Multipathing has existed in Solaris since Solaris 8 via an add-on product called Sun SAN Foundation Kit. With the release of Solaris 10, all functionality of the SAN Foundation Kit was integrated into the OS and no longer requires an add-on to function.

When multipathing is enabled, the scsi_vhci driver looks for multiple instances of the same target (eg; a LUN) and upon finding one, creates a “meta” disk device which it manages. IO to and from this device are then multiplexed over however many paths scsi_vhci sees to the LUN.

Below is an example of a host which has two fibre channel controllers (c4 and c5) connected to the sam SAN, and both see the same target LUNs, of which there are four:

In the above cfgadm output, the name of the LUNs are in the following format:

c4 6000393000015463 0
fibre channel controller WWN of target LUN number on the target

So, the aforementioned scsi_vhci driver sees that LUN 6000393000015463,0 is presented by two controllers. It will then make a new disk device using that device’s WWN, LUN, and other information to construct a globally-unique ID (GUID) device name and then create device entries under /dev/dsk and /dev/rdsk to represent a multipathed view:

You might notice the new controller, c6. This is a “virtual” controller implemented by scsi_vhci since making such virtual disk devices under a real physical controller would be a broken idea since, technically, there is no such physical device. Remember, this is a meta device.

A note about those big, long multipath device names: there’s actually a format to them, so don’t let their length turn you off. The format is as follows, using the above device as an example:

c6 t600039300001546301000000D52ACC7E d0s1
scsi_vhci controller Target comprised of real target’s WWN
, LUN number, and SCSI volume UID
(Page 83 data)
LUN number and then
slice number

We can now use the multipath device as we would any other kind of disk device, with format for example:

The next part will cover mpathadm itself and how it fits into managing these devices.

One Reply to “Solaris 10’s new multipath storage tool (Part 1)”

Comments are closed.