6 LMC_REAL="../../lustre/utils/lmc -m $config"
14 UUIDLIST=${UUIDLIST:-/home/bluearc/UUID.0920}
16 # THis is needed for to create route for elan network
25 echo $1 | sed 's/[^0-9]*//g'
32 # assumes /etc/hosts looks like this:
33 # 192.168.40.11 emcr10 mcr10-eth0 emcr-r2-s1 gw10
35 awk '$5 = /'$1'$/ {print substr($2,2)}' /etc/hosts
37 BATCH=/tmp/lmc-batch.$$
42 [ -f $config ] && rm $config
44 ${LMC} --node $MDS --net `h2elan $MDS` elan || exit 1
45 ${LMC} --node $MDS --mds mds1 /tmp/mds1 100000 || exit 1
46 ${LMC} --lov lov1 mds1 65536 0 0
49 #${LMC} --node client --tcpbuf $TCPBUF --net '*' tcp $PORT || exit 1
50 ${LMC} --node client --net '*' elan || exit 1
51 ${LMC} --node client --mtpt /mnt/lustre mds1 lov1
53 # this is crude, but effective
54 let server_per_gw=($SERVER_CNT / $GW_CNT )
55 let tot_server=$server_per_gw*$GW_CNT
56 echo "Allocating $server_per_gw per gateway."
57 echo "For a total of $tot_server Blue Arcs"
60 let server=$SERVER_START
61 while (( $gw < $GW_CNT + GW_START ));
65 ${LMC} --router --node $gwnode --tcpbuf $TCPBUF --net `h2ip $gwnode` tcp $PORT || exit 1
66 ${LMC} --node $gwnode --net `h2elan $gwnode` elan|| exit 1
67 ${LMC} --node $gwnode --route elan `h2elan $gwnode` `h2elan $CLIENT_LO` `h2elan $CLIENT_HI` || exit 2
70 while (( $i < $server_per_gw ));
72 echo "server: $server"
74 OBD_UUID=`awk "/$OST / { print \\$3 }" $UUIDLIST`
75 [ "$OBD_UUID" ] && OBD_UUID="--obduuid=$OBD_UUID" || echo "$OST: no UUID"
77 ${LMC} --node $ba --tcpbuf $TCPBUF --net $ba tcp $PORT || exit 1
78 # the device on the server
79 ${LMC} --lov lov1 --node $ba $OBD_UUID --ost bluearc || exit 3
81 ${LMC} --node $gwnode --route tcp `h2ip $gwnode` $ba || exit 2
89 $LMC_REAL --batch $BATCH