Whamcloud - gitweb
land 0.5.20.3 b_devel onto HEAD (b_devel will remain)
[fs/lustre-release.git] / lustre / tests / local.sh
1
2 #!/bin/bash
3
4 config=${1:-local.xml}
5
6 LMC="${LMC:-../utils/lmc} -m $config"
7 TMP=${TMP:-/tmp}
8
9 MDSDEV=${MDSDEV:-$TMP/mds1}
10 MDSSIZE=${MDSSIZE:-50000}
11
12 OSTDEV=${OSTDEV:-$TMP/ost1}
13 OSTSIZE=${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
26 rm -f $config
27
28 # create nodes
29 ${LMC} --add node --node localhost || exit 10
30 ${LMC} --add net --node  localhost --nid localhost --nettype tcp || exit 11
31
32 # configure mds server
33 ${LMC} --add mds  --node localhost --mds mds1 $FSTYPE --dev $MDSDEV --size $MDSSIZE || exit 20
34
35 # configure ost
36 ${LMC} --add ost --node localhost --ost obd1 $FSTYPE --dev $OSTDEV --size  $OSTSIZE || exit 30
37
38 # create client config
39 ${LMC} --add mtpt --node localhost --path /mnt/lustre --mds mds1 --ost obd1 || exit 40