Whamcloud - gitweb
* New LMC Interface
[fs/lustre-release.git] / lustre / tests / local.sh
1 #!/bin/bash
2
3 config=${1:-local.xml}
4
5 LMC=${LMC:-../utils/lmc}
6 TMP=${TMP:-/tmp}
7
8 MDSDEV=$TMP/mds1
9 MDSSIZE=50000
10
11 OSTDEV=$TMP/ost1
12 OSTSIZE=200000
13
14 kver=`uname -r | cut -d "." -f 1,2`
15
16 case $kver in
17   2.4) FSTYPE="--fstype=extN"  ;;
18   2.5) FSTYPE="--fstype=ext3"  ;;
19   *) echo "Kernel version $kver not supported"
20      exit 1
21      ;;
22 esac
23
24
25 # create nodes
26 ${LMC} -o $config --add node --node localhost || exit 10
27 ${LMC} -o $config --add net --node  localhost --nid localhost --nettype tcp || exit 11
28
29 # configure mds server
30 ${LMC} -m $config --add mds  --node localhost --mds mds1 --dev $MDSDEV --size $MDSSIZE || exit 20
31
32 # configure ost
33 ${LMC} -m $config --add ost --node localhost --obd obd1 --dev $OSTDEV --size  $OSTSIZE || exit 30
34
35 # create client config
36 ${LMC} -m $config --add mtpt --node localhost --path /mnt/lustre --mds mds1 --obd obd1 || exit 40