Whamcloud - gitweb
branch: HEAD
[fs/lustre-release.git] / lustre / tests / cobd.sh
1 #!/bin/bash
2
3
4 config=${1:-$(basename $0 .sh)}.xml
5
6 LMC=${LMC:-../utils/lmc -m $config}
7 TMP=${TMP:-/tmp}
8
9 HOSTNAME=`hostname`
10
11 MDSDEV=${MDSDEV:-$TMP/mds1-`hostname`}
12 MDSSIZE=50000
13 FSTYPE=${FSTYPE:-ext3}
14
15 OSTDEV=${OSTDEV:-$TMP/ost1-`hostname`}
16 OSTSIZE=200000
17
18 rm -f $config
19 # create nodes
20 ${LMC} --add node --node $HOSTNAME || exit 10
21 ${LMC} --add net --node  $HOSTNAME --nid $HOSTNAME --nettype tcp || exit 11
22
23 # configure mds server
24 ${LMC}  --add mds  --node $HOSTNAME --mds mds1 --fstype $FSTYPE --dev $MDSDEV --size $MDSSIZE || exit 20
25
26 # configure ost
27 ${LMC} --add ost --node $HOSTNAME --obd obd1 --fstype $FSTYPE --obdtype obdecho || exit 30
28 # configure ost
29 ${LMC} --add ost --node $HOSTNAME --obd obd2 --fstype $FSTYPE --obdtype obdecho || exit 30
30
31 ${LMC} --add cobd --node $HOSTNAME --real_obd obd1 --cache_obd obd2
32
33 # create client config
34 # ${LMC} -m $config --add mtpt --node $HOSTNAME --path /mnt/lustre --mds mds1 --obd obd1 || exit 40