Whamcloud - gitweb
7c25103b930cbdadb3e7dfbdcd346ab183a0bf66
[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 --node localhost --net localhost tcp || exit 1
26
27 # configure mds server
28 ${LMC} -m $config --format --node localhost $FSTYPE --mds mds1 $MDSDEV $MDSSIZE || exit 2
29
30 # configure ost
31 ${LMC} -m $config --format --node localhost $FSTYPE --ost $OSTDEV $OSTSIZE || exit 3
32
33 # create client config
34 ${LMC} -m $config --node localhost --mtpt /mnt/lustre mds1 OSC_localhost || exit 4
35 ${LMC} -m $config --node localhost --mtpt /mnt/lustre2 mds1 OSC_localhost || exit 4