Whamcloud - gitweb
like a bad penny
[fs/lustre-release.git] / lustre / tests / mount2.sh
1 #!/bin/bash
2
3 config=${1:-mount2.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=100000
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 # create nodes
25 ${LMC} -o $config --add net --node localhost --nid localhost --nettype tcp || exit 1
26
27 # configure mds server
28 ${LMC} -m $config --add mds --format --node localhost $FSTYPE --mds mds1 --dev $MDSDEV --size $MDSSIZE || exit 2
29
30 # configure ost
31 ${LMC} -m $config --add ost --format --obd obd1 --node localhost $FSTYPE --dev $OSTDEV --size $OSTSIZE || exit 3
32
33 # create client config
34 ${LMC} -m $config --add mtpt --node localhost --path /mnt/lustre1 --mds mds1 --obd obd1 || exit 4
35 ${LMC} -m $config --add mtpt --node localhost --path /mnt/lustre2 --mds mds1 --obd obd1 || exit 4