Whamcloud - gitweb
b=1719
[fs/lustre-release.git] / lustre / tests / mcr-individual-ost-nogw-config.sh
1 #!/bin/bash
2
3 config=${1:-echo-no-gw.xml}
4
5 LMC="save_cmd"
6 LMC_REAL="../../lustre/utils/lmc -m $config"
7
8 # TCP/IP servers
9 SERVER_START=0
10 SERVER_CNT=62
11
12 TCPBUF=1048576
13  
14 h2tcp () {
15     echo "${1}"
16 }
17 BATCH=/tmp/lmc-batch.$$
18 save_cmd() {
19     echo "$@" >> $BATCH
20 }
21
22 [ -f $config ] && rm $config
23
24 # Client node
25 ${LMC} --add net --node client --tcpbuf $TCPBUF --nid '*' --nettype tcp || exit 1
26
27 # this is crude, but effective
28 let server_per_gw=($SERVER_CNT / $GW_CNT )
29 let tot_server=$server_per_gw*$GW_CNT
30
31 let server=$SERVER_START
32 while (( $server < $SERVER_CNT + SERVER_START ));
33 do 
34       echo "server: $server"
35       OST=ba$server
36       # server node
37       ${LMC} --add net --node $OST --tcpbuf $TCPBUF --nid $OST --nettype tcp || exit 1
38       # the device on the server
39       ${LMC} --add ost --node $OST --obd obd_$OST --obdtype=obdecho || exit 3
40       # osc on client
41       ${LMC} --add oscref --node client --osc OSC_obd_$OST
42       let server=$server+1 
43 done
44
45 $LMC_REAL --batch $BATCH
46 rm -f $BATCH