3 export PATH=`dirname $0`/../utils:$PATH
9 MDSDEV=${MDSDEV:-$TMP/mds1-`hostname`}
10 MDSSIZE=${MDSSIZE:-50000}
13 #OSTDEV1=${OSTDEV1:-${OSTDEVBASE}1}
14 #OSTDEV2=${OSTDEV2:-${OSTDEVBASE}2}
16 OSTSIZE=${OSTSIZE:-100000}
17 STRIPECNT=${STRIPECNT:-1}
19 FSTYPE=${FSTYPE:-ext3}
21 NETTYPE=${NETTYPE:-tcp}
22 NIDTYPE=${NIDTYPE:-$NODETYPE}
24 # NOTE - You can't have different MDS/OST nodes and also have clients on the
25 # MDS/OST nodes without using --endlevel and --startlevel during lconf.
26 # You can put both MDS/OST on one node and client can be there too.
27 # CLIENTS is a space-separated list of client nodes.
29 # The rule is that both the MDS and the OST must be set up before any
30 # of the clients can be started, so plan accordingly.
32 # Three separate systems
33 MDSNODE=${MDSNODE:-uml1}
34 OSTNODES=${OSTNODES:-"uml2 uml2"}
35 CLIENTS=${CLIENTS:-"uml3"}
37 # Single system with additional clients
40 #CLIENTS="$MDSNODE client"
42 # Two systems with client on MDS, and additional clients (set up OST first)
45 #CLIENTS="$MDSNODE client"
47 # Two systems with client on OST, and additional clients (set up MDS first)
50 #CLIENTS="$OSTNODES client"
68 *) echo $1 | sed "s/[^0-9]*//" ;;
73 echo -n "adding NET for:"
74 for NODE in `echo $MDSNODE $OSTNODES $CLIENTS | tr -s " " "\n" | sort -u`; do
76 ${LMC} -m $config --add net --node $NODE --nid `h2$NIDTYPE $NODE` --nettype $NETTYPE || exit 1
79 # configure mds server
80 echo; echo "adding MDS on: $MDSNODE"
81 ${LMC} -m $config --add mds --format --node $MDSNODE --mds mds1 --fstype $FSTYPE --dev $MDSDEV --size $MDSSIZE ||exit 10
84 ${LMC} -m $config --add lov --lov lov1 --mds mds1 --stripe_sz 65536 --stripe_cnt $STRIPECNT --stripe_pattern 0 || exit 20
86 echo -n "adding OST on:"
87 for NODE in $OSTNODES; do
88 eval OSTDEV=\$OSTDEV$COUNT
90 OSTDEV=${OSTDEV:-$OSTDEVBASE$COUNT-`hostname`}
91 ${LMC} -m $config --add ost --node $NODE --lov lov1 --fstype $FSTYPE --dev $OSTDEV --size $OSTSIZE || exit 21
92 COUNT=`expr $COUNT + 1`
95 # create client config(s)
96 echo; echo -n "adding CLIENT on:"
97 for NODE in $CLIENTS; do
99 ${LMC} -m $config --add mtpt --node $NODE --path /mnt/lustre --mds mds1 --lov lov1 || exit 30