I had to monitor the Raid 5 status of two PE 2650 with a PERC3/Di and running under a GNU Debian. You can get the CLI tool afacli from dell website. Originally it was only available for windows or red-hat and it was necessary to tweak this stuff using Alien software for converting rpm to deb packages.
nicolas@grimm:~$ wget
http://linux.dell.com/files/aacraid/afaapps-2.6-0.tar.gz
nicolas@grimm:~$ sudo tar -Pvzxf afaapps-2.6-0.tar.gz
# Normally you should have a device afa0 created. If not, check that devicename = “aac” in the file /dev/MAKEDEV.afa then do the following step :
cd /dev
./MAKEDEV.afa afa0
More information on the Dell website : http://linux.dell.com/storage.shtml
Now that we have a running AFACLI we can do a little script for checking hourly our raid status. Main thing to know with afacli - as lot of other CLI tool - is the HELP commande. First you will have to open your device with the command open afa0 then you could check your container list, disk list etc. Due to network constraint I could only use an SSH connection, so for schedule this script I use a special user named “xfertuser” on each box for doing an SSH KEY AUTH. When my user is logon the remote box, I execute some command on AFACLI and use a simple diff on last afacli log file and the new afacli log file. Then in last step Icheck the messages log for AACRAID error messages.
Here is a sample script to use in a hourly crontab :
#!/bin/sh
SSH_CMD=/usr/bin/ssh
SSH_USER=xfertuser# We get the remote host from the first argument of this script
REMOTE_HOST=$1function doCmd()
{
$SSH_CMD $SSH_OPTIONS $SSH_USER@$REMOTE_HOST “$@”
}
LOG_FILE=”raid.current.log”
LAST_LOG=”raid.last.log”AFACLI=/usr/sbin/afacli
LOG_DIR=~/.raid-check
CMD_FILE=afacli.commands
SYS_LOG=/var/log/messages# AFACLI commands to execute for log Raid 5 status
CMD_LIST=”
\nopen afa0
\nlogfile start ${LOG_FILE}
\ncontainer list
\ndisk list
\nenclosure show status
\nlogfile end
\nexit
“# Here we execute all our check on the remote box
doCmd test -d ${LOG_DIR} || doCmd mkdir ${LOG_DIR}
doCmd “echo -e \”$CMD_LIST\” > $LOG_DIR/$CMD_FILE”
doCmd test -f ${LOG_DIR}/${LOG_FILE} || doCmd “sh -c \”cd ${LOG_DIR}; export TERM=xterm; sudo ${AFACLI} < ${CMD_FILE} > console.return\”"
doCmd “sudo mv $LOG_DIR/$LOG_FILE $LOG_DIR/$LAST_LOG”
doCmd “sh -c \”cd ${LOG_DIR}; export TERM=xterm; sudo ${AFACLI} < ${CMD_FILE} > console.return\”"
doCmd “sh -c \”cd ${LOG_DIR}; sudo /usr/bin/diff $LOG_FILE $LAST_LOG\”"
doCmd “sudo /bin/grep -e \”(AAC|aacraid):\” $SYS_LOG”


























February 26th, 2007 at 11:38 am
Hi,
When I run the “/MAKEDEV.afa afa0″ command, I’ve the error “./MAKEDEV.afa: Can not derive the major number for device afa.” which appear. I have changed the devname value to ‘aac’ in the MAKEDEV.afa file but the problem persist. Is someone have an idea to resolve it ? Thanks.
P.S. : I’m running under Centos 4.4 (Redhat 9).
February 26th, 2007 at 12:14 pm
Hello James,
I suggest you to check for an “aac” entry in your /proc/devices. If you don’t have this entry there is probably a mistake in the hardawre detection :)
If you have it, you can try to add the node entry manually by this command:
mknod afa0 c XXX 0
chmod 600 afa0
Where XXX equal the value in your /proc/devices for “aac”.
Take a look at the script /dev/MAKEDEV.afa
Regards,
Nicolas
February 27th, 2007 at 11:17 am
Hello Nicolas,
Thanxs for your quick answer.
I’ve checked entries in my /proc/devices files and effectly there isn’t any aac entry in it…
I think there is an hardware error or perhaps my configuration isn’t compatible with aac!
Bye.
Regards,
James.
February 27th, 2007 at 1:05 pm
James,
Have you check if your aacraid module is correctly loaded ?
You can check it thru “lsmod” command.
If not, you probably need to recompile your kernel with this option :
CONFIG_SCSI_AACRAID=m
And comment this one if you have it :
CONFIG_SCSI_AIC7XXX=m
I remember that there is conflict between the both modules which doesn’t manage the same PERC version card.
Regards,
Nicolas