<?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>Running Systems&#187; storage device</title>
	<atom:link href="http://run.tournament.org.il/tag/storage-device/feed/" rel="self" type="application/rss+xml" />
	<link>http://run.tournament.org.il</link>
	<description>(and me chasing them)</description>
	<lastBuildDate>Wed, 02 Jun 2010 13:50:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>NetApp SnapMirror monitor script</title>
		<link>http://run.tournament.org.il/netapp-snapmirror-monitor-script/</link>
		<comments>http://run.tournament.org.il/netapp-snapmirror-monitor-script/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 09:02:18 +0000</pubDate>
		<dc:creator>ez-aton</dc:creator>
				<category><![CDATA[Disk Storage]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bandwidth limits]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[netapp]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[storage device]]></category>

		<guid isPermaLink="false">http://run.tournament.org.il/?p=499</guid>
		<description><![CDATA[I have had some work done lately with NetApp SnapMirror. I have snapped-mirrored some volumes and qtrees and I wanted to monitor their use and behavior over the line.
As you can expect, site-to-site replication of data is a fragile thing, especially when done on the level of the storage device, which is agnostic to the [...]


Related posts:<ol><li><a href='http://run.tournament.org.il/citrix-xenserver-5-0-cannot-cooperate-with-netapp-snapmirror/' rel='bookmark' title='Permanent Link: Citrix XenServer 5.0 cannot cooperate with NetApp SnapMirror'>Citrix XenServer 5.0 cannot cooperate with NetApp SnapMirror</a> <small>It has been a long while, I know. I was...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I have had some work done lately with NetApp SnapMirror. I have snapped-mirrored some volumes and qtrees and I wanted to monitor their use and behavior over the line.</p>
<p>As you can expect, site-to-site replication of data is a fragile thing, especially when done on the level of the storage device, which is agnostic to the data kept on it. When replicating volumes, I should expect the relevant employees to be responsible regarding what&#8217;s placed there, because the storage does not filter out the junk. If someone had decided to add a new DVD image on the DB storage space, well &#8211; the DB won&#8217;t care, as long as there is enough free space, but the storage will attempt to replicate the added data to the alternate site, which means that if you are around your bandwidth limits, which is never a good thing, you will just create a delay gap you would hardly (if at all) be able to close.</p>
<p>For that, and since I don&#8217;t tend to trust people not to do stupid things, I have written this script.</p>
<p><span style="text-decoration: underline;">What does it do?</span></p>
<p>This script will perform the following:</p>
<p><strong>Alerting about non-idle SnapMirror session</strong></p>
<p>Use with &#8216;-m alert&#8217;</p>
<p>Assuming SnapMirror is scheduled to a specific time, the script will alert if a session is active. With the flag &#8216;-a no&#8217;, it will not send an e-mail (if possible, see the configuration section below). With &#8216;-r yes&#8217;, it will react, setting throttle for each non-idle session, but then &#8216;-t VALUE&#8217; should be specified, where VALUE is the numeric throttle in KB/s.</p>
<p><strong>Limiting throttle to a SnapMirror session</strong></p>
<p>Use with &#8216;-m throttle_limit&#8217;</p>
<p>The script will set a throttle for SnapMirror session(s). Setting limit by the flag &#8216;-t VALUE&#8217;, where VALUE is the numeric throttle in KB/s per each session.</p>
<p><strong>Cancelling throttle limit</strong></p>
<p>Use with &#8216;-m throttle_unlimit&#8217;</p>
<p>The script will set unlimited throttle for SnapMirror session(s).</p>
<p><strong>Checking SnapMirror lag</strong></p>
<p>Use with the &#8216;-m check_lag&#8217;</p>
<p>Since replication has a purpose of recovering, the lag of each SnapMirror session would show how far back we are. Use with &#8216;-d VALUE&#8217;, VALUE being numeric time in minutes to set alert threshold. The default threshold delay is one day (1440 minutes).</p>
<p><strong>Checking snapshots size</strong></p>
<p>Use with the &#8216;-m check_size&#8217;</p>
<p>This reports the expected delta to transfer. This can help estimate the success or failure of a future sync of data (snapmirror update) before it begins. Use with &#8216;-l&#8217; flag to set it to log date/time of measure and the expected sizes into a file. By default, in /tmp/target_name.txt, where the target is the SnapMirror target.</p>
<p><strong>General Options</strong></p>
<p>Use with &#8216;-c filename&#8217; for alternate configuration file.</p>
<p>Use with &#8216;-h&#8217; to get general help.</p>
<p>Use with a list target names in the format of storage:/vol/volname/qtree or storage:volname to ignore targets in configuration file and use your own.</p>
<p><strong>Configuration File</strong></p>
<p>The configuration file is rather simple. By default it should be called &#8220;<em>/etc/snapmirror_monitor.conf</em>&#8220;. It consists of two main variables for the system:</p>
<blockquote><p>TGTS=&#8221;storage2:/vol/volname/qtree</p>
<p>storage3:volname2</p>
<p>storage1:/vol/volnew/qtr2&#8243;</p>
<p>EMAIL=&#8221;user@domain.com another_user@domain.com&#8221;</p></blockquote>
<p><strong>Prerequisites</strong></p>
<p>This script will run on any modern Linux machine. For it to communicate with the NetApp devices, you will need SSH enabled on the NetApps, and ssh key exchange so that the Linux would be able to access the NetApp without using passwords.</p>
<p><span style="text-decoration: underline;">The Script</span></p>
<p>Below is the script. You can download it and use it as you like.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://run.tournament.org.il/wp-content/plugins/wp-codebox/wp-codebox.php?p=499&amp;download=snapshot_mirror.sh">snapshot_mirror.sh</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4992"><td class="code" id="p499code2"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;"># This script will monitor snapmirror status</span>
<span style="color: #666666; font-style: italic;"># Assumption: Access through ssh to root on all storage devices involved</span>
<span style="color: #666666; font-style: italic;"># This will also attempt to detect the diff which is to sync</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Written by Ez-Aton. Check http://run.tournament.org.il for updates or</span>
<span style="color: #666666; font-style: italic;"># additional information</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Modes: </span>
<span style="color: #666666; font-style: italic;"># alert -&gt; alert if snapmirror is still active</span>
<span style="color: #666666; font-style: italic;"># throttle_limit -&gt; Limit throttle to a given number (default or manually set)</span>
<span style="color: #666666; font-style: italic;"># throttle_unlimit -&gt; Open throttle limitation</span>
<span style="color: #666666; font-style: italic;"># check_lag -&gt; Report the snapmirror lage</span>
<span style="color: #666666; font-style: italic;"># check_size -&gt; Report the estimated data size to move</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Global variables</span>
<span style="color: #007800;">CONF</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>snapmirror_monitor.conf
<span style="color: #007800;">LOG_PREFIX</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp
&nbsp;
test_connection <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #666666; font-style: italic;"># Test to see that you can access the storage device</span>
        <span style="color: #666666; font-style: italic;"># Arguments: NetApp name</span>
        <span style="color: #007800;">SSH_OPTS</span>=<span style="color: #ff0000;">&quot;-o ConnectTimeout=2&quot;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #007800;">$SSH_OPTS</span> <span style="color: #007800;">$1</span> <span style="color: #c20cb9; font-weight: bold;">hostname</span> <span style="color: #000000; font-weight: bold;">&amp;&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
        <span style="color: #000000; font-weight: bold;">then</span>
                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Cannot communicate via SSH to $1&quot;</span>
                <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
        <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
abort <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #666666; font-style: italic;"># Exit with a predefined error message</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$*</span>
        <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
get_arguments <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #666666; font-style: italic;"># Get all arguments and define options</span>
        <span style="color: #666666; font-style: italic;"># Argument: $@</span>
        <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">--</span> <span style="color: #660033;">-h</span>
        <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
        <span style="color: #000000; font-weight: bold;">do</span>
                <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
                        -m<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #7a0874; font-weight: bold;">shift</span>
                                <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
                                        alert<span style="color: #000000; font-weight: bold;">|</span>throttle_limit<span style="color: #000000; font-weight: bold;">|</span>throttle_unlimit<span style="color: #000000; font-weight: bold;">|</span>check_lag<span style="color: #000000; font-weight: bold;">|</span>check_size<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #007800;">MODE</span>=<span style="color: #007800;">$1</span>
                                        <span style="color: #000000; font-weight: bold;">;;</span>
                                        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>      abort <span style="color: #ff0000;">&quot;Mode is mandatory. Use -h flag to get list of avialable flags&quot;</span>
                                        <span style="color: #000000; font-weight: bold;">;;</span>
                                <span style="color: #000000; font-weight: bold;">esac</span>
                                <span style="color: #000000; font-weight: bold;">;;</span>
                        -a<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #7a0874; font-weight: bold;">shift</span>
                                <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
                                        <span style="color: #7a0874; font-weight: bold;">&#91;</span>nN<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>oO<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>       <span style="color: #007800;">NOMAIL</span>=<span style="color: #000000;">1</span>
                                                        <span style="color: #000000; font-weight: bold;">;;</span>
                                        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>              <span style="color: #007800;">NOMAIL</span>=<span style="color: #000000;">0</span>
                                                        <span style="color: #000000; font-weight: bold;">;;</span>
                                <span style="color: #000000; font-weight: bold;">esac</span>
                                <span style="color: #000000; font-weight: bold;">;;</span>
                        -r<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #7a0874; font-weight: bold;">shift</span>
                                <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
                                        <span style="color: #7a0874; font-weight: bold;">&#91;</span>yY<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>eE<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>sS<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>   <span style="color: #007800;">REACT</span>=<span style="color: #000000;">1</span>
                                                        <span style="color: #000000; font-weight: bold;">;;</span>
                                        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>              <span style="color: #007800;">REACT</span>=<span style="color: #000000;">0</span>
                                                        <span style="color: #000000; font-weight: bold;">;;</span>
                                <span style="color: #000000; font-weight: bold;">esac</span>
                                <span style="color: #000000; font-weight: bold;">;;</span>
                        -d<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #7a0874; font-weight: bold;">shift</span>
                                <span style="color: #7a0874; font-weight: bold;">declare</span> <span style="color: #660033;">-i</span> DELAY_TMP
                                <span style="color: #007800;">DELAY_TMP</span>=<span style="color: #007800;">$1</span>
                                <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DELAY_TMP</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> abort <span style="color: #ff0000;">&quot;Delay needs to be a number in minutes&quot;</span>
                                <span style="color: #007800;">DELAY</span>=<span style="color: #007800;">$DELAY_TMP</span>
                                <span style="color: #000000; font-weight: bold;">;;</span>
                        -t<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #7a0874; font-weight: bold;">shift</span>
                                <span style="color: #7a0874; font-weight: bold;">declare</span> <span style="color: #660033;">-i</span> THROTTLE_TMP
                                <span style="color: #007800;">THROTTLE_TMP</span>=<span style="color: #007800;">$1</span>
                                <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$THROTTLE_TMP</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> abort <span style="color: #ff0000;">&quot;Throttle needs to be a number&quot;</span>
                                <span style="color: #007800;">THROTTLE</span>=<span style="color: #007800;">$THROTTLE_TMP</span>
                                <span style="color: #000000; font-weight: bold;">;;</span>
                        -c<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #7a0874; font-weight: bold;">shift</span>
                                <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">||</span> abort <span style="color: #ff0000;">&quot;Cannot find specified conf file&quot;</span>
                                <span style="color: #007800;">CONF</span>=<span style="color: #ff0000;">&quot;$1&quot;</span>
                                <span style="color: #000000; font-weight: bold;">;;</span>
                        -l<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #007800;">LOG</span>=<span style="color: #000000;">1</span>
                                <span style="color: #000000; font-weight: bold;">;;</span>
                        -h<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Usage: $0 -m [alert|throttle_limit|throttle_unlimit|check_lag|check_size] (-c CONF_FILE) [tgt_filer:volume tgt_filer:/vol/vol/qtree]&quot;</span>
                                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Alert if SnapMirror is still running: $0 -m alert [-a no] (-r yes) [tgt_filer:volume tgt_filer:/vol/vol/qtree]&quot;</span>
                                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Alert and throttle (react): $0 -m alert [-a no] -r yes -t [throttle_in_kb] [tgt_filer:volume tgt_filer:/vol/vol/qtree]&quot;</span>
                                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Throttle a running SnapMirror: $0 -m throttle_limit -t throttle_in_kb [tgt_filer:volume tgt_filer:/vol/vol/qtree]&quot;</span>
                                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Unlimit SnapMirror throttle: $0 -m throttle_unlimit [tgt_filer:volume tgt_filer:/vol/vol/qtree]&quot;</span>
                                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;To check lag: $0 -m check_lag -d delay_in_minutes (-a no) [tgt_filer:volume tgt_filer:/vol/vol/qtree]&quot;</span>
                                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;To check delta: $0 -m check_size [tgt_filer:volume tgt_filer:/vol/vol/qtree]&quot;</span>
                                <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>
                                <span style="color: #000000; font-weight: bold;">;;</span>
                        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>      <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$MODE</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> abort <span style="color: #ff0000;">&quot;$0 mode required&quot;</span>
                                <span style="color: #007800;">TGTS</span>=<span style="color: #ff0000;">&quot;$*&quot;</span>
                                <span style="color: #000000; font-weight: bold;">;;</span>
                <span style="color: #000000; font-weight: bold;">esac</span>
                <span style="color: #7a0874; font-weight: bold;">shift</span>
        <span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
notify <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #666666; font-style: italic;"># Send an e-mail notification</span>
        <span style="color: #666666; font-style: italic;"># Arguments: $@ - the subject</span>
        <span style="color: #666666; font-style: italic;"># Contents are empty</span>
        <span style="color: #666666; font-style: italic;"># And yes - one e-mail per event</span>
        mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;$@&quot;</span> <span style="color: #007800;">$EMAIL</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
idle <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #666666; font-style: italic;"># Check if transaction is idle</span>
        <span style="color: #666666; font-style: italic;"># Arguments: Target name (example: storage:/vol/volname/qtree</span>
&nbsp;
        <span style="color: #666666; font-style: italic;"># Get the storage name out</span>
        <span style="color: #007800;">NETAPP</span>=<span style="color: #800000;">${1%%:*}</span>
        test_connection <span style="color: #007800;">$NETAPP</span> <span style="color: #666666; font-style: italic;">#Verify this netapp is accessible</span>
        <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #007800;">$NETAPP</span> snapmirror status <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> Idle$ <span style="color: #000000; font-weight: bold;">&amp;&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #666666; font-style: italic;">#Checks if the snapmirror is idle. If so, return true</span>
        <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #007800;">$?</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
set_throttle <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #666666; font-style: italic;"># Sets throttle for target</span>
        <span style="color: #666666; font-style: italic;"># Arguments: $1 Target name (example: storage:/vol/volname/qtree)</span>
        <span style="color: #666666; font-style: italic;"># Arguments: $2 throttle value (number)</span>
&nbsp;
        <span style="color: #666666; font-style: italic;"># Get the storage name out</span>
        <span style="color: #007800;">NETAPP</span>=<span style="color: #800000;">${1%%:*}</span>
        test_connection <span style="color: #007800;">$NETAPP</span> <span style="color: #666666; font-style: italic;">#Verify this netapp is accessible</span>
        <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #007800;">$NETAPP</span> snapmirror throttle <span style="color: #007800;">$2</span> <span style="color: #007800;">$1</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
get_lag <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #666666; font-style: italic;"># Gets the lag of snapmirror relationship in minutes</span>
        <span style="color: #666666; font-style: italic;"># Arguments: Target name (example: storage:/vol/volname/qtree)</span>
&nbsp;
        <span style="color: #666666; font-style: italic;"># Get the storage name out</span>
        <span style="color: #007800;">NETAPP</span>=<span style="color: #800000;">${1%%:*}</span>
        test_connection <span style="color: #007800;">$NETAPP</span> <span style="color: #666666; font-style: italic;">#Verify this netapp is accessible</span>
        <span style="color: #007800;">LAG</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #007800;">$NETAPP</span> snapmirror status <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $4}'</span><span style="color: #000000; font-weight: bold;">`</span>
        <span style="color: #666666; font-style: italic;"># LAG is in hh:mm:ss. We need to transfer it to minutes only</span>
        <span style="color: #007800;">H</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$LAG</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">1</span> <span style="color: #660033;">-d</span> :<span style="color: #000000; font-weight: bold;">`</span>
        <span style="color: #007800;">M</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$LAG</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">2</span> <span style="color: #660033;">-d</span> :<span style="color: #000000; font-weight: bold;">`</span>
        <span style="color: #7a0874; font-weight: bold;">let</span> <span style="color: #007800;">M</span>=<span style="color: #007800;">$M</span>+<span style="color: #007800;">$H</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">60</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$M</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
check_size <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #666666; font-style: italic;"># Checks the size of the snapshot to copy (diff)</span>
        <span style="color: #666666; font-style: italic;"># Arguments: Target name (example: storage:/vol/volname/qtree)</span>
&nbsp;
        <span style="color: #666666; font-style: italic;"># Get the storage name out</span>
        <span style="color: #007800;">NETAPP</span>=<span style="color: #800000;">${1%%:*}</span>
        test_connection <span style="color: #007800;">$NETAPP</span> <span style="color: #666666; font-style: italic;">#Verify this netapp is accessible</span>
        <span style="color: #666666; font-style: italic;"># Get source storage name and path</span>
        <span style="color: #007800;">SRC</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #007800;">$NETAPP</span> snapmirror status <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $1}'</span><span style="color: #000000; font-weight: bold;">`</span>
        <span style="color: #666666; font-style: italic;"># Get the source filer and vol name from that</span>
        <span style="color: #007800;">NETAPP</span>=<span style="color: #800000;">${SRC%%:*}</span>
        <span style="color: #007800;">SPATH</span>=<span style="color: #800000;">${SRC##*:}</span>
        <span style="color: #007800;">SPATH</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$SPATH</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> s<span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">'\/vol\/'</span><span style="color: #000000; font-weight: bold;">//`</span>
        <span style="color: #007800;">SPATH</span>=<span style="color: #800000;">${SPATH%%/*}</span>
&nbsp;
        test_connection <span style="color: #007800;">$NETAPP</span> <span style="color: #666666; font-style: italic;"># Verify the target NetApp is accessible</span>
        <span style="color: #007800;">SNAP</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #007800;">$NETAPP</span> snap list <span style="color: #660033;">-n</span> <span style="color: #007800;">$SPATH</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> snapmirror <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $4}'</span><span style="color: #000000; font-weight: bold;">`</span>
        <span style="color: #007800;">DELTA</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #007800;">$NETAPP</span> snap delta <span style="color: #007800;">$SPATH</span> <span style="color: #007800;">$SNAP</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-2</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $5}'</span><span style="color: #000000; font-weight: bold;">`</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Snap delta for $1 is <span style="color: #007800;">$DELTA</span> KB&quot;</span>  
        <span style="color: #007800;">LOG_TARGET</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tr</span> <span style="color: #000000; font-weight: bold;">/</span> _<span style="color: #000000; font-weight: bold;">`</span>.txt
        <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$LOG</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #780078;">`date`</span> <span style="color: #007800;">$DELTA</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$LOG_PREFIX</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$LOG_TARGET</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">### MAIN ###</span>
get_arguments $<span style="color: #000000; font-weight: bold;">@</span>
. <span style="color: #007800;">$CONF</span> <span style="color: #000000; font-weight: bold;">&amp;&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
<span style="color: #666666; font-style: italic;"># if e-mail is not set, don't try to send</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$EMAIL</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #007800;">NOMAIL</span>=<span style="color: #000000;">1</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$TGTS</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> abort <span style="color: #ff0000;">&quot;You need at least one snapmirror target&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$MODE</span> <span style="color: #000000; font-weight: bold;">in</span>
        alert<span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$REACT</span>&quot;</span> == <span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
                <span style="color: #000000; font-weight: bold;">then</span>
                        <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$THROTTLE</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> abort <span style="color: #ff0000;">&quot;When setting 'react' flag, you must specify throttle&quot;</span>
                <span style="color: #000000; font-weight: bold;">fi</span>
                <span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$TGTS</span>
                <span style="color: #000000; font-weight: bold;">do</span>
                        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000000; font-weight: bold;">!</span> idle <span style="color: #007800;">$i</span>
                        <span style="color: #000000; font-weight: bold;">then</span>
                                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$i</span> is not idle. &quot;</span>
                                <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$NOMAIL</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> notify <span style="color: #ff0000;">&quot;<span style="color: #007800;">$i</span> is not idle&quot;</span>
                                <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$REACT</span>&quot;</span> == <span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
                                <span style="color: #000000; font-weight: bold;">then</span>
                                        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;We are set to react. Limiting throttle&quot;</span>
                                        set_throttle <span style="color: #007800;">$i</span> <span style="color: #007800;">$THROTTLE</span>
                                <span style="color: #000000; font-weight: bold;">fi</span>
                                <span style="color: #7a0874; font-weight: bold;">echo</span>
                        <span style="color: #000000; font-weight: bold;">fi</span>
                <span style="color: #000000; font-weight: bold;">done</span>
                <span style="color: #000000; font-weight: bold;">;;</span>
        throttle_limit<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$THROTTLE</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> abort <span style="color: #ff0000;">&quot;Throttle requires throttle value&quot;</span>
                        <span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$TGTS</span>
                        <span style="color: #000000; font-weight: bold;">do</span>
                                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting throttle for <span style="color: #007800;">$i</span> to <span style="color: #007800;">$THROTTLE</span>&quot;</span>
                                set_throttle <span style="color: #007800;">$i</span> <span style="color: #007800;">$THROTTLE</span>
                        <span style="color: #000000; font-weight: bold;">done</span>
                        <span style="color: #000000; font-weight: bold;">;;</span>
        throttle_unlimit<span style="color: #7a0874; font-weight: bold;">&#41;</span>       <span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$TGTS</span>
                                <span style="color: #000000; font-weight: bold;">do</span>
                                        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting throttle for <span style="color: #007800;">$i</span> to unlimited&quot;</span>
                                        set_throttle <span style="color: #007800;">$i</span> <span style="color: #000000;">0</span>
                                <span style="color: #000000; font-weight: bold;">done</span>
                        <span style="color: #000000; font-weight: bold;">;;</span>
        check_lag<span style="color: #7a0874; font-weight: bold;">&#41;</span>      <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DELAY</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #007800;">DELAY</span>=<span style="color: #000000;">1440</span>
                        <span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$TGTS</span>
                        <span style="color: #000000; font-weight: bold;">do</span>
                                <span style="color: #007800;">LAG</span>=<span style="color: #000000; font-weight: bold;">`</span>get_lag <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">`</span>
                                <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$LAG</span>&quot;</span> <span style="color: #660033;">-gt</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DELAY</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
                                <span style="color: #000000; font-weight: bold;">then</span>
                                        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Failure: The delay for <span style="color: #007800;">$i</span> is <span style="color: #007800;">$LAG</span> minutes&quot;</span>
                                        <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$NOMAIL</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> notify <span style="color: #ff0000;">&quot;<span style="color: #007800;">$i</span> is lagged <span style="color: #007800;">$LAG</span> minutes, above the threshold <span style="color: #007800;">$DELAY</span>&quot;</span>
                                <span style="color: #000000; font-weight: bold;">else</span>
                                        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Normal: The delay for <span style="color: #007800;">$i</span> is <span style="color: #007800;">$LAG</span> minutes&quot;</span>
                                <span style="color: #000000; font-weight: bold;">fi</span>
                        <span style="color: #000000; font-weight: bold;">done</span>
                        <span style="color: #000000; font-weight: bold;">;;</span>
        check_size<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$TGTS</span>
                        <span style="color: #000000; font-weight: bold;">do</span>
                                check_size <span style="color: #007800;">$i</span>
                        <span style="color: #000000; font-weight: bold;">done</span>
                        <span style="color: #000000; font-weight: bold;">;;</span>
        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>      <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Option <span style="color: #007800;">$MODE</span> is not implemented yet&quot;</span>
                <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>
                <span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">esac</span></pre></td></tr></table></div>



<p>Related posts:<ol><li><a href='http://run.tournament.org.il/citrix-xenserver-5-0-cannot-cooperate-with-netapp-snapmirror/' rel='bookmark' title='Permanent Link: Citrix XenServer 5.0 cannot cooperate with NetApp SnapMirror'>Citrix XenServer 5.0 cannot cooperate with NetApp SnapMirror</a> <small>It has been a long while, I know. I was...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://run.tournament.org.il/netapp-snapmirror-monitor-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HP MSA1000 controller failover</title>
		<link>http://run.tournament.org.il/hp-msa1000-controller-failover/</link>
		<comments>http://run.tournament.org.il/hp-msa1000-controller-failover/#comments</comments>
		<pubDate>Tue, 27 Mar 2007 20:22:48 +0000</pubDate>
		<dc:creator>ez-aton</dc:creator>
				<category><![CDATA[Clusters]]></category>
		<category><![CDATA[Disk Storage]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[active-active]]></category>
		<category><![CDATA[ocfs]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle RAC]]></category>
		<category><![CDATA[san]]></category>
		<category><![CDATA[SCSI]]></category>
		<category><![CDATA[storage device]]></category>

		<guid isPermaLink="false">http://www.tournament.org.il/run-new/?p=126</guid>
		<description><![CDATA[HP MSA1000 is an entry-level disk storage capable of communicating via different types of interfaces, such as SCSI and FC, and can allow FC failover. This FC failover, however, is controller failover and not path failover. It means that if the primary controller fails entirely, the backup controller will &#8220;kick in&#8221;. However, if a multi-path [...]


Related posts:<ol><li><a href='http://run.tournament.org.il/hot-adding-san-lun-to-linux-rh-with-qlogic-drivers/' rel='bookmark' title='Permanent Link: Hot-Adding SAN lun to Linux (RH with Qlogic drivers)'>Hot-Adding SAN lun to Linux (RH with Qlogic drivers)</a> <small>cat /proc/scsi/qla2xxx/$Z&#8221; where Z represents the SCSI interface the Qlogic...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><a href="http://h20000.www2.hp.com/bizsupport/TechSupport/Home.jsp?&amp;lang=en&amp;cc=us&amp;prodTypeId=12169&amp;prodSeriesId=377751&amp;lang=en&amp;cc=us" target="_blank">HP MSA1000</a> is an entry-level disk storage capable of communicating via different types of interfaces, such as SCSI and FC, and can allow FC failover. This FC failover, however, is controller failover and not path failover. It means that if the primary controller fails entirely, the backup controller will &#8220;kick in&#8221;. However, if a multi-path capable client will fail its primary interface, there is no guarantee that communication with the disks through the backup controller.</p>
<p>The symptom I have encountered was that the secondary path, while exposing the disks (while the primary path was down for one of the servers) to the server, did not allow any SCSI I/O operations. This prevented the Linux server&#8217;s SCSI layer from accessing the disks. So they did appear when doing &#8220;<em>cat /proc/scsi/scsi</em>&#8220;, however, they were not detected using, for example, &#8220;<em>fdisk -l</em>&#8220;, and the system logs got filled with &#8220;SCSI Error&#8221; messages.</p>
<p>About a month ago, after almost two years, a new firmware update has been released (can be found <a href="http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&amp;cc=us&amp;prodNameId=1155393&amp;prodTypeId=12169&amp;prodSeriesId=377751&amp;swLang=13&amp;taskId=135&amp;swEnvOID=2026" target="_blank">here</a>). Two versions exist &#8211; Active/Passive and Active/Active.</p>
<p>I have upgraded the MSA1000 storage device.</p>
<p>After installing the Active/Active firmware upgrade (Notice Linux users &#8211; You must have X to run the &#8220;<em>msa1500flash</em>&#8221; utility), and after power cycling the MSA1000 device, things start to look good.</p>
<p>I have tested performance with a person on-site disconnecting fiber connections on-demand, and it worked great. About 2-5 seconds failover time.</p>
<p>Since this system run Oracle RAC, and it uses OCFS2, I had to update the failed-node timeout to be 31 seconds (per this <a href="http://oss.oracle.com/projects/ocfs2/" target="_blank">Oracle&#8217;s OCFS site</a>, which includes some really good tips).</p>
<p>So real High Availability can be archived after upgrading MSA1000 firmware.</p>


<p>Related posts:<ol><li><a href='http://run.tournament.org.il/hot-adding-san-lun-to-linux-rh-with-qlogic-drivers/' rel='bookmark' title='Permanent Link: Hot-Adding SAN lun to Linux (RH with Qlogic drivers)'>Hot-Adding SAN lun to Linux (RH with Qlogic drivers)</a> <small>cat /proc/scsi/qla2xxx/$Z&#8221; where Z represents the SCSI interface the Qlogic...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://run.tournament.org.il/hp-msa1000-controller-failover/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HP ML110 G3 and Linux Centos 4.3 / RHEL 4 Update 3</title>
		<link>http://run.tournament.org.il/hp-ml110-g3-and-linux-centos-43-rhel-4-update-3/</link>
		<comments>http://run.tournament.org.il/hp-ml110-g3-and-linux-centos-43-rhel-4-update-3/#comments</comments>
		<pubDate>Tue, 30 May 2006 08:09:57 +0000</pubDate>
		<dc:creator>ez-aton</dc:creator>
				<category><![CDATA[Disk Storage]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[adaptec]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[installation media]]></category>
		<category><![CDATA[installation server]]></category>
		<category><![CDATA[Lilo]]></category>
		<category><![CDATA[RAID]]></category>
		<category><![CDATA[software raid]]></category>
		<category><![CDATA[storage device]]></category>

		<guid isPermaLink="false">http://www.tournament.org.il/run-new/?p=75</guid>
		<description><![CDATA[
Using the same installation server as before, my laptop, I was able to install Linux Centos 4.3, with the addition of HP&#8217;s drivers for Adaptec SATA raid controller, on my new HP ML110 G3.
Using just the same method as before, when I&#8217;ve installed Centos 4.3 on IBM x306, but with HP drivers, I was able [...]


Related posts:<ol><li><a href='http://run.tournament.org.il/ibm-x306-serverraid7e-and-linux-centos-43/' rel='bookmark' title='Permanent Link: IBM X306 (ServerRaid7e) and Linux Centos 4.3'>IBM X306 (ServerRaid7e) and Linux Centos 4.3</a> <small>It was no fun, and I hope I will never...</small></li>
<li><a href='http://run.tournament.org.il/dell-poweredge-1800-and-linux-part-2/' rel='bookmark' title='Permanent Link: Dell PowerEdge 1800 and Linux &#8211; Part 2'>Dell PowerEdge 1800 and Linux &#8211; Part 2</a> <small>In this part &#8211; Me installing Centos 4.1 64bit, the...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>
Using the same installation server as before, my laptop, I was able to install Linux Centos 4.3, with the addition of HP&#8217;s drivers for Adaptec SATA raid controller, on my new HP ML110 G3.</p>
<p>Using just the same method as before, when <a target="_blank" href="http://www.tournament.org.il/run/?p=70">I&#8217;ve installed Centos 4.3 on IBM x306</a>, but with HP drivers, I was able to do the job easily. </p>
<p>
To remind you the process of preparing the setup:
<p>
(A note &#8211; When I say &quot;replace it with it&quot; I always recommend you keep the older one aside for rainy days)</p>
<p>
1. Obtain the floppy image of the drivers, and put it somewhere accessible, such as some easily accessible NFS share.</p>
<p>
2. Obtain the PXE image of the kernel of Centos4.1 or RHEL 4 Update 1, and replace your PXE kernel with it (downgrade it)</p>
<p>
3. Prepare the driver&#8217;s RPM and Centos 4.1 / RHEL 4 Update 1 kernel RPM handy on your NFS share.</p>
<p>
4. Do the same for the PXE initrd.img file.</p>
<p>
5. Obtain the <i>/Centos/base/stage2.img</i> file from Centos 4.1 or RHEL 4 Update 1 (depends on the installation distribution, of course), and replace your existing one with it. </p>
<p>
6. I assume your installation media is actually NFS, so your boot command should be something like: <i>linux dd=nfs:NAME_OF_SERVER:/path/to/NFS/Directory</i></p>
<p></p>
<p>Should and would work like charm. Notice you need to use the 64bit kernel with the 64bit driver, and same for the 32bit. Won&#8217;t work otherwise, of course.</p>
<p></p>
<p>After you&#8217;ve finished the installation, *before the reboot*, press Ctrl+Alt+F2 to switch to text console, and do the following:</p>
<p>
1. Copy your kernel RPM to the new system /root directory: <i>cp /mnt/source/prepared_dir/kernel&#8230;.rpm /mnt/sysimage/root/</i> </p>
<p>
2. Do the same for HP drivers RPM</p>
<p>
3. Chroot into the new system: <i>chroot /mnt/sysimage</i></p>
<p>
4. Install (with &#8211;force if required, but *never* try it first) the RPMs you&#8217;ve put in /root. First the kernel and then HP driver.</p>
<p>
5. HP Driver RPM will fail the post install. It&#8217;s OK. rename <i>/boot/initrd-2.6.9-11.ELsmp</i> (or non SMP, depends on your installed kernel) </p>
<p>
6. Verify you have alias for the new storage device in your <i>/etc/modprobe.conf</i></p>
<p>
7. run <i>mkinitrd /boot/initrd-2.6.9-11.ELsmp 2.6.9-11.ELsmp</i> (or non SMP, depending on your kernel)</p>
<p>
8. Edit manually your <i>/etc/grub.conf</i> to your needs. </p>
<p>
Note &#8211; I do not like Grub. Actually, I find it lacking in many ways, so I install Lilo from the i386 (not the 64bit, since it&#8217;s not there) version of the distro. Later on, you can rename /etc/lilo.conf.anaconda to /etc/lilo.conf, and work with it. Don&#8217;t forget to run /sbin/lilo after changes to this file.</p>


<p>Related posts:<ol><li><a href='http://run.tournament.org.il/ibm-x306-serverraid7e-and-linux-centos-43/' rel='bookmark' title='Permanent Link: IBM X306 (ServerRaid7e) and Linux Centos 4.3'>IBM X306 (ServerRaid7e) and Linux Centos 4.3</a> <small>It was no fun, and I hope I will never...</small></li>
<li><a href='http://run.tournament.org.il/dell-poweredge-1800-and-linux-part-2/' rel='bookmark' title='Permanent Link: Dell PowerEdge 1800 and Linux &#8211; Part 2'>Dell PowerEdge 1800 and Linux &#8211; Part 2</a> <small>In this part &#8211; Me installing Centos 4.1 64bit, the...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://run.tournament.org.il/hp-ml110-g3-and-linux-centos-43-rhel-4-update-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hitachi HW100 limitations</title>
		<link>http://run.tournament.org.il/hitachi-hw100-limitations/</link>
		<comments>http://run.tournament.org.il/hitachi-hw100-limitations/#comments</comments>
		<pubDate>Sun, 19 Mar 2006 01:01:15 +0000</pubDate>
		<dc:creator>ez-aton</dc:creator>
				<category><![CDATA[Disk Storage]]></category>
		<category><![CDATA[fibre network]]></category>
		<category><![CDATA[Hitachi]]></category>
		<category><![CDATA[HW100]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[Loop]]></category>
		<category><![CDATA[multipath]]></category>
		<category><![CDATA[RAID]]></category>
		<category><![CDATA[storage device]]></category>

		<guid isPermaLink="false">http://www.tournament.org.il/run-new/?p=59</guid>
		<description><![CDATA[Not too long ago I have purchased a brand new Hitachi HW100 Workgroup Storage. 14+1 400GB SATA disks, dual-interface, each holding two fiber ports (2Gb/s LC). A nice machine. However, two limitations I have discovered are clouding my day:
1. It supports only Raid0 and Raid5. It will not allow me no-parity Raid, aka, Raid1. It [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Not too long ago I have purchased a brand new Hitachi HW100 Workgroup Storage. 14+1 400GB SATA disks, dual-interface, each holding two fiber ports (2Gb/s LC). A nice machine. However, two limitations I have discovered are clouding my day:</p>
<p>1. It supports only Raid0 and Raid5. It will not allow me no-parity Raid, aka, Raid1. It is a pity, because my storage is meant for the lab, and not for production, and I wish to decide my own Raid level. That is why it&#8217;s 14+1 disks, and not 15. You <strong>must</strong> have a spare disk.</p>
<p>2. While not connected directly to hosts (Private Loop), only one port out of two ports in an interface works. It means I bought 4 ports, and actually got two. Why would I need four? I need to simulate multi-path, load balancing and utilize maximum flexibility when connecting this storage to my fiber network. After all, this network is all lab, no production network, and I need to maximize my output, with as little redundancy as possible.</p>
<p>These two limitations are somewhat hidden, and, especially the second one, was discovered only after I&#8217;ve questioned HDS&#8217; support person. Pity. I will want to return it, and get a more capable one. I need to see what I can do with it.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://run.tournament.org.il/hitachi-hw100-limitations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
