#! /bin/sh # if [ ! -x /usr/sbin/lsiutil ]; then echo "Cannot find lsiutil, sorry" >&2 exit 1 fi if [ ! -x /usr/sbin/mpt-status ]; then echo "Cannot find mpt-status, sorry" >&2 exit 1 fi #mpt-status -n > /dev/null 2>&1 #if [ $? -eq 0 ]; then # echo "MPT: something WRONG here (there's a disk here)!" >&2 # exit 1 #fi # 21=RAID actions, 30=Create, 1=disk1, 2=disk2, 1=stripe, \n=defaultsize, Yes=writecache, No=do-not-zero-volumeblocks, No=dont-skip-resync, 0=quit, 0=quit echo -ne "21\n30\n1\n2\n1\n\nYes\nYes\nNo\n0\n0\n" | lsiutil -p 1 # rescan all scsi busses for i in /sys/class/scsi_host/host*/scan do echo "- - -" > $i done