From 187a5599df54d9853e4f82610a80d47f2ce26baf Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 29 Oct 2002 23:20:17 +0000 Subject: [PATCH] Allow uml.sh to generate a 1-server, 3-client config nicely if desired. --- lustre/tests/uml.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/lustre/tests/uml.sh b/lustre/tests/uml.sh index 6070723..693dd77 100644 --- a/lustre/tests/uml.sh +++ b/lustre/tests/uml.sh @@ -13,12 +13,20 @@ OSTSIZE=100000 MDSNODE=uml1 OSTNODE=uml2 -CLIENT=uml3 +# NOTE - You can't have different MDS/OST nodes and also have clients on the +# MDS/OST nodes without using --endlevel and --startlevel during lconf. +# You can put both MDS/OST on one node and client can be there too. +# CLIENTS is a space-separated list of client nodes. +CLIENTS="uml3" + +rm -f $config # create nodes -${LMC} -o $config --node $MDSNODE --net $MDSNODE tcp || exit 1 -${LMC} -m $config --node $OSTNODE --net $OSTNODE tcp || exit 2 -${LMC} -m $config --node $CLIENT --net $CLIENT tcp || exit 3 +for NODE in $MDSNODE $OSTNODE $CLIENTS; do + eval [ \$$NODE ] && continue + ${LMC} -m $config --node $NODE --net $NODE tcp || exit 1 + eval "$NODE=done" +done # configure mds server ${LMC} -m $config --format --node $MDSNODE --mds mds1 $MDSDEV $MDSSIZE ||exit 10 @@ -28,6 +36,8 @@ ${LMC} -m $config --lov lov1 mds1 65536 0 0 || exit 20 ${LMC} -m $config --node $OSTNODE --lov lov1 --ost $OSTDEV1 $OSTSIZE || exit 21 ${LMC} -m $config --node $OSTNODE --lov lov1 --ost $OSTDEV2 $OSTSIZE || exit 22 -# create client config -${LMC} -m $config --node $CLIENT --mtpt /mnt/lustre mds1 lov1 || exit 30 +# create client config(s) +for NODE in $CLIENTS; do + ${LMC} -m $config --node $NODE --mtpt /mnt/lustre mds1 lov1 || exit 30 +done -- 1.8.3.1