logo
Published on john.parnefjord.se (http://john.parnefjord.se)

Monitor IBM ServerRaid on Debian Etch

By johnp
Created 2008-03-11 09:10

IBM ships most tools packaged just for Suse and RedHat, quite annoying when running Debian or Ubuntu isn't it? Anyway I've tried earlier to install Director on Debian, but I gave up after a while. It was an overweighty system and I just wanted to be able to monitor the server, especially the raid. After some searching I found the arcconf-tool via Adaptecs site. But after some more searching I found the IBM version.

https://www-304.ibm.com/systems/support/supportsite.wss/docdisplay?lndocid=MIGR-5073618&brandind=5000020 [1]

I just downloaded the file and unpacked it. When running the 64-bit version I got an error about a missing lib, so I tried the 32-bit version and it worked straight away. I need to say that I got the ia32libs package installed on the 64-bit server, that's why it worked. Running it I could find out version and check the logs.

server2:~# ./arcconf32 getversion
Controllers found: 1
Controller #1
==============
Firmware           : 5.1-0 (9234)
Staged Firmware    : 5.1-0 (9234)
BIOS               : 5.1-0 (9234)
Driver             : 1.1-5 (2409)
Boot Flash         : 5.1-0 (9234)

There are more switches than this of course, among them one to check the log. Now I've come up with a python script (see attached file in the end of this post) that parses the data that arcconf emits so that one can query for the status of a certain piece of info for a physical and logical drive. For example if you run the the arcconf tool for checking a logical drive you will get a quite an essay:

server2:~# ./arcconf32 getconfig 1 LD 1
Controllers found: 1
----------------------------------------------------------------------
Logical drive information
----------------------------------------------------------------------
Logical drive number 1
   Logical drive name                       : XLOG
   RAID level                               : 1
   Status of logical drive                  : Okay
   Size                                     : 69889 MB
   Read-cache mode                          : Enabled
   Write-cache mode                         : Enabled (write-back)
   Write-cache setting                      : Enabled (write-back) when protected by battery
   Partitioned                              : Yes
   Protected by Hot-Spare                   : No
   Bootable                                 : No
   Defunct stripes                          : No
   --------------------------------------------------------
   Logical drive segment information
   --------------------------------------------------------
   Segment 0                                : Present (0,5) 3PD06MW4
   Segment 1                                : Present (0,6) 3PD06AH6

Using the python script you can pick out some specific info, say for example to check if there are any defunct stripes on logical drive number 1:

server2:~# ./raidstate.py LDS 1
No

Or to check for the state of a physical disk:

server2:~# ./raidstate.py PS 1
Online

This is just an example and the script can of course be adapted to return something else, for example state values to some monitoring program like Nagios, Zenoss, Zabbix or whatever. The help shows the current switches available:

server2:~# ./raidstate.py help

You must supply arguments specifying what you want to check.

Usage: ./raidstate.py <type> <disk>

<type> refers to what kind of information that is to be checked. Possible
values are:

        PS - get physical disk state
        PFW - get physical disk firmware version
        PFR - get FRU state for physical disk
        LS - get logical drive status
        LDS - get logical drive defunct stripes
        LN - get logocal drive name
        LRL - get logical raid level

<disk> is the number of the disk to be checked. Check what disks that are
available by running /path/to/arcconf32

Remember that you use this script on your own risk and it is provided as is. Place the arcconf program in an appropriate place and edit the path in the beginning of the script. Notice that the script set the controller to number 1 when instantiating the RaidState class. The python used is Python 2.5. If you're at 2.4 you might need to rewrite some parts.

// John


Source URL:
http://john.parnefjord.se/node/44