I installed 3Ware’s 3dm2. The older variant stopped working under 2.6.10. The RedHat init.d script was not suitable, so I modified it for my Debian install.
#!/bin/sh
#
# 3w-xxxx: Starts the 3ware daemon
#
# description: Start the 3dmd application which logs the current state
# of the 3ware DiskSwitch controller card, and then polls
# for state changes.
# processname: 3dmd
# config: /etc/3dmd.confRETVAL=0
DAEMON=/usr/local/sbin/3dm2test -x $DAEMON || exit 0
# See how we were called.
case “$1″ in
start)
echo -n “Starting 3ware DiskSwitch daemon: ”
# /sbin/insmod 3w-xxxx
start-stop-daemon –start –name 3dmd
–exec $DAEMON
echo “3dmd.”
;;
stop)
echo -n “Stopping 3ware DiskSwitch daemon: ”
# Whoops, don’t check for undefined $PID
PID=$(grep 3dm2 /proc/*/stat | awk ‘{ print $1 }’ |
awk -F : ‘{ print $2 }’ | head -1)
# Will complain if $PID is empty string
kill -15 $PID
echo “3dmd.”
;;
restart)
$0 stop
$0 start
RETVAL=$?
;;
*)
echo “Usage: $0 {start|stop|restart}”
exit 1
esacexit $RETVAL
Sadly, I found that 3Ware’s mailer is not SMTP compliant. By default I won’t be getting any mails if there is a problem, which is the whole point of running 3dm2 in the first place.
SMTP protocol violation: synchronization error (input sent without waiting for greeting): rejected connection from H=mail.internal.foo [192.168.0.2]
One solution is to disable Exim4’s synch check for SMTP commands. On Debian GNU/Linux, you’d edit /etc/exim4/exim4.conf.template if you’re using the automatically generated configuration and add the following somewhere in the configuration section for ‘main’ near the top.
smtp_enforce_sync = false
Restart Exim4 and you can receive mail from 3dm2.
Subject: 3ware 3DM2 alert -- host: nebula This is a test e-mail generated by 3ware 3DM2