<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>unixpowered.com &#187; san</title>
	<atom:link href="http://www.unixpowered.com/blog/category/san/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unixpowered.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 21 Jul 2010 13:42:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux multipathing</title>
		<link>http://www.unixpowered.com/blog/2009/11/27/linux-multipathing/</link>
		<comments>http://www.unixpowered.com/blog/2009/11/27/linux-multipathing/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 22:40:46 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[fibre channel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux tips]]></category>
		<category><![CDATA[multipathing]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[san]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://www.unixpowered.com/blog/?p=381</guid>
		<description><![CDATA[I use MPxIO in Solaris quite often and it works very well for me. This time I needed to test out I/O multipathing in RedHat. What I really needed to do: have a server with two HBA&#8217;s manage a mirror which has submirrors on separate SAN&#8217;s; so that the server has multiple paths to each [...]]]></description>
			<content:encoded><![CDATA[<p>I use MPxIO in Solaris quite often and it works very well for me. This time I needed to test out I/O multipathing in RedHat. What I really needed to do: have a server with two HBA&#8217;s manage a mirror which has submirrors on separate SAN&#8217;s; so that the server has multiple paths to each submirror. That way, if an HBA goes the server has still connection to both submirrors through the remaining HBA. </p>
<p>Gear used in this &#8220;experiment&#8221;:</p>
<ul>
<li>Dell Poweredge server.</li>
<li>Two Qlogic QLA2310 HBA&#8217;s.</li>
<li>RHEL Server 5.3 x86.</li>
<li>Two SAN&#8217;s presenting one LUN each.</li>
</ul>
<p>Rough steps I took to get this working:</p>
<ol>
<li>Make sure device mapper package is installed.</li>
<li>Present two LUN&#8217;s from two SAN&#8217;s.</li>
<li>Probe HBA&#8217;s for presented LUN&#8217;s.</li>
<li>Configure multipathing.</li>
</ol>
<p>First and foremost, make sure <em>qla2xxx</em> driver is loaded. You also have to make sure you have <em>device-mapper-multipath-0.4.7-23.el5</em> installed. Next, configure multipathing daemon so that it starts on boot:</p>
<p><code>[root@carbon ~]# <strong>chkconfig multipathd on</strong></code></p>
<p>When that&#8217;s done you need to make the system aware of the presented LUN&#8217;s. One way to do so is to reboot the server. Another option is to force HBA scan:</p>
<p><code>[root@carbon ~]# <strong>echo "- - -" &gt; /sys/class/scsi_host/host1/scan</strong></code></p>
<p>During this you should watch <em>/var/log/messages</em> to see if your LUN&#8217;s are detected. When done, make <em>multipathd</em> aware of the LUN&#8217;s:</p>
<p><code>[root@</code><code>carbon</code><code> ~]# <strong>multipath -v2 -d</strong></code></p>
<p>The above command is a &#8220;dry run&#8221;. There will be no device map changes committed. You will only be shown device mapper changes that will be made. To commit device map changes run:</p>
<p><code>[root@carbon ~]# <strong>multipath -v2</strong></code></p>
<p>Once this is done you can see what <em>multipathd</em> is seeing:</p>
<p><code>[root@carbon ~]# <strong>multipath -ll</strong><br />
mpath2 (3600508d311100a300000f00001a90000) dm-3 COMPAQ,HSV111 (C)COMPAQ<br />
[size=15G][features=1 queue_if_no_path][hwhandler=0][rw]<br />
\_ round-robin 0 [prio=100][enabled]<br />
&nbsp;\_ 1:0:3:1 sde 8:64  [active][ready]<br />
&nbsp;\_ 2:0:3:1 sdh 8:112 [active][ready]<br />
\_ round-robin 0 [prio=20][enabled]<br />
&nbsp;\_ 1:0:2:1 sdd 8:48  [active][ready]<br />
&nbsp;\_ 2:0:2:1 sdg 8:96  [active][ready]<br />
mpath1 (3600508c362d0a1250000900001490000) dm-2 COMPAQ,HSV111 (C)COMPAQ<br />
[size=15G][features=1 queue_if_no_path][hwhandler=0][rw]<br />
\_ round-robin 0 [prio=100][enabled]<br />
&nbsp;\_ 1:0:0:1 sdb 8:16  [active][ready]<br />
&nbsp;\_ 2:0:4:1 sdi 8:128 [active][ready]<br />
\_ round-robin 0 [prio=20][enabled]<br />
&nbsp;\_ 1:0:1:1 sdc 8:32  [active][ready]<br />
&nbsp;\_ 2:0:1:1 sdf 8:80  [active][ready]</code></p>
<p>If everything looks good, you can create configuration file for <em>multipathd</em>. You will need to edit <em>/etc/multipath.conf</em> and depending on your environment, add or modify some parameters. The configuration file contains enough comments and examples to figure out what different parameters mean. When in doubt, consult the man pages.</p>
<p>First, add a <em>blacklist</em> section, which will make certain device exempt from multipathing. I have my internal drives listed in blacklist section:</p>
<p><code>blacklist&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;devnode&nbsp;"^sd[a-b].*"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;devnode&nbsp;"^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;devnode&nbsp;"^hd[a-z]"<br />
}</code></p>
<p>Next, you are going to need <em>device</em> section. This is going to be specific to your SAN. The one below is for EVA5000. I got the parameters from HP&#8217;s device mapper package:</p>
<p><code>device&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vendor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"HP|COMPAQ"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;product&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"HSV1[01]1&nbsp;\(C\)COMPAQ|HSV[2][01]0|HSV300"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path_grouping_policy&nbsp;&nbsp;&nbsp;&nbsp;group_by_prio<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getuid_callout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"/sbin/scsi_id&nbsp;-g&nbsp;-u&nbsp;-s&nbsp;/block/%n"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path_checker&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tur<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path_selector&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"round-robin&nbsp;0"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prio_callout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"/sbin/mpath_prio_alua&nbsp;/dev/%n"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rr_weight&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uniform<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;failback&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;immediate<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hardware_handler&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"0"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no_path_retry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;12<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rr_min_io&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;100<br />
}</code></p>
<p>You should also look at <em>defaults</em> section to make sure it is configured for your setup. Again, the parameters in mine are specific to EVA5000:</p>
<p><code>defaults&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;udev_dir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/dev<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polling_interval&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selector&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"round-robin&nbsp;0"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path_grouping_policy&nbsp;&nbsp;&nbsp;&nbsp;failover<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getuid_callout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"/sbin/scsi_id&nbsp;-g&nbsp;-u&nbsp;-s&nbsp;/block/%n"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prio_callout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"/bin/true"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path_checker&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tur<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rr_min_io&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;100<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rr_weight&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uniform<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;failback&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;immediate<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no_path_retry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;12<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;user_friendly_names&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bindings_file&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"/var/lib/multipath/bindings"<br />
}</code></p>
<p>Finally, you will need to specify configuration for the presented LUN&#8217;s. This applies to the <em>multipaths</em> section of <em>multipath.conf</em> file:</p>
<p><code>multipath&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wwid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3600508b4001031250000900001490000<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;san1data<br />
}<br />
multipath&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wwid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3600508b400011c300000f00001a90000<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;san2data<br />
}</code></p>
<p>After you are done, restart multipathd and check output of <em>multipath -ll</em> command:</p>
<p><code>[root@carbon ~]# <strong>multipath -ll</strong><br />
san2data (3600508d311100a300000f00001a90000) dm-3 COMPAQ,HSV111 (C)COMPAQ<br />
[size=15G][features=1 queue_if_no_path][hwhandler=0][rw]<br />
\_ round-robin 0 [prio=100][active]<br />
&nbsp;\_ 1:0:3:1 sde 8:64  [active][ready]<br />
&nbsp;\_ 2:0:3:1 sdh 8:112 [active][ready]<br />
\_ round-robin 0 [prio=20][enabled]<br />
&nbsp;\_ 1:0:2:1 sdd 8:48  [active][ready]<br />
&nbsp;\_ 2:0:2:1 sdg 8:96  [active][ready]<br />
san1data (3600508c362d0a1250000900001490000) dm-2 COMPAQ,HSV111 (C)COMPAQ<br />
[size=15G][features=1 queue_if_no_path][hwhandler=0][rw]<br />
\_ round-robin 0 [prio=50][enabled]<br />
&nbsp;\_ 1:0:0:1 sdb 8:16  [active][ready]<br />
&nbsp;\_ 2:0:4:1 sdi 8:128 [active][ready]<br />
\_ round-robin 0 [prio=20][enabled]<br />
&nbsp;\_ 1:0:1:1 sdc 8:32  [active][ready]<br />
&nbsp;\_ 2:0:1:1 sdf 8:80  [active][ready]</code></p>
<p>That should be it. You should test the setup by disabling paths to see if your LUN&#8217;s stay up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2009/11/27/linux-multipathing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Growing mirrored LUN in RedHat</title>
		<link>http://www.unixpowered.com/blog/2009/02/06/growing-mirrored-lun-in-redhat/</link>
		<comments>http://www.unixpowered.com/blog/2009/02/06/growing-mirrored-lun-in-redhat/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 22:52:36 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux tips]]></category>
		<category><![CDATA[linux utilities]]></category>
		<category><![CDATA[lvm2]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[san]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://wayciak.wordpress.com/?p=118</guid>
		<description><![CDATA[I was putting a RedHat server onto a SAN and I could not find any clear instructions on how to grow a single mirrored LUN on the fly. Anyway, here are some notes on the process. First the setup: Two LUN&#8217;s mirrored across two SAN&#8217;s with LVM volume on the top of it. I could [...]]]></description>
			<content:encoded><![CDATA[<p>I was putting a <a title="Red Hat" href="http://www.redhat.com" target="_self">RedHat</a> server onto a SAN and I could not find any clear instructions on how to grow a single mirrored LUN on the fly. Anyway, here are some notes on the process. First the setup: Two LUN&#8217;s mirrored across two SAN&#8217;s with <acronym title="Logical Volume Manager">LVM</acronym> volume on the top of it. I could have easily just presented another set of mirrored LUN&#8217;s, add them to <acronym title="Volume Group">VG</acronym> and go from there. I wanted to avoid that, as that kind of setup can quickly get out of hand as the number of presented LUN&#8217;s grows. If there is a more &#8220;sensible&#8221; and flexible setup, I would most definitely want to know about it.</p>
<p>For sake of completeness, here are steps to recreate the initial setup I had:</p>
<ol>
<li>Create a mirror from two LUN&#8217;s</li>
<li>Use the mirror as <acronym title="Physical Volume">PV</acronym></li>
<li>Create a VG using the PV</li>
<li>Create <acronym title="Logical Volume">LV</acronym> on the top of the VG</li>
<li>Make ext3 filesystem on the top of LV and mount it</li>
</ol>
<p>Here are the actual steps with some output:</p>
<p><code>[root@ultra /]# <strong>mdadm --create /dev/md10 --level=1 --raid-devices=2 /dev/mapper/mpath4 /dev/mapper/mpath5</strong><br />
mdadm: array /dev/md10 started.<br />
[root@</code><code>ultra</code><code> /]# <strong>pvcreate /dev/md10</strong><br />
Physical volume "/dev/md10" successfully created<br />
[root@</code><code>ultra</code><code> /]# <strong>vgcreate testvg /dev/md10</strong><br />
Volume group "testvg" successfully created<br />
[root@</code><code>ultra</code><code> /]# <strong>lvcreate -l+100%FREE -n testlv testvg</strong><br />
Logical volume "testlv" created<br />
[root@</code><code>ultra</code><code> /]# <strong>mkfs -t ext3 /dev/testvg/testlv</strong><br />
[root@</code><code>ultra</code><code> /]# <strong>mount /dev/testvg/testlv /tmp/test</strong></code></p>
<p>Now the resizing part. There might be a few steps but the upshot is that the filesystem can stay mounted and in use. High level overview of steps to take:</p>
<ol>
<li>Grow the two LUN&#8217;s using SAN management software</li>
<li>Fail and remove one of the submirrors</li>
<li>Force the kernel to see the size increase of the submirror</li>
<li>Flush and recreate the multipath device map so multipathing sees the new size</li>
<li>Re-add the submirror to the mirror and let it sync</li>
<li>Repeat 2-4 for the second submirror</li>
<li>Resize the PV</li>
<li>Resize the LV</li>
<li>Resize the filesystem</li>
</ol>
<p>First, you fail and remove the submirror:</p>
<p><code>[root@</code><code>ultra</code><code> /]# <strong>mdadm /dev/md10 -f /dev/mapper/mpath4 -r /dev/mapper/mpath4</strong><br />
mdadm: set /dev/mapper/mpath4 faulty in /dev/md10<br />
mdadm: hot removed /dev/mapper/mpath4<br />
</code><br />
Now, note all paths to the LUN. Kernel sees a separate device at the end of each path to a LUN. In this case they are <em>sdj</em>, <em>sdt</em>, <em>sdg</em> and <em>sdq</em>.</p>
<p><code>[root@</code><code>ultra</code><code> /]# <strong>multipath -ll mpath4</strong><br />
mpath4 (3600508b400011c300000f000008d0000)<br />
[size=12 GB][features="1 queue_if_no_path"][hwhandler="0"]<br />
_ round-robin 0 [prio=100][active]<br />
._ 1:0:3:1     sdj 8:144  [active][ready]<br />
._ 2:0:3:1     sdt 65:48  [active][ready]<br />
_ round-robin 0 [prio=20][enabled]<br />
._ 1:0:2:1     sdg 8:96   [active][ready]<br />
._ 2:0:2:1     sdq 65:0   [active][ready]</code></p>
<p>At this point the problem is to get the kernel to recognize the new size without reboot. After a lot of trying and sifting through man pages I found that <em>blockdev</em> command does the magic. Then I googled &#8220;blockdev resize&#8221; and I found <a title="Detect online disk resize" href="http://lwn.net/Articles/296401/" target="_self">this</a> confirming my finding. So, the next step is to probe all logical paths to the LUN:</p>
<p><code>[root@</code><code>ultra</code><code> /]# <strong>blockdev --rereadpt /dev/sdj<br />
</strong> [root@</code><code>ultra</code><code> /]# <strong>blockdev --rereadpt /dev/sdt</strong><br />
[root@</code><code>ultra</code><code> /]# <strong>blockdev --rereadpt /dev/sdg</strong><br />
[root@</code><code>ultra</code><code> /]# <strong>blockdev --rereadpt /dev/sdq</strong></code></p>
<p>You should see messages in <em>/var/log/messages</em> about kernel seeing new size on all paths. If you were to issue <em>multipath -ll</em> right now you would see that multipathing is still reporting old size. To fix that, flush the device map of the LUN and then recreate it:</p>
<p><code>[root@</code><code>ultra</code><code> /]# <strong>multipath -f mpath4</strong><br />
[root@</code><code>ultra</code><code> /]# <strong>multipath -v2</strong><br />
create: mpath4 (3600508b400011c300000f000008d0000)<br />
[size=13 GB][features="0"][hwhandler="0"]<br />
_ round-robin 0 [prio=100]<br />
._ 1:0:3:1     sdj 8:144  [ready]<br />
._ 2:0:3:1     sdt 65:48  [ready]<br />
_ round-robin 0 [prio=20]<br />
._ 1:0:2:1     sdg 8:96   [ready]<br />
._ 2:0:2:1     sdq 65:0   [ready]</code></p>
<p>Multipathing should be reporting the new size. Now you are ready to put back the grown submirror and let the whole mirror sync:</p>
<p><code>[root@</code><code>ultra</code><code> /]# <strong>mdadm /dev/md10 -a /dev/mapper/mpath4</strong><br />
mdadm: hot added /dev/mapper/mpath4</code></p>
<p>When the mirror has synced up, repeat the above process for the second submirror and wait for the sync to finish. Time to grow the mirror device itself:</p>
<p><code>[root@</code><code>ultra</code><code> /]# <strong>mdadm --grow /dev/md10 --size=max</strong></code></p>
<p>After the completion <em>/proc/mdstat</em> should report increase in size of <em>/dev/md10</em>. Moving on you need to grow the PV that resides on<em> /dev/md10</em>:</p>
<p><code>[root@</code><code>ultra</code><code> /]# <strong>pvresize /dev/md10</strong><br />
Physical volume "/dev/md10" changed<br />
1 physical volume(s) resized / 0 physical volume(s) not resized</code></p>
<p>And finally, you need to resize the LV:</p>
<p><code>[root@</code><code>ultra</code><code> /]# <strong>lvresize -l+100%FREE testvg/testlv</strong><br />
Extending logical volume testlv to 13.00 GB<br />
Logical volume testlv successfully resized</code></p>
<p>Of course, don&#8217;t forget to grow the filesystem itself:</p>
<p><code>[root@</code><code>ultra</code><code> /]# <strong>ext2online /dev/testvg/testlv</strong><br />
ext2online v1.1.18 - 2001/03/18 for EXT2FS 0.5b<br />
[root@</code><code>ultra</code><code> /]# <strong>df</strong><br />
Filesystem           1K-blocks      Used Available Use% Mounted on<br />
/dev/mapper/VolGroup00-rootlv<br />
.                    132304280     5104976 120478588     5% /<br />
/dev/md0                               132134         32791     92521   27% /boot<br />
none                                     8202920                 0   8202920     0% /dev/shm<br />
/dev/mapper/testvg-testlv<br />
.                     13413488         63516   12668820     1% /tmp/test</code></p>
<p>That should be it. The sync time for huge volumes is going to be something to keep in mind. The whole setup is clean and neat without clutter. I could have opted to mirror using LVM, but there seems to be a strange requirement for third, log volume. It is possible to keep the log in memory, but that supposedly causes resync on boot.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2009/02/06/growing-mirrored-lun-in-redhat/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Growing Solaris Volume Manager mirrors online</title>
		<link>http://www.unixpowered.com/blog/2008/11/08/growing-solaris-volume-manager-mirrors-online/</link>
		<comments>http://www.unixpowered.com/blog/2008/11/08/growing-solaris-volume-manager-mirrors-online/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 14:41:10 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[san]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris tips]]></category>
		<category><![CDATA[solaris volume manager]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://wayciak.wordpress.com/?p=79</guid>
		<description><![CDATA[You have a SVM mirror and you need to grow it. Online. All steps are straight forward except for the last one. So, in a nutshell:

Grow sizes of both submirror LUN&#8217;s on SAN
Detach the first submirror metadevice
Clear the submirror metadevice
Make the system see new LUN size
Recreate the submirror metadevice, attach it to the mirror and [...]]]></description>
			<content:encoded><![CDATA[<p>You have a <acronym title="Solaris Volume Manager">SVM</acronym> mirror and you need to grow it. Online. All steps are straight forward except for the last one. So, in a nutshell:</p>
<ol>
<li>Grow sizes of both submirror LUN&#8217;s on SAN</li>
<li>Detach the first submirror metadevice</li>
<li>Clear the submirror metadevice</li>
<li>Make the system see new LUN size</li>
<li>Recreate the submirror metadevice, attach it to the mirror and let it sync</li>
<li>Repeat the above for the second submirror</li>
<li>Not so obvious step</li>
<li>Grow the filesystem</li>
</ol>
<p>You have a mirror metadevice <em>d200</em> consisting of submirrors <em>d201</em> and <em>d202</em>. Both submirrors are sliced in such way that all space is allocated in slice 0. At this point both LUN&#8217;s should be already grown, but you need to make the system to see the size increase. Here is what <em>d201</em>, one of the submirrors of <em>d200</em>, should look like:</p>
<p><code>bash-3.00# <strong>metastat d201</strong><br />
d201: Submirror of d200<br />
State: Okay<br />
Size: 2064384 blocks (1008 MB)<br />
Stripe 0:<br />
Device                                             Start Block  Dbase        State Reloc Hot Spare<br />
/dev/dsk/c5t511714A510011C370000C00003410000d0s0          0     No            Okay   Yes</code></p>
<p>First, detach <em>d201</em> from its parent and clear it:</p>
<p><code>bash-3.00# <strong>metadetach d200 d201</strong><br />
bash-3.00# <strong>metaclear d201</strong></code></p>
<p>The next step is likely to alter the LUN slice configuration, so make sure you have it noted.</p>
<p>You need to run <em>format</em> command to get the system to see the grown LUN. So, run <em>format</em> then select <em>type</em> and then select <em>Autoconfigure</em>. At this point <em>format</em> should be reporting the new LUN size. Make sure your slice configuration is correct and that all the new space is tacked onto the end of correct slice. In this case, it&#8217;s slice 0.</p>
<p>Now recreate <em>d201</em>, attach it to <em>d200</em> and let the mirror sync. When checking status of <em>d200</em> note that overall mirror size is still the same but the size of <em>d201</em> increased:</p>
<p><code>bash-3.00# <strong>metastat d200</strong><br />
d200: Mirror<br />
Submirror 0: d202<br />
State: Okay<br />
Submirror 1: d201<br />
State: Okay<br />
Pass: 1<br />
Read option: roundrobin (default)<br />
Write option: parallel (default)<br />
Size: 2064384 blocks (1008 MB)</code></p>
<p><code>d202: Submirror of d200<br />
State: Okay<br />
Size: 2064384 blocks (1008 MB)<br />
Stripe 0:<br />
Device                                             Start Block  Dbase        State Reloc Hot Spare<br />
/dev/dsk/c5t511714A510011C370000C00003460000d0s0          0     No            Okay   Yes</code></p>
<p><code>d201: Submirror of d200<br />
State: Okay<br />
Size: 4128768 blocks (2.0 GB)<br />
Stripe 0:<br />
Device                                             Start Block  Dbase        State Reloc Hot Spare<br />
/dev/dsk/c5t511714A510011C370000C00003410000d0s0          0     No            Okay   Yes<br />
</code></p>
<p>Now repeat the same process with <em>d202</em>. After you are done you will have both submirrors bigger, but the size of overall mirror will still be the same:</p>
<p><code>bash-3.00# <strong>metastat d200</strong><br />
d200: Mirror<br />
Submirror 0: d201<br />
State: Okay<br />
Submirror 1: d202<br />
State: Okay<br />
Pass: 1<br />
Read option: roundrobin (default)<br />
Write option: parallel (default)<br />
Size: 2064384 blocks (1008 MB)</code></p>
<p><code>d201: Submirror of d200<br />
State: Okay<br />
Size: 4128768 blocks (2.0 GB)<br />
Stripe 0:<br />
Device                                             Start Block  Dbase        State Reloc Hot Spare<br />
/dev/dsk/c5t511714A510011C370000C00003410000d0s0          0     No            Okay   Yes</code></p>
<p><code>d202: Submirror of d200<br />
State: Okay<br />
Size: 4161536 blocks (2.0 GB)<br />
Stripe 0:<br />
Device                                             Start Block  Dbase        State Reloc Hot Spare<br />
/dev/dsk/c5t511714A510011C370000C00003460000d0s0          0     No            Okay   Yes</code></p>
<p>Now comes the &#8220;Not so obvious&#8221; step. In order to increase overall mirror size you need to run <a title="metattach man page" href="http://docs.sun.com/app/docs/doc/816-5166/metattach-1m?l=en&amp;a=view&amp;q=metattach" target="_self"><em>metattach</em></a> on the mirror itself:</p>
<p><code>bash-3.00# <strong>metattach d200</strong><br />
bash-3.00# <strong>metastat d200</strong><br />
d200: Mirror<br />
Submirror 0: d201<br />
State: Okay<br />
Submirror 1: d202<br />
State: Okay<br />
Pass: 1<br />
Read option: roundrobin (default)<br />
Write option: parallel (default)<br />
Size: 4128768 blocks (2.0 GB)</code></p>
<p>This will grow the size of the entire mirror to the size of submirror devices. Now you can grow the filesystem on it without unmounting it. Keep in mind that for the duration of <a title="growfs man page" href="http://docs.sun.com/app/docs/doc/816-5166/6mbb1kq2c?l=en&amp;a=view&amp;q=growfs" target="_self"><em>growfs</em></a> command there will be no writes to the volume.</p>
<p><code>bash-3.00# <strong>growfs -M /export/home/users /dev/md/rdsk/d200</strong><br />
/dev/md/rdsk/d200:      4128768 sectors in 126 cylinders of 128 tracks, 256 sectors<br />
2016.0MB in 63 cyl groups (2 c/g, 32.00MB/g, 15040 i/g)<br />
super-block backups (for fsck -F ufs -o b=#) at:<br />
32, 65824, 131616, 197408, 263200, 328992, 394784, 460576, 526368, 592160,<br />
3487008, 3552800, 3618592, 3684384, 3750176, 3815968, 3881760, 3947552,<br />
4013344, 4079136</code></p>
<p>That&#8217;s all there is to it. The &#8220;Not so obvious&#8221; step is mentioned in the <a title="metattach man page" href="http://docs.sun.com/app/docs/doc/816-5166/metattach-1m?l=en&amp;a=view&amp;q=metattach" target="_self">metattach man page</a>. But unless you do this stuff every day, this very useful piece of information can be easily forgotten.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2008/11/08/growing-solaris-volume-manager-mirrors-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disabling MPxIO for onboard disks</title>
		<link>http://www.unixpowered.com/blog/2008/09/01/disabling-mpxio-for-onboard-disks/</link>
		<comments>http://www.unixpowered.com/blog/2008/09/01/disabling-mpxio-for-onboard-disks/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 18:36:21 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[fibre channel]]></category>
		<category><![CDATA[mpxio]]></category>
		<category><![CDATA[san]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris tips]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[sun hardware]]></category>

		<guid isPermaLink="false">http://wayciak.wordpress.com/?p=40</guid>
		<description><![CDATA[I was configuring MPxIO on Sun Fire V490. After issuing stmsboot -e command and rebooting the server, internal disks were under MPxIO&#8217;s control.
This was not something I wanted and I needed to disable it. In order to do so I had to edit /kernel/drv/fp.conf file and tell Solaris not to enable MPxIO on internal disks. [...]]]></description>
			<content:encoded><![CDATA[<p>I was configuring <acronym title="Solaris Multiplexed I/O">MPxIO</acronym> on <a title="Sun Fire V490" href="http://www.sun.com/servers/midrange/v490/index.xml" target="_self">Sun Fire V490</a>. After issuing <em>stmsboot -e</em> command and rebooting the server, internal disks were under MPxIO&#8217;s control.</p>
<p>This was not something I wanted and I needed to disable it. In order to do so I had to edit <em>/kernel/drv/fp.conf</em> file and tell Solaris not to enable MPxIO on internal disks. So I added the following line at the end of <em>fp.conf</em> file:</p>
<p><code>name="fp" parent="/pci@8,600000/SUNW,qlc@4" port=0 mpxio-disable="yes";</code></p>
<p>This line tells Solaris to disable MPxIO on port 0 for all devices whose parent device is <em>/pci@8,600000/SUNW,qlc@4</em>. Of course, similar line should be added for all HBA&#8217;s and ports you do not want to have under MPxIO&#8217;s control. You can get the parent device from your <em>/var/adm/messages</em> file or from device links pointing to the internal disks. Here is a partial list of device links:</p>
<pre>&lt;-----------------SNIP----------------&gt;</pre>
<p><code>lrwxrwxrwx   1 root     other         70 Jun 12 11:50 c1t0d0s0 -&gt; ../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037c3e2ef,0:a<br />
lrwxrwxrwx   1 root     other         70 Jun 12 11:50 c1t0d0s1 -&gt; ../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037c3e2ef,0:b<br />
lrwxrwxrwx   1 root     other         70 Jun 12 11:50 c1t0d0s2 -&gt; ../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037c3e2ef,0:c<br />
lrwxrwxrwx   1 root     other         70 Jun 12 11:50 c1t0d0s3 -&gt; ../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037c3e2ef,0:d<br />
lrwxrwxrwx   1 root     other         70 Jun 12 11:50 c1t0d0s4 -&gt; ../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037c3e2ef,0:e<br />
lrwxrwxrwx   1 root     other         70 Jun 12 11:50 c1t0d0s5 -&gt; ../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037c3e2ef,0:f<br />
lrwxrwxrwx   1 root     other         70 Jun 12 11:50 c1t0d0s6 -&gt; ../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037c3e2ef,0:g<br />
lrwxrwxrwx   1 root     other         70 Jun 12 11:50 c1t0d0s7 -&gt; ../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037c3e2ef,0:h</code></p>
<pre>&lt;-----------------SNIP----------------&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2008/09/01/disabling-mpxio-for-onboard-disks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gathering fibre channel info using fcinfo</title>
		<link>http://www.unixpowered.com/blog/2008/08/19/gathering-fibre-channel-info-using-fcinfo/</link>
		<comments>http://www.unixpowered.com/blog/2008/08/19/gathering-fibre-channel-info-using-fcinfo/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 19:47:25 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[fibre channel]]></category>
		<category><![CDATA[san]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris tips]]></category>
		<category><![CDATA[solaris utilities]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://wayciak.wordpress.com/?p=41</guid>
		<description><![CDATA[I came across fcinfo command reading some man page. So, I decided to see what kind of useful fibre channel information it could give me. It turns out fcinfo knows quite a bit.
We can list all local fibre channel ports:
bash-3.00# fcinfo hba-port
HBA Port WWN: 21000003ba16dbd2
OS Device Name: /dev/cfg/c1
Manufacturer: QLogic Corp.
Model: 2200
Firmware Version: 2.1.144
FCode/BIOS Version: ISP2200 [...]]]></description>
			<content:encoded><![CDATA[<p>I came across <a title="fcinfo man page" href="http://docs.sun.com/app/docs/doc/819-2240/6n4htdn4t?l=en&amp;a=view&amp;q=fcinfo" target="_self"><em>fcinfo</em></a> command reading some man page. So, I decided to see what kind of useful fibre channel information it could give me. It turns out <em>fcinfo</em> knows quite a bit.</p>
<p>We can list all local fibre channel ports:</p>
<p><code>bash-3.00# <strong>fcinfo hba-port</strong><br />
HBA Port WWN: 21000003ba16dbd2<br />
OS Device Name: /dev/cfg/c1<br />
Manufacturer: QLogic Corp.<br />
Model: 2200<br />
Firmware Version: 2.1.144<br />
FCode/BIOS Version: ISP2200 FC-AL Host Adapter Driver: 1.12 01/01/16<br />
Type: L-port<br />
State: online<br />
Supported Speeds: 1Gb<br />
Current Speed: 1Gb<br />
Node WWN: 20000003ba16dbd2<br />
HBA Port WWN: 2100001b320e3853<br />
OS Device Name: /dev/cfg/c3<br />
Manufacturer: QLogic Corp.<br />
Model: QLA2462<br />
Firmware Version: 4.0.27<br />
FCode/BIOS Version: QLA2462 Host Adapter Driver(SPARC): 1.24  11/15/06<br />
Type: N-port<br />
State: online<br />
Supported Speeds: 1Gb 2Gb 4Gb<br />
Current Speed: 2Gb<br />
Node WWN: 2000001b320e3853<br />
HBA Port WWN: 2101001b322e3853<br />
OS Device Name: /dev/cfg/c4<br />
Manufacturer: QLogic Corp.<br />
Model: QLA2462<br />
Firmware Version: 4.0.27<br />
FCode/BIOS Version: QLA2462 Host Adapter Driver(SPARC): 1.24  11/15/06<br />
Type: N-port<br />
State: online<br />
Supported Speeds: 1Gb 2Gb 4Gb<br />
Current Speed: 2Gb<br />
Node WWN: 2001001b322e3853</code></p>
<p>We can take a look what remote ports are seen by particular local fibre channel port, in this case 2100001b320e3853:</p>
<p><code>bash-3.00# <strong>fcinfo remote-port -p 2100001b320e3853</strong><br />
Remote Port WWN: 100000e00216aef3<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 100000e01124b88f<br />
Remote Port WWN: 50001fe15003b384<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 50001fe15037e759<br />
Remote Port WWN: 100000e0022744f3<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 100000e0020744f3<br />
Remote Port WWN: 50001fe150216de9<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 50001fe11025bb53<br />
Remote Port WWN: 100000e00228f492<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 100000e00208f492<br />
Remote Port WWN: 50001fe15076b59b<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 50001fe15037e759<br />
Remote Port WWN: 50001fe150216ded<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 50001fe11025bb53</code></p>
<p>Here, we get link statistics for remote fibre channel device whose WWN is 100000e0020744f3:</p>
<p><code>bash-3.00# <strong>fcinfo remote-port -l -p 2100001b320e3853 100000e0020744f3</strong><br />
Remote Port WWN: 100000e0022744f3<br />
Active FC4 Types: SCSI<br />
SCSI Target: unknown<br />
Node WWN: 100000e0020744f3<br />
Link Error Statistics:<br />
Link Failure Count: 0<br />
Loss of Sync Count: 0<br />
Loss of Signal Count: 0<br />
Primitive Seq Protocol Error Count: 0<br />
Invalid Tx Word Count: 0<br />
Invalid CRC Count: 0</code></p>
<p>We can also get link statistics and SCSI target information for all remote fibre channel devices see on local port whose WWN is 2100001b320e3853:</p>
<p><code>bash-3.00# <strong>fcinfo remote-port -sl -p 2100001b320e3853</strong><br />
Remote Port WWN: 100000e00216aef3<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 100000e01124b88f<br />
Link Error Statistics:<br />
Link Failure Count: 0<br />
Loss of Sync Count: 0<br />
Loss of Signal Count: 0<br />
Primitive Seq Protocol Error Count: 0<br />
Invalid Tx Word Count: 0<br />
Invalid CRC Count: 0<br />
LUN: 0<br />
Vendor: HP<br />
Product: MSL6000 Series<br />
OS Device Name: /devices/pci@8,600000/SUNW,qlc@1/fp@0,0/sgen@w100000e00216aef3,0<br />
LUN: 1<br />
Vendor: HP<br />
Product: Ultrium 2-SCSI<br />
OS Device Name: /dev/rmt/2n<br />
Remote Port WWN: 50001fe15003b384<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 50001fe15037e759<br />
Link Error Statistics:<br />
Link Failure Count: 0<br />
Loss of Sync Count: 0<br />
Loss of Signal Count: 0<br />
Primitive Seq Protocol Error Count: 0<br />
Invalid Tx Word Count: 0<br />
Invalid CRC Count: 0<br />
LUN: 0<br />
Vendor: COMPAQ<br />
Product: HSV111 (C)COMPAQ<br />
OS Device Name: Unknown<br />
LUN: 1<br />
Vendor: COMPAQ<br />
Product: HSV111 (C)COMPAQ<br />
OS Device Name: /dev/rdsk/c5t600508B4001031250000900000540000d0s2<br />
Remote Port WWN: 100000e0022744f3<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 100000e0020744f3<br />
Link Error Statistics:<br />
Link Failure Count: 0<br />
Loss of Sync Count: 0<br />
Loss of Signal Count: 0<br />
Primitive Seq Protocol Error Count: 0<br />
Invalid Tx Word Count: 0<br />
Invalid CRC Count: 0<br />
LUN: 0<br />
Vendor: HP<br />
Product: MSL6000 Series<br />
OS Device Name: /devices/pci@8,600000/SUNW,qlc@1/fp@0,0/sgen@w100000e0022744f3,0<br />
LUN: 1<br />
Vendor: HP<br />
Product: Ultrium 2-SCSI<br />
OS Device Name: /dev/rmt/1n<br />
LUN: 2<br />
Vendor: HP<br />
Product: Ultrium 2-SCSI<br />
OS Device Name: /dev/rmt/0n<br />
Remote Port WWN: 50001fe150216de9<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 50001fe11025bb53<br />
Link Error Statistics:<br />
Link Failure Count: 0<br />
Loss of Sync Count: 0<br />
Loss of Signal Count: 0<br />
Primitive Seq Protocol Error Count: 0<br />
Invalid Tx Word Count: 0<br />
Invalid CRC Count: 0<br />
LUN: 0<br />
Vendor: COMPAQ<br />
Product: HSV111 (C)COMPAQ<br />
OS Device Name: Unknown<br />
LUN: 1<br />
Vendor: COMPAQ<br />
Product: HSV111 (C)COMPAQ<br />
OS Device Name: /dev/rdsk/c5t600508B400011C370000C00003210000d0s2<br />
Remote Port WWN: 100000e00228f492<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 100000e00208f492<br />
Link Error Statistics:<br />
Link Failure Count: 0<br />
Loss of Sync Count: 0<br />
Loss of Signal Count: 0<br />
Primitive Seq Protocol Error Count: 0<br />
Invalid Tx Word Count: 0<br />
Invalid CRC Count: 0<br />
LUN: 0<br />
Vendor: HP<br />
Product: Ultrium 2-SCSI<br />
OS Device Name: /dev/rmt/4n<br />
LUN: 1<br />
Vendor: HP<br />
Product: Ultrium 2-SCSI<br />
OS Device Name: /dev/rmt/3n<br />
Remote Port WWN: 50001fe15076b59b<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 50001fe15037e759<br />
Link Error Statistics:<br />
Link Failure Count: 0<br />
Loss of Sync Count: 0<br />
Loss of Signal Count: 0<br />
Primitive Seq Protocol Error Count: 0<br />
Invalid Tx Word Count: 0<br />
Invalid CRC Count: 0<br />
LUN: 0<br />
Vendor: COMPAQ<br />
Product: HSV111 (C)COMPAQ<br />
OS Device Name: Unknown<br />
LUN: 1<br />
Vendor: COMPAQ<br />
Product: HSV111 (C)COMPAQ<br />
OS Device Name: /dev/rdsk/c5t600508B4001031250000900000540000d0s2<br />
Remote Port WWN: 50001fe150216ded<br />
Active FC4 Types: SCSI<br />
SCSI Target: yes<br />
Node WWN: 50001fe11025bb53<br />
Link Error Statistics:<br />
Link Failure Count: 0<br />
Loss of Sync Count: 0<br />
Loss of Signal Count: 0<br />
Primitive Seq Protocol Error Count: 0<br />
Invalid Tx Word Count: 0<br />
Invalid CRC Count: 0<br />
LUN: 0<br />
Vendor: COMPAQ<br />
Product: HSV111 (C)COMPAQ<br />
OS Device Name: Unknown<br />
LUN: 1<br />
Vendor: COMPAQ<br />
Product: HSV111 (C)COMPAQ<br />
OS Device Name: /dev/rdsk/c5t600508B400011C370000C00003210000d0s2</code></p>
<p>This command is quite handy when troubleshooting fibre channel. Very cool&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2008/08/19/gathering-fibre-channel-info-using-fcinfo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving LUN&#039;s between hosts using metarecover</title>
		<link>http://www.unixpowered.com/blog/2008/04/02/moving-luns-between-hosts-using-metarecover/</link>
		<comments>http://www.unixpowered.com/blog/2008/04/02/moving-luns-between-hosts-using-metarecover/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 07:11:32 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[san]]></category>
		<category><![CDATA[solaris tips]]></category>
		<category><![CDATA[solaris utilities]]></category>
		<category><![CDATA[solaris volume manager]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://wayciak.wordpress.com/?p=11</guid>
		<description><![CDATA[Sometimes you might need to move a LUN between hosts X and Y on a SAN. Solaris has cool command, metarecover, that lets you do just that. First, you will need to stop all processes on X that might be using the given LUN. Then unmount the LUN and present it to the host Y. [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you might need to move a LUN between hosts X and Y on a SAN. Solaris has cool command, <em>metarecover</em>, that lets you do just that. First, you will need to stop all processes on X that might be using the given LUN. Then unmount the LUN and present it to the host Y. Now you can use <em>metarecover</em> to recover metadevice information from the LUN. Couple of things to remember:</p>
<p>There is <em>-n</em> switch that will cause dry run, i.e. <em>metarecover</em> will output what it would do &#8211; it will not actually perform recovery operation. Also, be careful about metadevice names on host Y and the ones you are trying to recover. I have not tried it so I am not sure what would happen. It would probably bomb out. You could use <em>metarename</em> to rename Y&#8217;s existing metadevices and try to eliminate possible conflict before recovery.</p>
<p><code>root@ultra# <strong>metarecover -v c3t600508B400011C370000C00002970000d0s2 -p -d</strong><br />
Verifying on-disk structures on<br />
c3t600508B400011C370000C00002970000d0s2.<br />
The following extent headers were found on<br />
c3t600508B400011C370000C00002970000d0s2.<br />
Name  Seq#    Type               Offset<br />
Length<br />
d100     0   ALLOC            205635593<br />
25165825<br />
d110     0   ALLOC                16384<br />
32769<br />
d120     0   ALLOC                49153<br />
32769<br />
d130     0   ALLOC                81922<br />
32769<br />
d140     0   ALLOC               114691<br />
41943041<br />
d150     0   ALLOC             42057732<br />
146800641<br />
d160     0   ALLOC            188858373<br />
2097153<br />
d170     0   ALLOC            190955526<br />
6291457<br />
d180     0   ALLOC            197246983<br />
6291457<br />
d190     0   ALLOC            203538440<br />
2097153<br />
NONE     0     END            251609087<br />
1<br />
NONE     0    FREE            230801418<br />
20807669<br />
Found 10 soft partition(s) on c3t600508B400011C370000C00002970000d0s2.<br />
Checking sequence numbers.<br />
mp-&gt;c.un_type: 5<br />
mp-&gt;c.un_size: 136<br />
mp-&gt;c.un_self_id: 100<br />
mp-&gt;un_status: 5<br />
mp-&gt;un_numexts: 1<br />
mp-&gt;un_length: 25165824<br />
mp-&gt;un_dev: 30933010<br />
mp-&gt;un_key: 43<br />
Ext#    voff            poff            Len<br />
0       0               205635594               25165824<br />
mp-&gt;c.un_type: 5<br />
mp-&gt;c.un_size: 136<br />
mp-&gt;c.un_self_id: 110<br />
mp-&gt;un_status: 5<br />
mp-&gt;un_numexts: 1<br />
mp-&gt;un_length: 32768<br />
mp-&gt;un_dev: 30933010<br />
mp-&gt;un_key: 43<br />
Ext#    voff            poff            Len<br />
0       0               16385           32768<br />
mp-&gt;c.un_type: 5<br />
mp-&gt;c.un_size: 136<br />
mp-&gt;c.un_self_id: 120<br />
mp-&gt;un_status: 5<br />
mp-&gt;un_numexts: 1<br />
mp-&gt;un_length: 32768<br />
mp-&gt;un_dev: 30933010<br />
mp-&gt;un_key: 43<br />
Ext#    voff            poff            Len<br />
0       0               49154           32768<br />
mp-&gt;c.un_type: 5<br />
mp-&gt;c.un_size: 136<br />
mp-&gt;c.un_self_id: 130<br />
mp-&gt;un_status: 5<br />
mp-&gt;un_numexts: 1<br />
mp-&gt;un_length: 32768<br />
mp-&gt;un_dev: 30933010<br />
mp-&gt;un_key: 43<br />
Ext#    voff            poff            Len<br />
0       0               81923           32768<br />
mp-&gt;c.un_type: 5<br />
mp-&gt;c.un_size: 136<br />
mp-&gt;c.un_self_id: 140<br />
mp-&gt;un_status: 5<br />
mp-&gt;un_numexts: 1<br />
mp-&gt;un_length: 41943040<br />
mp-&gt;un_dev: 30933010<br />
mp-&gt;un_key: 43<br />
Ext#    voff            poff            Len<br />
0       0               114692          41943040<br />
mp-&gt;c.un_type: 5<br />
mp-&gt;c.un_size: 136<br />
mp-&gt;c.un_self_id: 150<br />
mp-&gt;un_status: 5<br />
mp-&gt;un_numexts: 1<br />
mp-&gt;un_length: 146800640<br />
mp-&gt;un_dev: 30933010<br />
mp-&gt;un_key: 43<br />
Ext#    voff            poff            Len<br />
0       0               42057733                146800640<br />
mp-&gt;c.un_type: 5<br />
mp-&gt;c.un_size: 136<br />
mp-&gt;c.un_self_id: 160<br />
mp-&gt;un_status: 5<br />
mp-&gt;un_numexts: 1<br />
mp-&gt;un_length: 2097152<br />
mp-&gt;un_dev: 30933010<br />
mp-&gt;un_key: 43<br />
Ext#    voff            poff            Len<br />
0       0               188858374               2097152<br />
mp-&gt;c.un_type: 5<br />
mp-&gt;c.un_size: 136<br />
mp-&gt;c.un_self_id: 170<br />
mp-&gt;un_status: 5<br />
mp-&gt;un_numexts: 1<br />
mp-&gt;un_length: 6291456<br />
mp-&gt;un_dev: 30933010<br />
mp-&gt;un_key: 43<br />
Ext#    voff            poff            Len<br />
0       0               190955527               6291456<br />
mp-&gt;c.un_type: 5<br />
mp-&gt;c.un_size: 136<br />
mp-&gt;c.un_self_id: 180<br />
mp-&gt;un_status: 5<br />
mp-&gt;un_numexts: 1<br />
mp-&gt;un_length: 6291456<br />
mp-&gt;un_dev: 30933010<br />
mp-&gt;un_key: 43<br />
Ext#    voff            poff            Len<br />
0       0               197246984               6291456<br />
mp-&gt;c.un_type: 5<br />
mp-&gt;c.un_size: 136<br />
mp-&gt;c.un_self_id: 190<br />
mp-&gt;un_status: 5<br />
mp-&gt;un_numexts: 1<br />
mp-&gt;un_length: 2097152<br />
mp-&gt;un_dev: 30933010<br />
mp-&gt;un_key: 43<br />
Ext#    voff            poff            Len<br />
0       0               203538441               2097152<br />
The following soft partitions were found and will be added to<br />
your metadevice configuration.<br />
Name            Size     No. of Extents<br />
d100        25165824         1<br />
d110           32768         1<br />
d120 32768         1<br />
d130 32768         1<br />
d140 41943040         1<br />
d150 146800640         1<br />
d160         2097152         1<br />
d170         6291456         1<br />
d180         6291456         1<br />
d190         2097152         1<br />
WARNING: You are about to add one or more soft partition<br />
metadevices to your metadevice configuration.  If there<br />
appears to be an error in the soft partition(s) displayed<br />
above, do NOT proceed with this recovery operation.<br />
Are you sure you want to do this (yes/no)? yes<br />
c3t600508B400011C370000C00002970000d0s2: Soft Partitions recovered<br />
from device.<br />
root@ultra# </code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2008/04/02/moving-luns-between-hosts-using-metarecover/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
