Re: SAN Tape rewind during Boot
- From: swap@xxxxxxxxxxxxxx
- Date: 17 Jan 2007 08:49:30 -0800
To avoid scsi reservation on SAN tape I found this workaround also,
it's a little init script that rename the st.ko and insert it after the
"Initializing hardware..." step :
$ more /etc/init.d/st_module
#!/bin/sh
#
# chkconfig: 35 99 99
#
# description: This is a workaround to prevent tape rewinds\
# by moving tape discovery later in the boot process.
#
BADST="/lib/modules/`uname -r`/kernel/drivers/scsi/st.ko"
ST="/lib/modules/`uname -r`/kernel/drivers/scsi/ST.KO"
INSMOD="/sbin/insmod"
RMMOD="/sbin/rmmod"
start()
{
if [ -f $BADST ]
then
echo "Ouch ! The kernel module ST is
potentially loadable at boot time !"
echo "I decide to move it from $BADST "
echo "to $ST . Now future reboots are safe "
mv $BADST $ST
fi
if [ -f $INSMOD ]
then
if [ -f $ST ]
then
if [ "`lsmod |grep "st "| wc -l`" -gt 0
]; then
echo "Module already loaded"
else
echo "Inserting st module "
$INSMOD $ST
fi
else
echo "UNABLE TO FIND $ST"
fi
else
echo "UNABLE TO FIND $INSMOD"
fi
}
stop()
{
if [ -f $BADST ]
then
echo "Ouch ! The kernel module ST is
potentially loadable at boot time !"
echo "I decide to move it from $BADST "
echo "to $ST . Now next reboot is safe "
mv $BADST $ST
fi
if [ -f $RMMOD ]
then
echo "Removing st module "
$RMMOD st
else
echo "UNABLE TO FIND $RMMOD"
fi
}
status()
{
if [ "`lsmod |grep "st "| wc -l`" -gt 0 ]; then echo "Module st
is currently loaded"; else echo "Module st is NOT currently loaded"; fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
After a chkconfig --add st_module all works fine and reboots are safe
.....
Thanks to all
Dan
.
- Prev by Date: Re: How to send a signal to a process ?
- Next by Date: Re: mysqldump ?
- Previous by thread: mysqldump ?
- Next by thread: wierd pure-ftp prob on fc5
- Index(es):
Relevant Pages
|