3 # This script will create a Lustre .xml configuration consisting
4 # of echo client/servers for use with the obdfilter-survey test
6 #######################################################################
7 # Customisation variables
8 #######################################################################
10 config=$(basename $0 .sh).xml
12 SERVERS=${SERVERS:-$(uname -n)}
18 BATCH=/tmp/lmc-batch.$$
20 #######################################################################
21 # some helpers: actual config below
22 #######################################################################
25 echo $1 | sed 's/[^0-9]*//g'
28 _LMC="${LMC} -m $config"
31 if [ $VERBOSE ]; then echo "$@"; fi
32 if [ -n "$BATCH" ]; then
40 [ -n "$BATCH" ] && $_LMC --batch $BATCH
45 [ -n "$BATCH" ] && rm -f $BATCH
48 ABORT_ON="ERR QUIT INT HUP"
52 echo "Error/Interrupt creating $config"
60 [ -f $config ] && rm $config
62 ####################################################################
64 ####################################################################
67 _lmc --node client --add net --nettype lnet --nid '*'
69 for srv in $SERVERS; do
72 elan*) nid=`h2elan $srv`;;
73 gm*) nid=`gmnalnid -n $srv`;;
76 _lmc --node $srv --add net --nettype lnet --nid ${nid}@${net}
79 _lmc --node $srv --add ost --ost ost_$srv --osdtype=obdecho
81 _lmc --node client --add echo_client --ost ost_$srv