1 |
#! /bin/sh |
2 |
# |
3 |
if [ ! -x /usr/sbin/lsiutil ]; then |
4 |
echo "Cannot find lsiutil, sorry" >&2 |
5 |
exit 1 |
6 |
fi |
7 |
if [ ! -x /usr/sbin/mpt-status ]; then |
8 |
echo "Cannot find mpt-status, sorry" >&2 |
9 |
exit 1 |
10 |
fi |
11 |
|
12 |
#mpt-status -n > /dev/null 2>&1 |
13 |
#if [ $? -eq 0 ]; then |
14 |
# echo "MPT: something WRONG here (there's a disk here)!" >&2 |
15 |
# exit 1 |
16 |
#fi |
17 |
|
18 |
# 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 |
19 |
echo -ne "21\n30\n1\n2\n1\n\nYes\nYes\nNo\n0\n0\n" | lsiutil -p 1 |
20 |
|
21 |
# rescan all scsi busses |
22 |
for i in /sys/class/scsi_host/host*/scan |
23 |
do |
24 |
echo "- - -" > $i |
25 |
done |
26 |
|