4 LMC=${LMC-../utils/lmc}
7 MDSDEV=${MDSDEV:-$TMP/mds1}
8 MDSSIZE=${MDSSIZE:-50000}
10 OSTDEV1=${OSTDEV1:-$TMP/ost1}
11 OSTDEV2=${OSTDEV2:-$TMP/ost2}
12 OSTSIZE=${OSTSIZE:-100000}
14 NETTYPE=${NETTYPE:-tcp}
16 # NOTE - You can't have different MDS/OST nodes and also have clients on the
17 # MDS/OST nodes without using --endlevel and --startlevel during lconf.
18 # You can put both MDS/OST on one node and client can be there too.
19 # CLIENTS is a space-separated list of client nodes.
21 # The rule is that both the MDS and the OST must be set up before any
22 # of the clients can be started, so plan accordingly.
24 # Three separate systems
25 MDSNODE=${MDSNODE:-uml1}
26 OSTNODES=${OSTNODES:-"uml2 uml2"}
27 CLIENTS=${CLIENTS:-"uml3"}
29 # Single system with additional clients
32 #CLIENTS="$MDSNODE client"
34 # Two systems with client on MDS, and additional clients (set up OST first)
37 #CLIENTS="$MDSNODE client"
39 # Two systems with client on OST, and additional clients (set up MDS first)
42 #CLIENTS="$OSTNODES client"
56 *) echo $1 | sed "s/[^0-9]*//" ;;
61 echo -n "adding NET for:"
62 for NODE in `echo $MDSNODE $OSTNODES $CLIENTS | sort -u`; do
64 ${LMC} -m $config --add net --node $NODE --nid `h2$NETTYPE $NODE` --nettype elan || exit 1
67 # configure mds server
68 echo; echo "adding MDS on: $MDSNODE"
69 ${LMC} -m $config --add mds --format --node $MDSNODE --mds mds1 --dev $MDSDEV --size $MDSSIZE ||exit 10
72 ${LMC} -m $config --add lov --lov lov1 --mds mds1 --stripe_sz 65536 --stripe_cnt 1 --stripe_pattern 0 || exit 20
74 echo -n "adding OST on:"
75 for NODE in $OSTNODES; do
76 eval OSTDEV=\$OSTDEV$COUNT
78 OSTDEV=${OSTDEV:-$OSTDEV1}
79 ${LMC} -m $config --add ost --node $NODE --lov lov1 --dev $OSTDEV --size $OSTSIZE || exit 21
80 COUNT=`expr $COUNT + 1`
83 # create client config(s)
84 echo; echo -n "adding CLIENT on:"
85 for NODE in $CLIENTS; do
87 ${LMC} -m $config --add mtpt --node $NODE --path /mnt/lustre --mds mds1 --lov lov1 || exit 30