<?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; storage</title>
	<atom:link href="http://www.unixpowered.com/blog/category/storage/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>Quick and dirty SVM cheatsheet</title>
		<link>http://www.unixpowered.com/blog/2009/12/03/quick-and-dirty-svm-cheatsheet/</link>
		<comments>http://www.unixpowered.com/blog/2009/12/03/quick-and-dirty-svm-cheatsheet/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 12:50:43 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris utilities]]></category>
		<category><![CDATA[solaris volume manager]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://www.unixpowered.com/blog/?p=372</guid>
		<description><![CDATA[This list focuses mostly on mirror operations. I use Solaris Volume Manager quite a bit when mirroring internal drives. There are tons of additional features and commands, if you use SVM for  things other than mirroring. In that case you might want to look at check out Solaris Volume Manager Administration Guide.
Create database replicas:
metadb -f [...]]]></description>
			<content:encoded><![CDATA[<p>This list focuses mostly on mirror operations. I use Solaris Volume Manager quite a bit when mirroring internal drives. There are tons of additional features and commands, if you use SVM for  things other than mirroring. In that case you might want to look at check out <a title="Solaris Volume Manager Administration Guide" href="http://docs.sun.com/app/docs/doc/816-4520?l=en" target="_self">Solaris Volume Manager Administration Guide</a>.</p>
<p>Create database replicas:<br />
<code>metadb -f -a -c [number_of_replicas] [device]<br />
<strong>metadb -f -a -c 3 c0t0d0s7</strong></code></p>
<p>Delete all database replicas from device:<br />
<code>metadb -d [device]<br />
<strong>metadb -d c0t0d0s7</strong></code></p>
<p>Display status of database replicas:<br />
<code>metadb -i<br />
<strong>metadb -i</strong></code></p>
<p>Display metadevice status:<br />
<code>metastat<br />
<strong>metastat</strong></code></p>
<p>Create simple concat/stripe metadevice:<br />
<code>metainit -f [concat_metadevice] 1 1 [device]<br />
<strong>metainit -f d21 1 1 c0t0d0s1</strong></code></p>
<p>Create a mirror with one submirror:<br />
<code>metainit [mirror_metadevice] -m [submirror_metadevice]<br />
<strong>metainit d20 -m d21</strong></code></p>
<p>Attach a submirror to one sided mirror:<br />
<code>metattach [mirror_metadevice] [submirror_metadevice]<br />
<strong>metattach d20 d22</strong></code></p>
<p>Detach a submirror from a mirror:<br />
<code>metadetach [mirror_metadevice] [submirror_metadevice]<br />
<strong>metadetach d20 d22</strong></code></p>
<p>Clear a metadevice:<br />
<code>metaclear [metadevice]<br />
<strong>metaclear d22</strong></code></p>
<p>Offline a submirror:<br />
<code>metaoffline [mirror_metadevice] [submirror_metadevice]<br />
<strong>metaoffline d20 d22</strong></code></p>
<p>Online a submirror:<br />
<code>metaonline [mirror_metadevice] [submirror_metadevice]<br />
<strong>metaonline d20 d22</strong></code></p>
<p>Enable a failed component:<br />
<code>metareplace -e [metadevice] [device]<br />
<strong>metareplace -e d21 c0t0d0s1</strong></code></p>
<p>Rename a metadevice:<br />
<code>metarename [old_metadevice] [new_metadevice]<br />
<strong>metarename d20 d30</strong></code></p>
<p>Switch metadevice names:<br />
<code>metarename [metadevice_1] [metadevice_2]<br />
<strong>metarename -x d20 d30</strong></code></p>
<p>Configure system for root metadevice:<br />
<code>metaroot [metadevice]<br />
<strong>metaroot d10</strong></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2009/12/03/quick-and-dirty-svm-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>Quick and dirty ZFS cheatsheet</title>
		<link>http://www.unixpowered.com/blog/2008/12/20/quick-and-dirty-zfs-cheatsheet/</link>
		<comments>http://www.unixpowered.com/blog/2008/12/20/quick-and-dirty-zfs-cheatsheet/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 15:53:38 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris utilities]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://wayciak.wordpress.com/?p=104</guid>
		<description><![CDATA[Create simple striped pool:
zpool create [pool_name] [device] [device] ...
zpool create datapool c5t433127A900011C370000C00003210000d0 c5t433127B4001031250000900000540000d0
Create mirrored pool:
zpool create [pool_name] mirror [device] [device] ...
zpool create datapool mirror c5t433127A900011C370000C00003210000d0 c5t433127B4001031250000900000540000d0
Create Raid-Z pool:
zpool create [pool_name] raidz [device] [device] [device] ...
zpool create datapool raidz c5t433127A900011C370000C00003210000d0 c5t433127B4001031250000900000540000d0 c5t439257C4000019250000900000540000d0
Transform simple pool to a mirror:
zpool create [pool_name] [device]
zpool attach [pool_name] [existing_device] [new_device]
zpool create datapool [...]]]></description>
			<content:encoded><![CDATA[<p>Create simple striped pool:<br />
<code>zpool create [pool_name] [device] [device] ...<br />
<strong>zpool create datapool c5t433127A900011C370000C00003210000d0 c5t433127B4001031250000900000540000d0</strong></code></p>
<p>Create mirrored pool:<br />
<code>zpool create [pool_name] mirror [device] [device] ...<br />
<strong>zpool create datapool mirror c5t433127A900011C370000C00003210000d0 c5t433127B4001031250000900000540000d0</strong></code></p>
<p>Create Raid-Z pool:<br />
<code>zpool create [pool_name] raidz [device] [device] [device] ...<br />
<strong>zpool create datapool raidz c5t433127A900011C370000C00003210000d0 c5t433127B4001031250000900000540000d0 c5t439257C4000019250000900000540000d0</strong></code></p>
<p>Transform simple pool to a mirror:<br />
<code>zpool create [pool_name] [device]<br />
zpool attach [pool_name] [existing_device] [new_device]<br />
<strong>zpool create datapool c5t433127A900011C370000C00003210000d0<br />
zpool attach datapool c5t433127A900011C370000C00003210000d0 c5t433127B4001031250000900000540000d0</strong></code></p>
<p>Expand simple pool:<br />
<code>zpool create [pool_name] [device]<br />
zpool add [pool_name] [new_device]<br />
<strong>zpool create datapool c5t433127A900011C370000C00003210000d0<br />
zpool add datapool c5t433127B4001031250000900000540000d0</strong></code></p>
<p>Expand mirrored pool by attaching additional mirror:<br />
<code>zpool add [pool_name] mirror [new_device] [new_device]<br />
<strong>zpool add datapool mirror c5t433127A900011C370000C00003460000d0 c5t433127B400011C370000C00003410000d0</strong></code></p>
<p>Replace device in a pool:<br />
<code>zpool replace [pool_name] [old_device] [new_device]<br />
<strong>zpool replace datapool c5t433127A900011C370000C00003410000d0 c5t433127B4001031250000900000540000d0</strong></code></p>
<p>Destroy pool:<br />
<code>zpool destroy [pool_name]<br />
<strong>zpool destroy datapool</strong></code></p>
<p>Set pool mountpoint:<br />
<code>zfs set mountpoint=/path [pool_name]<br />
<strong>zfs set mountpoint=/export/zfs datapool</strong></code></p>
<p>Display configured pools:<br />
<code>zpool list<br />
<strong>zpool list</strong></code></p>
<p>Display pool status info:<br />
<code>zpool status [-v] [pool_name]<br />
<strong>zpool status -v datapool</strong></code></p>
<p>Display pool I/O statistics:<br />
<code>zpool iostat [pool_name]<br />
<strong>zpool iostat datapool</strong></code></p>
<p>Display pool command history:<br />
<code>zpool history [pool_name]<br />
<strong>zpool history datapool</strong></code></p>
<p>Export a pool:<br />
<code>zpool export [pool_name]<br />
<strong>zpool export datapool</strong></code></p>
<p>Import a pool:<br />
<code>zpool import [pool_name]<br />
<strong>zpool import datapool</strong></code></p>
<p>Create a filesystem:<br />
<code>zfs create [pool_name]/[fs_name]<br />
<strong>zfs create datapool/filesystem</strong></code></p>
<p>Destroy a filesystem:<br />
<code>zfs destroy [pool_name]/[fs_name]<br />
<strong>zfs destroy datapool/filesystem</strong></code></p>
<p>Rename a filesystem:<br />
<code>zfs rename [pool_name]/[fs_name] [pool_name]/[fs_name]<br />
<strong>zfs rename datapool/filesystem datapool/newfilesystem</strong></code></p>
<p>Move a filesystem:<br />
<code>zfs rename [pool_name]/[fs_name] [pool_name]/[fs_name]/[fs_name]<br />
<strong>zfs rename datapool/filesystem datapool/users/filesystem</strong></code></p>
<p>Display properties of a filesystem:<br />
<code>zfs get all [pool_name]/[fs_name]<br />
<strong>zfs get all datapool/filesystem</strong></code></p>
<p>Make a snapshot:<br />
<code>zfs snapshot [pool_name]/[fs_name]@[time]<br />
<strong>zfs snapshot datapool/filesystem@friday</strong></code></p>
<p>Roll back filesystem to its snapshot:<br />
<code>zfs rollback [pool_name]/[fs_name]@[time]<br />
<strong>zfs rollback datapool/filesystem@friday</strong></code></p>
<p>Clone a filesystem:<br />
<code>zfs snapshot [pool_name]/[fs_name]@[time]<br />
zfs clone [pool_name]/[fs_name]@[time] [pool_name]/[fs_name]<br />
<strong>zfs snapshot datapool/filesystem@today<br />
zfs clone datapool/filesystem@today datapool/filesystemclone</strong></code></p>
<p>Backup filesystem to a file:<br />
<code>zfs send [pool_name]/[fs_name] &gt; /path/to/file<br />
<strong>zfs send datapool/filesystem@friday &gt; /tmp/filesystem.bkp</strong></code></p>
<p>Restore filesystem from a file:<br />
<code>zfs receive [pool_name]/[fs_name] &lt; /path/to/file<br />
<strong>zfs receive datapool/restoredfilesystem &lt; /tmp/filesystem.bkp</strong></code></p>
<p>Create ZFS volume:<br />
<code>zfs create -V [size] [pool_name]/[vol_name]<br />
<strong>zfs create -V 100mb datapool/zvolume<br />
newfs /dev/zvol/dsk/datapool/zvolume</strong></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2008/12/20/quick-and-dirty-zfs-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>0</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>Mirroring root disk using SVM</title>
		<link>http://www.unixpowered.com/blog/2008/07/02/mirroring-root-disk-using-svm/</link>
		<comments>http://www.unixpowered.com/blog/2008/07/02/mirroring-root-disk-using-svm/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 19:39:37 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[openboot]]></category>
		<category><![CDATA[solaris]]></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=25</guid>
		<description><![CDATA[There are about 487359 documents on the Internet about how to mirror root disk in Solaris. So, here is 487360th.
The assumptions are following: the first disk has Solaris already installed, root slice is slice 1, and the disks are identical with the same size and geometry. If they have different cylinder, head, sector count or [...]]]></description>
			<content:encoded><![CDATA[<p>There are about 487359 documents on the Internet about how to mirror root disk in Solaris. So, here is 487360th.</p>
<p>The assumptions are following: the first disk has Solaris already installed, root slice is slice 1, and the disks are identical with the same size and geometry. If they have different cylinder, head, sector count or different size you will have to fiddle with sizing slices more.</p>
<p>The first step is to recreate the same slice arrangement on the second disk:</p>
<p><code>bash-3.00# <strong>prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2</strong><br />
fmthard:  New volume table of contents now in place.</code></p>
<p>You can check both disks have the same <acronym title="Volume Table of Contents">VTOC</acronym> using <em>prtvtoc</em> command</p>
<p><code>bash-3.00# <strong>prtvtoc /dev/rdsk/c1t0d0s2</strong><br />
* /dev/rdsk/c1t0d0s2 partition map<br />
*<br />
* Dimensions:<br />
*     512 bytes/sector<br />
*     424 sectors/track<br />
*      24 tracks/cylinder<br />
*   10176 sectors/cylinder<br />
*   14089 cylinders<br />
*   14087 accessible cylinders<br />
*<br />
* Flags:<br />
*   1: unmountable<br />
*  10: read-only<br />
*<br />
*                          First     Sector    Last<br />
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory<br />
0      3    01          0   4100928   4100927<br />
1      2    00    4100928  20484288  24585215<br />
2      5    00          0 143349312 143349311<br />
3      8    00   24585216 118672512 143257727<br />
7      0    00  143257728     91584 143349311</code></p>
<p>Now we have to create state database replicas on slice 7. We will be adding two replicas to each slice:</p>
<p><code>bash-3.00# <strong>metadb -a -f -c3 /dev/dsk/c1t0d0s7</strong><br />
bash-3.00# <strong>metadb -a -f -c3 /dev/dsk/c1t1d0s7</strong></code></p>
<p>Database replicas are crucial part of <acronym title="Solaris Volume Manager">SVM</acronym>. <a title="State Database Overview" href="http://docs.sun.com/app/docs/doc/816-4520/about-state-db-replicas-1?a=view" target="_self">Here</a> is some important information about how they work, how many you need, etc.</p>
<p>Since the database replicas are in place we can start creating metadevices. The following commands will create metadevice <em>d31</em> from slice <em>c1t0d0s3</em>, and metadevice <em>d32</em> from slice <em>c1t1d0s3</em>. Then we create mirror <em>d30</em> with <em>d31</em> attached as a submirror. Finally we will attach submirror <em>d32</em> to mirror <em>d30</em>. Once <em>d32</em> is attached, the mirror <em>d30</em> will automatically start syncing.</p>
<p><code>bash-3.00# <strong>metainit -f d31 1 1 c1t0d0s3</strong><br />
d31: Concat/Stripe is setup<br />
bash-3.00# <strong>metainit -f d32 1 1 c1t1d0s3</strong><br />
d32: Concat/Stripe is setup<br />
bash-3.00# <strong>metainit d30 -m d31</strong><br />
d30: Mirror is setup<br />
bash-3.00# <strong>metattach d30 d32</strong><br />
d30: submirror d32 is attached</code></p>
<p>The procedure is the same for all other mirrors you might want to create. Root filesystem is slightly different. First you will have to create your submirrors. Then you will have to attach submirror with existing root filesystem, in this case <em>d11, </em>to the new mirror metadevice <em>d10</em>. Then you will have to run <em>metaroot</em> command. It will alter <em>/</em> entry in <em>/etc/vfstab</em>. Finally, you flush the filesystem using <em>lockfs</em> command and reboot.</p>
<p><code>bash-3.00# <strong>metainit -f d11 1 1 c1t0d0s1</strong><br />
d31: Concat/Stripe is setup<br />
bash-3.00# <strong>metainit -f d12 1 1 c1t1d0s1</strong><br />
d32: Concat/Stripe is setup<br />
bash-3.00# <strong>metainit d10 -m d11</strong><br />
d30: Mirror is setup<br />
bash-3.00# <strong>metaroot d10</strong><br />
bash-3.00# <strong>lockfs -fa</strong><br />
bash-3.00# <strong>reboot</strong></code></p>
<p>When the system reboots, you can attach the second submirror to <em>d10</em> as follows:</p>
<p><code>bash-3.00# <strong>metattach d10 d12</strong></code></p>
<p>You can check the sync progress using <em>metastat</em> command. Once all mirrors are synced up the next step is to configure the new swap metadevice, in my case <em>d0</em>, to be crash dump device. This is done using <em>dumpadm</em> command:</p>
<p><code>bash-3.00# <strong>dumpadm</strong><br />
Dump content: kernel pages<br />
Dump device: /dev/dsk/c1t0d0s0 (dedicated)<br />
Savecore directory: /var/crash/ultra<br />
Savecore enabled: yes<br />
bash-3.00# <strong>dumpadm -d /dev/md/dsk/d0</strong></code></p>
<p>The final step is to modify PROM. First we need to find out which two physical devices <em>c1t0d0</em> and <em>c1t1d0</em> refer to:</p>
<p><code>bash-3.00# <strong>ls -l /dev/dsk/c1t0d0s1</strong><br />
lrwxrwxrwx   1 root     root          43 Mar  4 14:38 /dev/dsk/c1t0d0s1 -&gt; ../../devices/pci@1c,600000/scsi@2/sd@0,0:b<br />
bash-3.00# <strong>ls -l /dev/dsk/c1t1d0s1</strong><br />
lrwxrwxrwx   1 root     root          43 Mar  4 14:38 /dev/dsk/c1t1d0s1 -&gt; ../../devices/pci@1c,600000/scsi@2/sd@1,0:b</code></p>
<p>The physical device path is everything starting from <em>/pci&#8230;</em>. Please make a note of <em>sd</em> towards the end of the device string. When creating device aliases below, <em>sd</em> will have to be changed to <em>disk</em>.</p>
<p>Now we create two device aliases called <em>root</em> and <em>backup_root</em>. Then we set <em>boot-device</em> to be <em>root</em> and <em>backup_root</em>. The <em>:b</em> refers to slice 1(root) on that particular disk.</p>
<p><code>bash-3.00# <strong>eeprom "use-nvramrc?=true"</strong><br />
bash-3.00# <strong>eeprom "nvramrc=devalias root /pci@1c,600000/scsi@2/disk@0,0 devalias backup_root /pci@1c,600000/scsi@2/disk@1,0"</strong><br />
bash-3.00# <strong>eeprom "boot-device=root:b backup_root:b net"</strong></code></p>
<p>Now we can test that the system boot from both <em>root</em> and <em>backup_root</em> devices.</p>
<p>There is one more optional step. Adding two kernel tunables to <em>/etc/system</em> file. The first one is <em>md_mirror:md_resync_bufsz</em> which will speed up mirror resync. The second one is <em>md:mirrored_root_flag</em>. When this flag is enabled the system will boot even if less than majority of database replicas is available. Personally, I do not use the second tunable. More on these can be found in <a title="Solaris Tunable Parameters Refernce Guide" href="http://docs.sun.com/app/docs/doc/817-0404/chapter2-156?l=ru&amp;a=view" target="_self">Solaris Tunable Parameters Reference Guide</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2008/07/02/mirroring-root-disk-using-svm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving boot disk to a different target or controller</title>
		<link>http://www.unixpowered.com/blog/2008/06/18/moving-boot-disk-to-a-different-target-or-controller/</link>
		<comments>http://www.unixpowered.com/blog/2008/06/18/moving-boot-disk-to-a-different-target-or-controller/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 18:11:07 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<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=37</guid>
		<description><![CDATA[I had a need for a system that can boot two different versions of Solaris from two different disks. Both disks were on target 0 when Solaris was installed on them. But when I moved one of the disks to be target 1, obviously there was going to be a problem with booting from that [...]]]></description>
			<content:encoded><![CDATA[<p>I had a need for a system that can boot two different versions of Solaris from two different disks. Both disks were on <em>target 0</em> when Solaris was installed on them. But when I moved one of the disks to be <em>target 1</em>, obviously there was going to be a problem with booting from that disk.</p>
<p>There is a simple way to get the disk booting from the new target. Here are the steps to take:</p>
<ol>
<li>Boot the system off a DVD or CD or jumpstart server in single user mode</li>
<li>Mount the root filesystem on the disk in question and edit <em>vfstab</em> to reflect the new controller/target setup</li>
</ol>
<p>The last step is to regenerate <em>/etc/path_to_inst</em> and device links in <em>/dev</em>. Searching the internet for some unrelated info I found out <em>devfsadm</em> has an undocumented <em>-p</em> switch that recreates <em>path_to_inst</em> file. The <em>-r</em> switch specifies location of root filesystem.</p>
<p><code>bash-3.00# <strong>devfsadm -r /mnt -p /mnt/etc/path_to_inst</strong></code></p>
<p>Now you can reboot and the drive should be bootable again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2008/06/18/moving-boot-disk-to-a-different-target-or-controller/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 -->
