<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Elektronkind &#187; Multipath</title>
	<atom:link href="http://elektronkind.org/category/solaris/mpath/feed" rel="self" type="application/rss+xml" />
	<link>http://elektronkind.org</link>
	<description>Navigator of the synapse</description>
	<pubDate>Sun, 28 Sep 2008 17:26:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Solaris 10&#8217;s new multipath storage tool (Part 1)</title>
		<link>http://elektronkind.org/2007/01/solaris-10s-new-multipath-storage-tool-part-1</link>
		<comments>http://elektronkind.org/2007/01/solaris-10s-new-multipath-storage-tool-part-1#comments</comments>
		<pubDate>Mon, 22 Jan 2007 01:05:14 +0000</pubDate>
		<dc:creator>Dale Ghent</dc:creator>
		
		<category><![CDATA[Multipath]]></category>

		<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://elektronkind.org/2007/01/solaris-10s-new-multipath-storage-tool-part-1</guid>
		<description><![CDATA[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&#8217;ll give some background on what multipathing [...]]]></description>
			<content:encoded><![CDATA[<p>Solaris 10 11/06 was released in late 2006 with a <a href="http://docs.sun.com/app/docs/doc/817-0547/6mgbdbsmb?a=view">plethora of new features</a>, and among them a new tool called <strong><em><a href="http://docs.sun.com/app/docs/doc/819-2240/6n4htdndh?a=view">mpathadm</a></em></strong>, which comes as part of the <strong><em>SUNWmpathadm</em></strong> package.</p>
<p>Before I delve into how this specific tool works and how it helps when managing multipathed storage in Solaris, I&#8217;ll give some background on what multipathing is and how it is implemented in Solaris.<br />
<span id="more-100"></span><br />
<strong>What is multipathing?</strong></p>
<p>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 &#8220;sees&#8221; multiple instances of the same target - once through each connection to the SAN. It&#8217;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&#8217;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.</p>
<p><strong>How multipathing works in Solaris</strong></p>
<p>Multipathing has existed in Solaris since Solaris 8 via an add-on product called <em>Sun SAN Foundation Kit</em>. 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.</p>
<p>When multipathing is enabled, the <strong><em>scsi_vhci</em></strong> driver looks for multiple instances of the same target (eg; a LUN) and upon finding one, creates a &#8220;meta&#8221; disk device which it manages. IO to and from this device are then multiplexed over however many paths <strong><em>scsi_vhci</em></strong> sees to the LUN.</p>
<p>Below is an example of a host which has two fibre channel controllers (<strong><em>c4</em></strong> and <strong><em>c5</em></strong>) connected to the sam SAN, and both see the same target LUNs, of which there are four:</p>
<pre>
[root@ackpthh]/>cfgadm -al -o show_SCSI_LUN
Ap_Id                          Type         Receptacle   Occupant     Condition
c4                             fc-fabric    connected    configured   unknown
c4::60003930000153a5,0         disk         connected    configured   unknown
c4::60003930000153da,0         disk         connected    configured   unknown
c4::60003930000153eb,0         disk         connected    configured   unknown
c4::6000393000015463,0         disk         connected    configured   unknown
c5                             fc-fabric    connected    configured   unknown
c5::60003930000153a5,0         disk         connected    configured   unknown
c5::60003930000153da,0         disk         connected    configured   unknown
c5::60003930000153eb,0         disk         connected    configured   unknown
c5::6000393000015463,0         disk         connected    configured   unknown
</pre>
<p>In the above <strong><em>cfgadm</em></strong> output, the name of the LUNs are in the following format:</p>
<table cellspacing="0" cellpadding="3" bgcolor="#F0F0F0" border="1">
<tr>
<td>c4</td>
<td>6000393000015463</td>
<td>0</td>
</tr>
<tr>
<td>fibre channel controller</td>
<td>WWN of target</td>
<td>LUN number on the target</td>
</tr>
</table>
<p>So, the aforementioned <strong>scsi_vhci</strong> driver sees that LUN <em>6000393000015463,0</em> is presented by two controllers. It will then make a new disk device using that device&#8217;s WWN, LUN, and other information to construct a globally-unique ID (GUID) device name and then create device entries under <strong><em>/dev/dsk</em></strong> and <strong><em>/dev/rdsk</em></strong> to represent a multipathed view:</p>
<pre>
[root@ackpthh]/>ls -l /dev/rdsk/c6t600039300001546301000000D52ACC7Ed0*
lrwxrwxrwx   1 root     root          69 Jul  6  2006 /dev/rdsk/c6t600039300001546301000000D52ACC7Ed0 -> ../../devices/scsi_vhci/disk@g600039300001546301000000d52acc7e:wd,raw
lrwxrwxrwx   1 root     root          68 Jul  6  2006 /dev/rdsk/c6t600039300001546301000000D52ACC7Ed0s0 -> ../../devices/scsi_vhci/disk@g600039300001546301000000d52acc7e:a,raw
lrwxrwxrwx   1 root     root          68 Jul  6  2006 /dev/rdsk/c6t600039300001546301000000D52ACC7Ed0s1 -> ../../devices/scsi_vhci/disk@g600039300001546301000000d52acc7e:b,raw
...
</pre>
<p>You might notice the new controller, <strong><em>c6</em></strong>. This is a &#8220;virtual&#8221; controller implemented by <strong>scsi_vhci</strong> 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.</p>
<p>A note about those big, long multipath device names: there&#8217;s actually a format to them, so don&#8217;t let their length turn you off. The format is as follows, using the above device as an example:</p>
<table cellspacing="0" cellpadding="3" bgcolor="#F0F0F0" border="1">
<tr>
<td>c6</td>
<td>t600039300001546301000000D52ACC7E</td>
<td>d0s1</td>
</tr>
<tr>
<td><strong>scsi_vhci</strong> controller</td>
<td>Target comprised of real target&#8217;s WWN<br />, LUN number,  and SCSI volume UID<br /> (Page 83 data)</td>
<td>LUN number and then<br /> slice number</td>
</tr>
</table>
<p>We can now use the multipath device as we would any other kind of disk device, with <strong><em>format</em></strong> for example:</p>
<pre>
[root@ackpthh]/>format
Searching for disks...done

c6t600039300001546301000000D52ACC7Ed0: configured with capacity of 2794.54GB

AVAILABLE DISK SELECTIONS:
       0. c0t2d0 &lt;DEFAULT cyl 8921 alt 2 hd 255 sec 63&gt;
          /pci@0,0/pci1022,7450@2/pci1000,3060@3/sd@2,0
       1. c6t60003930000153A501000000D52AE0C4d0 &lt;APPLE-Xserve RAID-1.50-2.73TB&gt;
          /scsi_vhci/disk@g60003930000153a501000000d52ae0c4
       2. c6t600039300001546301000000D52ACC7Ed0 &lt;APPLE-Xserve RAID-1.50-2.73TB&gt;
          /scsi_vhci/disk@g600039300001546301000000d52acc7e
       3. c6t60003930000153DA01000000D767690Ed0 &lt;APPLE-Xserve RAID-1.50-1.82TB&gt;
          /scsi_vhci/disk@g60003930000153da01000000d767690e
       4. c6t60003930000153EB01000000D767D3C0d0 &lt;APPLE-Xserve RAID-1.50-2.73TB&gt;
          /scsi_vhci/disk@g60003930000153eb01000000d767d3c0
Specify disk (enter its number):
</pre>
<p>The next part will cover <strong><em>mpathadm</em></strong> itself and how it fits into managing these devices.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/solaris" rel="tag">solaris</a>, <a href="http://technorati.com/tag/opensolaris" rel="tag"> opensolaris</a>, <a href="http://technorati.com/tag/storage" rel="tag"> storage</a></p>
]]></content:encoded>
			<wfw:commentRss>http://elektronkind.org/2007/01/solaris-10s-new-multipath-storage-tool-part-1/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
