Whamcloud - gitweb
Move the llecho.sh config into seperate script so it now works just like
authorrread <rread>
Thu, 26 Dec 2002 18:19:45 +0000 (18:19 +0000)
committerrread <rread>
Thu, 26 Dec 2002 18:19:45 +0000 (18:19 +0000)
llmount.sh

lustre/tests/echo.sh [new file with mode: 0755]

diff --git a/lustre/tests/echo.sh b/lustre/tests/echo.sh
new file mode 100755 (executable)
index 0000000..f30f056
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+config=${1:-$(basename $0 .sh).xml}
+LMC=${LMC:-../utils/lmc -m $config}
+
+SERVER=localhost
+CLIENT=localhost
+
+# FIXME: make LMC not require MDS for obdecho LOV
+MDSDEV=$TMP/mds1
+MDSSIZE=10000
+
+STRIPE_BYTES=65536
+STRIPES_PER_OBJ=2      # 0 means stripe over all OSTs
+
+LOV=0
+while [ "$1" ]; do
+        case $1 in
+        --lov) LOV="1" ;;
+       *) OPTS="$OPTS $1" ;;
+        esac
+        shift
+done
+
+rm -f $config
+# create nodes
+$LMC --add node --node $SERVER  || exit 1
+$LMC --add net --node $SERVER --nid $SERVER --nettype tcp || exit 2
+
+if (($LOV)); then
+    $LMC --add mds --node $SERVER --mds mds1 --dev $MDSDEV --size $MDSSIZE || exit 10
+    $LMC --add lov --lov lov1 --mds mds1 --stripe_sz $STRIPE_BYTES --stripe_cnt $STRIPES_PER_OBJ --stripe_pattern 0 || exit 11
+    $LMC --add ost --node $SERVER --lov lov1 --obdtype=obdecho || exit 12
+    $LMC --add ost --node $SERVER --lov lov1 --obdtype=obdecho || exit 13
+    OBD_NAME=lov1
+else
+    $LMC --add ost --obd obd1 --node $SERVER --obdtype=obdecho || exit 2
+    OBD_NAME=obd1
+fi
+
+if [ "$SERVER" != "$CLIENT" ]; then
+   $LMC --add node --node $CLIENT  || exit 1
+   $LMC --add net --node $CLIENT --nid $CLIENT --nettype tcp || exit 2
+fi
+
+$LMC --add echo_client --node $CLIENT --obd ${OBD_NAME} || exit 3
+