Whamcloud - gitweb
land 0.5.20.3 b_devel onto HEAD (b_devel will remain)
[fs/lustre-release.git] / lustre / tests / ba-mount.sh
1 #!/bin/bash
2
3 # There are configurations for three machines in this config file: the OST,
4 # the MDS/client, other clients
5 #
6 # To start your cluster using the ba-mount.xml file that this produces, first
7 # run:
8 # > lconf ba-mount.xml
9 # on the MDS/client, and then run:
10 # > lconf --node client ba-mount.xml
11 # on any other clients.
12
13 config=${1:-ba-mount.xml}
14
15 LMC_REAL="${LMC:-../utils/lmc} -m $config"
16 LMC="save_cmd"
17
18 TCPBUF=1048576
19 OST=${OST:-ba-ost-1}
20 MDS=`hostname`
21  
22 UUIDLIST=${UUIDLIST:-/usr/local/admin/ba-ost/UUID.txt}
23
24 h2tcp () {
25     echo "${1}"
26 }
27 BATCH=/tmp/lmc-batch.$$
28 save_cmd() {
29     echo "$@" >> $BATCH
30 }
31
32 [ -f $config ] && rm $config
33
34 # MDS/client node
35 ${LMC} --add net --node $MDS --tcpbuf $TCPBUF --nid $MDS --nettype tcp
36 ${LMC} --add mds --node $MDS --mds mds1 --dev /tmp/mds1 --size 50000
37
38 OST_UUID=`awk "/$OST / { print \\$3 }" $UUIDLIST`
39 [ "$OST_UUID" ] && OST_UUID="--ostuuid $OST_UUID" || echo "$OST: no UUID"
40
41 # server node
42 ${LMC} --add net --node $OST --tcpbuf $TCPBUF --nid $OST --nettype tcp
43 ${LMC} --add ost --node $OST --ost ost1 $OST_UUID --dev bluearc
44
45 # mount point on the MDS/client
46 ${LMC} --add mtpt --node $MDS --path /mnt/lustre --mds mds1 --lov ost1
47
48 # other clients
49 ${LMC} --add net --node client --tcpbuf $TCPBUF --nid '*' --nettype tcp
50 ${LMC} --add mtpt --node client --path /mnt/lustre --mds mds1 --lov ost1
51
52 $LMC_REAL --batch $BATCH
53 rm -f $BATCH