Whamcloud - gitweb
Merge of b_md to HEAD:
[fs/lustre-release.git] / lustre / tests / llecho.sh
1 #!/bin/sh
2
3 config=echo.xml
4 LCONF=${LCONF:-../utils/lconf}
5 LMC=${LMC:-../utils/lmc}
6
7 SERVER=localhost
8 CLIENT=localhost
9
10 # FIXME: make LMC not require MDS for obdecho LOV
11 MDSDEV=$TMP/mds1
12 MDSSIZE=10000
13
14 STRIPE_BYTES=65536
15 STRIPES_PER_OBJ=2       # 0 means stripe over all OSTs
16
17 LOV=0
18 while [ "$1" ]; do
19         case $1 in
20         --lov) LOV="1" ;;
21         *) OPTS="$OPTS $1" ;;
22         esac
23         shift
24 done
25
26 # create nodes
27 $LMC -o $config --node $SERVER --net $SERVER tcp || exit 1
28
29 if (($LOV)); then
30     $LMC -m $config --node $SERVER --mds mds1 $MDSDEV $MDSSIZE || exit 10
31     $LMC -m $config --lov lov1 mds1 $STRIPE_BYTES $STRIPES_PER_OBJ 0 || exit 11
32     $LMC -m $config --node $SERVER --lov lov1 --obdtype=obdecho --ost || exit 12
33     $LMC -m $config --node $SERVER --lov lov1 --obdtype=obdecho --ost || exit 13
34
35     $LMC -m $config --node $CLIENT --echo_client lov1 || exit 3
36 else
37     $LMC -m $config --node $SERVER --obdtype=obdecho --ost || exit 2
38     # force the osc to be configured (this is normally done when it is mounted)
39     $LMC -m $config --node $CLIENT --osc OSC_$SERVER || exit 3
40     $LMC -m $config --node $CLIENT --echo_client OSC_${SERVER} || exit 3
41 fi
42
43 $LCONF --gdb $OPTS $config || exit 4
44
45 cat <<EOF
46
47 run getattr tests as:
48 ../utils/lctl --device '\$ECHO_$SERVER' test_getattr 1000000
49 EOF