X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Flocal.sh;h=0f8fe13facd813543a510861c5e41053caacd5f9;hb=885e91e00458c85d5dafb26e20142a2ea0c0b7fb;hp=348e2e94bf67ab4cfd9eb75d72712f82a56cd983;hpb=67e9e13ac21c0bbe8ef2ef95c76d30af4ea486e3;p=fs%2Flustre-release.git diff --git a/lustre/tests/local.sh b/lustre/tests/local.sh index 348e2e9..0f8fe13 100755 --- a/lustre/tests/local.sh +++ b/lustre/tests/local.sh @@ -1,34 +1,45 @@ #!/bin/bash +export PATH=`dirname $0`/../utils:$PATH + config=${1:-local.xml} -LMC=${LMC:-../utils/lmc} +LMC="${LMC:-lmc} -m $config" TMP=${TMP:-/tmp} -MDSDEV=$TMP/mds1 -MDSSIZE=100000 +MDSDEV=${MDSDEV:-$TMP/mds1-`hostname`} +MDSSIZE=${MDSSIZE:-100000} +FSTYPE=${FSTYPE:-ext3} +MOUNT=${MOUNT:-/mnt/lustre} +MOUNT2=${MOUNT2:-${MOUNT}2} +NETWORKTYPE=${NETWORKTYPE:-tcp} + +OSTDEV=${OSTDEV:-$TMP/ost1-`hostname`} +OSTSIZE=${OSTSIZE:-200000} -OSTDEV=$TMP/ost1 -OSTSIZE=250000 +# specific journal size for the ost, in MB +JSIZE=${JSIZE:-0} +[ "$JSIZE" -gt 0 ] && JARG="--journal_size $JSIZE" +MDSISIZE=${MDSISIZE:-0} +[ "$MDSISIZE" -gt 0 ] && IARG="--inode_size $MDSISIZE" -kver=`uname -r | cut -d "." -f 1,2` +STRIPE_BYTES=65536 +STRIPES_PER_OBJ=0 # 0 means stripe over all OSTs -case $kver in - 2.4) FSTYPE="--fstype=extN" ;; - 2.5) FSTYPE="--fstype=ext3" ;; - *) echo "Kernel version $kver not supported" - exit 1 - ;; -esac +rm -f $config # create nodes -${LMC} -o $config --node localhost --net localhost tcp || exit 1 +${LMC} --add node --node localhost || exit 10 +${LMC} --add net --node localhost --nid `hostname` --nettype $NETWORKTYPE || exit 11 +${LMC} --add net --node client --nid '*' --nettype $NETWORKTYPE || exit 12 # configure mds server -${LMC} -m $config --format --node localhost $FSTYPE --mds mds1 $MDSDEV $MDSSIZE || exit 2 +${LMC} --add mds --nspath /mnt/mds_ns --node localhost --mds mds1 --fstype $FSTYPE --dev $MDSDEV --size $MDSSIZE $JARG $IARG || exit 20 # configure ost -${LMC} -m $config --format --node localhost $FSTYPE --ost $OSTDEV $OSTSIZE || exit 3 +${LMC} -m $config --add lov --lov lov1 --mds mds1 --stripe_sz $STRIPE_BYTES --stripe_cnt $STRIPES_PER_OBJ --stripe_pattern 0 || exit 20 +${LMC} --add ost --nspath /mnt/ost_ns --node localhost --lov lov1 --fstype $FSTYPE --dev $OSTDEV --size $OSTSIZE $JARG || exit 30 # create client config -${LMC} -m $config --node localhost --mtpt /mnt/lustre mds1 OSC_localhost || exit 4 +${LMC} --add mtpt --node localhost --path $MOUNT --mds mds1 --lov lov1 || exit 40 +${LMC} --add mtpt --node client --path $MOUNT2 --mds mds1 --lov lov1 || exit 41