# 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
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"
setup
quit
EOF
+ list_mods
[ -d /mnt/lustre ] || mkdir /mnt/lustre
}
setup
quit
EOF
-
+ list_mods
}
find_devno() {
setup ${MDS} ${MDSFS}
quit
EOF
+ list_mods
}
setup_mds_lov() {
disconnect
quit
EOF
+
+ list_mods
}
setup ${OBD} ${OBDARG}
quit
EOF
+ list_mods
+
$OBDCTL <<- EOF || return $?
newdev
attach ost OSTDEV OSTUUID
setup \$OBDDEV
quit
EOF
+ list_mods
}
setup_server() {
quit
EOF
done
+ list_mods
}
setup_mdc() {
quit
EOF
done
+ list_mods
}
setup_lov () {
setup MDCDEV-UUID
quit
EOF
+ list_mods
}
[ ! -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
}
do_rmmod ptlrpc
do_rmmod obdclass
+ do_rmmod kptlrouter
do_rmmod kqswnal
do_rmmod ksocknal
do_rmmod portals
#!/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
#!/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