Whamcloud - gitweb
Change configs to use port 988 instead of 2432.
[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 PORT=988
19 TCPBUF=1048576
20 OST=ba-ost-1
21 MDS=mds-hostname
22  
23 UUIDLIST=${UUIDLIST:-/usr/local/admin/ba-ost/UUID.txt}
24
25 h2ip () {
26     echo "${1}"
27 }
28 BATCH=/tmp/lmc-batch.$$
29 save_cmd() {
30     echo "$@" >> $BATCH
31 }
32
33 [ -f $config ] && rm $config
34
35 # MDS/client node
36 ${LMC} --node $MDS --tcpbuf $TCPBUF --net '*' tcp $PORT
37 ${LMC} --node $MDS --mds mds1 /tmp/mds1 50000
38
39 OBD_UUID=`awk "/$OST / { print \\$3 }" $UUIDLIST`
40 [ "$OBD_UUID" ] && OBD_UUID="--obduuid=$OBD_UUID" || echo "$OST: no UUID"
41
42 # server node
43 ${LMC} --node $OST --tcpbuf $TCPBUF --net $OST tcp $PORT
44 ${LMC} --node $OST $OBD_UUID --ost bluearc
45
46 # mount point on the MDS/client
47 ${LMC} --node $MDS --mtpt /mnt/lustre mds1 OSC_$OST
48
49 # other clients
50 ${LMC} --node client --tcpbuf $TCPBUF --net '*' tcp $PORT
51 ${LMC} --node client --mtpt /mnt/lustre mds1 OSC_$OST
52
53 $LMC_REAL --batch $BATCH
54 rm -f $BATCH