From 396eb385f7dd93f08c2faadafd0208cce157f0d9 Mon Sep 17 00:00:00 2001 From: rread Date: Fri, 12 Jul 2002 06:59:55 +0000 Subject: [PATCH] - fixes from santa fe --- lustre/tests/common.sh | 18 +++++++-- lustre/tests/intent-test.sh | 97 ++++++++++++++++++++++----------------------- lustre/tests/lustre.cfg | 61 ++++++++++++++++++---------- 3 files changed, 103 insertions(+), 73 deletions(-) diff --git a/lustre/tests/common.sh b/lustre/tests/common.sh index a97bfcb..3130bc7 100644 --- a/lustre/tests/common.sh +++ b/lustre/tests/common.sh @@ -156,7 +156,7 @@ start_acceptor() { # the command-line, or it can be found in the home directory, or it # can even be sourced into the current shell environment. setup_opts() { - DEF=$HOME/.lustretestrc + DEF=/etc/lustre/lustre.cfg [ -r $DEF ] && . $DEF && SETUP=y for CFG in "$@" ; do @@ -249,7 +249,6 @@ setup_lustre() { fi echo "$R/tmp/lustre-log" > /proc/sys/portals/debug_path - list_mods if $OBDCTL name2dev RPCDEV > /dev/null 2>&1; then echo "$0: RPCDEV is already configured, skipping" @@ -262,6 +261,7 @@ setup_lustre() { setup quit EOF + list_mods [ -d /mnt/lustre ] || mkdir /mnt/lustre } @@ -277,7 +277,7 @@ setup_ldlm() { setup quit EOF - + list_mods } find_devno() { @@ -317,6 +317,7 @@ setup_mds() { setup ${MDS} ${MDSFS} quit EOF + list_mods } setup_mds_lov() { @@ -335,6 +336,8 @@ setup_mds_lov() { disconnect quit EOF + + list_mods } @@ -389,12 +392,15 @@ setup_ost() { setup ${OBD} ${OBDARG} quit EOF + list_mods + $OBDCTL <<- EOF || return $? newdev attach ost OSTDEV OSTUUID setup \$OBDDEV quit EOF + list_mods } setup_server() { @@ -421,6 +427,7 @@ setup_osc() { quit EOF done + list_mods } setup_mdc() { @@ -442,6 +449,7 @@ setup_mdc() { quit EOF done + list_mods } setup_lov () { @@ -458,6 +466,7 @@ setup_lov () { setup MDCDEV-UUID quit EOF + list_mods } @@ -479,7 +488,7 @@ setup_mount() { [ ! -d $MTPT ] && mkdir $MTPT echo mount -t lustre_lite -o ost=${THEOSC}-UUID,mds=${THEMDC}-UUID none $MTPT - mount -t lustre_lite -o ost=${THEOSC}-UUID,mds=${THEMDC}-UUID none $MTPT + mount -t lustre_lite -o ost=${THEOSC}-UUID,mds=${THEMDC}-UUID none $MTPT done done } @@ -529,6 +538,7 @@ cleanup_portals() { do_rmmod ptlrpc do_rmmod obdclass + do_rmmod kptlrouter do_rmmod kqswnal do_rmmod ksocknal do_rmmod portals diff --git a/lustre/tests/intent-test.sh b/lustre/tests/intent-test.sh index 7837b62..3e6cfbb 100755 --- a/lustre/tests/intent-test.sh +++ b/lustre/tests/intent-test.sh @@ -1,123 +1,122 @@ #!/bin/bash -x -OST=`../utils/obdctl name2dev OSCDEV` -MDS=`../utils/obdctl name2dev MDCDEV` +MTPT=/mnt/lustre remount() { - umount /mnt/lustre || exit -1 + umount $MTPT || exit -1 debugctl clear - mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre || exit -1 + mount -t lustre_lite -o ost=OSCDEV-UUID,mds=MDCDEV-UUID none $MTPT } # Test mkdir -mkdir /mnt/lustre/dir -mkdir /mnt/lustre/dir2 +mkdir $MTPT/dir +mkdir $MTPT/dir2 # Test mkdir on existing directory -mkdir /mnt/lustre/dir +mkdir $MTPT/dir remount # Test mkdir on existing directory with no locks already held -mkdir /mnt/lustre/dir +mkdir $MTPT/dir remount # Use mknod to create a file -./mcreate /mnt/lustre/file +./mcreate $MTPT/file # ...on an existing file. -./mcreate /mnt/lustre/file +./mcreate $MTPT/file remount # Use mknod to create a file with no locks already held -./mcreate /mnt/lustre/file +./mcreate $MTPT/file remount -ls -l /mnt/lustre/file +ls -l $MTPT/file remount -cat /mnt/lustre/file -./mcreate /mnt/lustre/file2 -cat /mnt/lustre/file2 -./mcreate /mnt/lustre/file3 +cat $MTPT/file +./mcreate $MTPT/file2 +cat $MTPT/file2 +./mcreate $MTPT/file3 remount -./tchmod 777 /mnt/lustre/file3 +./tchmod 777 $MTPT/file3 remount -./mcreate /mnt/lustre/file4 -./tchmod 777 /mnt/lustre/file4 +./mcreate $MTPT/file4 +./tchmod 777 $MTPT/file4 remount -ls -l /mnt/lustre/file4 -./tchmod 777 /mnt/lustre/file4 +ls -l $MTPT/file4 +./tchmod 777 $MTPT/file4 remount -cat /mnt/lustre/file4 -./tchmod 777 /mnt/lustre/file4 +cat $MTPT/file4 +./tchmod 777 $MTPT/file4 remount -touch /mnt/lustre/file5 -touch /mnt/lustre/file6 -touch /mnt/lustre/file5 +touch $MTPT/file5 +touch $MTPT/file6 +touch $MTPT/file5 remount -touch /mnt/lustre/file5 +touch $MTPT/file5 remount -echo foo >> /mnt/lustre/file -cat /mnt/lustre/file +echo foo >> $MTPT/file +cat $MTPT/file remount -cat /mnt/lustre/file +cat $MTPT/file -echo foo >> /mnt/lustre/iotest -echo bar >> /mnt/lustre/iotest -cat /mnt/lustre/iotest +echo foo >> $MTPT/iotest +echo bar >> $MTPT/iotest +cat $MTPT/iotest remount -cat /mnt/lustre/iotest -echo baz >> /mnt/lustre/iotest +cat $MTPT/iotest +echo baz >> $MTPT/iotest remount -ls /mnt/lustre +ls $MTPT remount -mkdir /mnt/lustre/new -ls /mnt/lustre +mkdir $MTPT/new +ls $MTPT remount -ls /mnt/lustre -mkdir /mnt/lustre/newer -ls /mnt/lustre +ls $MTPT +mkdir $MTPT/newer +ls $MTPT remount -cat /mnt/lustre/iotest +cat $MTPT/iotest echo "Testing truncation..." -echo foo > /mnt/lustre/iotest -echo bar >> /mnt/lustre/iotest -cat /mnt/lustre/iotest +echo foo > $MTPT/iotest +echo bar >> $MTPT/iotest +cat $MTPT/iotest echo "trucating to 4 bytes now..." -./truncate /mnt/lustre/iotest 4 -cat /mnt/lustre/iotest +./truncate $MTPT/iotest 4 +cat $MTPT/iotest remount -ls /mnt/lustre -rmdir /mnt/lustre/foo +ls $MTPT +rmdir $MTPT/foo diff --git a/lustre/tests/lustre.cfg b/lustre/tests/lustre.cfg index b09f157..6fa7e18 100644 --- a/lustre/tests/lustre.cfg +++ b/lustre/tests/lustre.cfg @@ -1,26 +1,47 @@ #!/bin/sh -# Config file for running tests on a single host over loopback TCP + +# Common configuration options +# Config file for setting up a remote server with a real OST NETWORK=tcp -LOCALHOST=localhost -SERVER=localhost +LOCALHOST=`hostname` +SERVER=$LOCALHOST +OSTNODE=$LOCALHOST +CLIENTS=* +#SERVER=dev4 +#OSTNODE=dev4 PORT=2432 -# Config file for setting up a metadata server -MDSFS=extN -MDSDEV=/tmp/mds -MDSSIZE=25000 -SETUP_MDS=y -# LOVUUID=LovUUID +# Config file for setting up the lock manager +SETUP_LDLM=y + +#case `echo $LOCALHOST | sed "s/\.[^|]*//"` in +case $LOCALHOST in +$SERVER) + # Config for setting up a metadata server + MDSFS=extN + MDSDEV=/tmp/mds + MDSSIZE=50000 + SETUP_MDS=y + ;; +esac -# Config file for mounting a client Lustre filesystem -SETUP_MDC=y -SETUP_OSC=y -OSCMT=/mnt/lustre -SETUP_MOUNT=y +case $LOCALHOST in +$OSTNODE) + # Config for setting up an object storage target with obdfilter + OSTDEV=/tmp/ost + OSTSIZE=200000 + OSTFS=extN + OSTTYPE=obdfilter + SETUP_OST=y + ;; +esac -# Config file for setting up an object storage target with obdfilter -OSTDEV=/tmp/ost -OSTSIZE=10000 -OSTFS=extN -OSTTYPE=obdfilter -SETUP_OST=y +case $LOCALHOST in +$CLIENTS) + # Config for setting up a client filesystem mount + SETUP_MDC=y + SETUP_OSC=y + OSCMT=/mnt/lustre + SETUP_MOUNT=y + ;; +esac -- 1.8.3.1