You are hereHow to Set Up Dell Perc 4/SC Monitoring on Ubuntu 6 LTS

How to Set Up Dell Perc 4/SC Monitoring on Ubuntu 6 LTS


By steve - Posted on 11 March 2008

I needed to be able to monitor a RAID controller on an Ubuntu Linux server running with a Dell PERC 4/SC RAID controller with SCSI drives. Dell does not support this configuration, but they do provide some RPM packages that can be modified to run on Ubuntu. Here's how I did it...

Download the best fitting Dell package for your setup. I found mine at http://support.dell.com

You can find newer versions by searching for "perc linux" under drivers and downloads.

Download the file and save it on the Ubuntu server. My file was called perc-apps-A08.tar.gz

Put the file in its own directory, then unpack it:

# tar -xvfz perc-apps-A08.tar.gz

You get files like these:
Dellmgr-5.32-0.i386.rpm
linflash-3.03-0.i386.rpm
Megamon-4.0-2.i386.rpm
percsnmp-4.10a-1.i386.rpm
percsnmp-4.10a-1.tar.gz
perc-apps-A08.txt

Convert the RPMs to deb files by using alien (install it by typing: apt-get install alien).

# alien -d Dellmgr-5.32-0.i386.rpm
# alien -d --scripts Megamon-4.0-2.i386.rpm
etc...

Note that the file names have now been adapted by alien to the debian way of doing things, so the _ and - and . are different. Use the names as created by alien.

Install the packages using dpkg:

# dpkg -i dellmgr_5.32-0_i386.deb
# dpkg -i megamon_4.0-2_i386.deb

I didn't install the linflash or percsnmp packages.

Note that the megamon installation doesn't completely work. The start up script is in the wrong place and Redhat uses chkconfig and debian/Ubuntu doesn't. Fix up the installation of megamon by changing the startup script location and some settings in it.

Move the startup script:

# mv /etc/rc.d/init.d/raidmon /etc/init.d

# nano /etc/init.d/raidmon

Now fix it up so that we use the ubuntu startup methodology.

NOTE: This example doesn't quite work... I don't have it killing the daemon consistently.

I've used "### Ubuntu way:" and "###" to indicate my changes:


#!/bin/sh
#
# chkconfig: 2345 20 80
# description: RAIDMon is a daemon that monitors the RAID subsystem
#               And generates e-mail to root
# processname: MegaServ.

# source function library
###. /etc/rc.d/init.d/functions
### Ubuntu way:
. /lib/lsb/init-functions

case "$1" in
  start)
        megadevice="megadev0"
        rm -f /dev/$megadevice 2>/dev/null
        megamajor=`cat /proc/devices|gawk '/megadev/{print$1}' `
        mknod /dev/$megadevice c $megamajor 0 2>/dev/null
        # New check : Timir: 10-31-01: Does node exist
        if [ ! -c /dev/$megadevice ]
        then
          echo "
                Character Device Node /dev/$megadevice does not exist.
                Raid Monitor could not be started
                "
          exit 1
        fi

        #echo -n 'Starting NetRAID Monitor:'
        echo -n 'Starting RAID Monitor:'
        ### Ubuntu way:
        start-stop-daemon --start --quiet --pidfile /var/run/raidmon.pid \
             --exec /usr/sbin/MegaCtrl -- -start
        ### Ubuntu way:
        ###touch /var/lock/raidmon
    echo
        ;;
  stop)
        #echo -n 'Stopping NetRAID Monitor:'
        echo -n 'Stopping RAID Monitor:'
        ### Ubuntu way:
        start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/raidmon.pid
        megadevice="megadev0"
        rm -f /dev/$megadevice 2>/dev/null
        ### Ubuntu way:
        ###rm -f /var/lock/raidmon 2>/dev/null
    echo
        ;;
  restart|reload)
        $0 stop
        $0 start
        ;;
  *)
        #echo "NetRAID Monitor is not Started/Stopped"
        echo "RAID Monitor is not Started/Stopped"
        echo "Usage: raidmon {start|stop|restart}"
        exit 1
esac

exit 0

Add a list of users to get emailed any issues with raidmon:

# nano /etc/megamon.conf

And insert your email address at the end of the file:

youremail@address.here

Start the raidmon service:

# /etc/init.d/raidmon start

Check the log:

# tail /var/log/megaserv.log

Add the raidmon service to the appropriate run levels ( start in rc levels 2-5) using update-rc.d instead of chkconfig:

# update-rc.d raidmon defaults

Do "update-rc.d --help", if you want to see the other options for using update-rc.d.

To check the status of your raid controller (be careful!), you can run the dellmgr program:

# dellmgr
Tags

Comments

Did this help you? You can help me!


Did you find this information helpful? You can help me back by linking to this page, purchasing from my sponsors, or posting a comment!


+One me on Google:


Follow me on twitter: http://twitter.com/mojocode