Everything is a Freaking DNS problem - 3w-9xxx http://127.0.0.1:8080/blog/taxonomy/term/1360/0 en Implementing Raid Monitoring on a 3Ware 3w-9xxx based controller. http://127.0.0.1:8080/blog/implementing-raid-monitoring-3ware-3w-9xxx-based-controller <p>When you pull out a disk from your Raid setup it shows a warning in syslog</p> <p><div class="geshifilter"><pre class="text geshifilter-text" style="font-family:monospace;"><ol><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">Jan 27 10:18:22 EL860 kernel: 3w-9xxx: scsi0: AEN: WARNING (0x04:0x0019): Drive </div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">removed:port=1.</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">Jan 27 10:18:22 EL860 kernel: 3w-9xxx: scsi0: AEN: ERROR (0x04:0x0002): Degraded</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal"> unit:unit=0, port=1.</div></li></ol></pre></div></p> <p>However if no one is looking at syslog that won't really be helpfull.</p> <p>3Ware provides a tool from their site called tw_cli which can be used to manage<br /> the raid setup from the command line.</p> <p><div class="geshifilter"><pre class="text geshifilter-text" style="font-family:monospace;"><ol><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">[EL860-root@EL860 admin]# tw_cli /c0 show </div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp;</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">Unit UnitType Status %RCmpl %V/I/M Stripe Size(GB) Cache AVrfy</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">------------------------------------------------------------------------------</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">u0 RAID-1 REBUILDING 41% - - 232.82 RiW ON </div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp;</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">VPort Status Unit Size Type Phy Encl-Slot Model</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">------------------------------------------------------------------------------</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">p0 OK u0 232.88 GB SATA 0 - ST3250310NS </div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">p1 DEGRADED u0 232.88 GB SATA 1 - ST3250310NS </div></li></ol></pre></div></p> <p>I'd figure I'd either have to write wrapper script around that or find some other way of integrating it.<br /> Asking the question on ##infra-talk on irc.freenode.net gave me the following link to a <a href="http://github.com/stanaka/check_tw" rel="nofollow">check script</a> on github</p> <p><cite>koollman: sdog: something like <a href="http://github.com/stanaka/check_tw" title="http://github.com/stanaka/check_tw" rel="nofollow">http://github.com/stanaka/check_tw</a> should work. </cite></p> <p>With that in your snmpd.conf you can get the info via snmp</p> <p><div class="geshifilter"><pre class="text geshifilter-text" style="font-family:monospace;"><ol><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">[root snmp]# snmpwalk localhost -v 2c -c public .1.3.6.1.4.1.2</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">021 | grep ext </div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">UCD-SNMP-MIB::extIndex.1 = INTEGER: 1</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">UCD-SNMP-MIB::extNames.1 = STRING: TW_RAID</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">UCD-SNMP-MIB::extCommand.1 = STRING: /usr/local/sbin/check_tw</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">UCD-SNMP-MIB::extResult.1 = INTEGER: 2</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">UCD-SNMP-MIB::extOutput.1 = STRING: CRITICAL: Unit: u0, Type: RAID-1, Status: RE</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">BUILDING</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">UCD-SNMP-MIB::extErrFix.1 = INTEGER: 0</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">UCD-SNMP-MIB::extErrFixCmd.1 = STRING: </div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">UCD-SNMP-MIB::ssSysContext.0 = INTEGER: 2073</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">UCD-SNMP-MIB::ssRawContexts.0 = Counter32: 11781783</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">UCD-DLMOD-MIB::dlmodNextIndex.0 = INTEGER: 1</div></li></ol></pre></div></p> http://127.0.0.1:8080/blog/implementing-raid-monitoring-3ware-3w-9xxx-based-controller#comments 3w-9xxx 3ware didimentionihateraid linux monitoring opensource raid snmp Thu, 28 Jan 2010 18:41:42 +0000 Kris Buytaert 981 at http://127.0.0.1:8080/blog