Coraid AoE Driver Setup

Once again, this is mostly just for me but perhaps someone else will find it useful.

cd /usr/src/linux
make cloneconfig
make modules_prepare

cd /usr/local/src/
wget -q www.coraid.com/support/linux/aoe6-18.tar.gz
tar xfz aoe6-18.tar.gz
cd aoe6-18/
make KDIR=/usr/src/linux
make KDIR=/usr/src/linux install

create /etc/init.d/aoe from info below
chmod 755 /etc/init.d/aoe
ln -s /etc/init.d/aoe /usr/sbin/rcaoe
insserv aoe

ifconfig eth2 mtu 4200 up  (9000 is set in the intel docs)
ifconfig eth3 mtu 4200 up (are these changes persistent??)

#### /etc/init.d/aoe file #####

#! /bin/sh
#
# /etc/init.d/aoe
# /(usr/)sbin/rcaoe
#
### BEGIN INIT INFO
# Provides:          aoe
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs $network
# Should-Start:
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Short-Description: Begin AoE discovery.
# Description:       Begin AoE discovery.
### END INIT INFO

BIN_MODPROBE=/sbin/modprobe
BIN_RMMOD=/sbin/rmmod
BIN_AOEINTERFACES=/usr/sbin/aoe-interfaces
BIN_AOEDISCOVER=/usr/sbin/aoe-discover
BIN_AOEFLUSH=/usr/sbin/aoe-flush
INTERFACES="eth2 eth3"

test -x $BIN_MODPROBE || { echo "$BIN_MODPROBE not installed";
if [ "$1" ] = "stop" ]; then exit 0;
else exit 5; fi; }

test -x $BIN_RMMOD || { echo "$BIN_RMMOD not installed";
if [ "$1" ] = "stop" ]; then exit 0;
else exit 5; fi; }

test -x $BIN_AOEINTERFACES || { echo "$BIN_AOEINTERFACES not installed";
if [ "$1" ] = "stop" ]; then exit 0;
else exit 5; fi; }

test -x $BIN_AOEDISCOVER || { echo "$BIN_AOEDISCOVER not installed";
if [ "$1" ] = "stop" ]; then exit 0;
else exit 5; fi; }

test -x $BIN_AOEFLUSH || { echo "$BIN_AOEFLUSH not installed";
if [ "$1" ] = "stop" ]; then exit 0;
else exit 5; fi; }

. /etc/rc.status

rc_reset

case "$1" in
start)
echo -n "Starting AOE"
$BIN_MODPROBE aoe
$BIN_AOEINTERFACES $INTERFACES
$BIN_AOEDISCOVER
rc_status -v
;;

stop)
echo -n "Shutting down AOE"
$BIN_AOEFLUSH -a
$BIN_RMMOD aoe
rc_status -v
;;

restart)
echo -n "Restarting AOE"
$0 stop
$0 start
rc_status
;;

*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
rc_exit

Leave a Reply