Whamcloud - gitweb
* New LMC Interface
[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 MDSDEV=$TMP/mds1
10 MDSSIZE=50000
11
12 OSTDEV=$TMP/ost1
13 OSTSIZE=200000
14
15 kver=`uname -r | cut -d "." -f 1,2`
16
17 case $kver in
18   2.4) FSTYPE="--fstype=extN"  ;;
19   2.5) FSTYPE="--fstype=ext3"  ;;
20   *) echo "Kernel version $kver not supported"
21      exit 1
22      ;;
23 esac
24
25 rm -f $config
26 # create nodes
27 ${LMC} --add node --node localhost || exit 10
28 ${LMC} --add net --node  localhost --nid localhost --nettype tcp || exit 11
29
30 # configure mds server
31 ${LMC}  --add mds  --node localhost --mds mds1 --dev $MDSDEV --size $MDSSIZE || exit 20
32
33 # configure ost
34 ${LMC} --add ost --node localhost --obd obd1 --obdtype obdecho || exit 30
35 # configure ost
36 ${LMC} --add ost --node localhost --obd obd2 --obdtype obdecho || exit 30
37
38 ${LMC} --add cobd --node localhost --real_obd obd1 --cache_obd obd2
39
40 # create client config
41 # ${LMC} -m $config --add mtpt --node localhost --path /mnt/lustre --mds mds1 --obd obd1 || exit 40