SRCDIR="`dirname $0`"
. $SRCDIR/common.sh
-NETWORK=tcp
-LOCALHOST=localhost
-SERVER=localhost
-PORT=1234
+. $SRCDIR/llmount.sh
-setup_portals
-setup_lustre
-
-new_fs ext2 /tmp/ost 10000
-OST=$LOOPDEV
-MDSFS=ext3
-new_fs ${MDSFS} /tmp/mds 10000
-MDS=$LOOPDEV
-
-echo 0xffffffff > /proc/sys/portals/debug
-
-$OBDCTL <<EOF
-device 0
-attach mds MDSDEV
-setup ${MDS} ${MDSFS}
-device 1
-attach obdfilter OBDDEV
-setup ${OST}
-device 2
-attach ost OSTDEV
-setup 1
-device 3
-attach ptlrpc RPCDEV
-setup
-device 4
-attach ldlm LDLMDEV
-setup
-device 5
-attach osc OSCDEV
-setup -1
-quit
-EOF
-
-MNT='mount -t lustre_lite -o device=`$OBDCTL name2dev OSCDEV` none /mnt/lustre'
-$MNT
+MNT="setup_mount"
test_fail() {
echo $1 > /proc/sys/lustre/fail_loc
echo "Cleaning up and restarting MDS"
umount /mnt/lustre || fail "unable to unmount"
$OBDCTL <<- EOF
- device 0
+ name2dev MDSDEV
cleanup
detach
quit
echo 0 > /proc/sys/lustre/fail_loc
$OBDCTL <<- EOF
- device 0
- attach mds
+ newdev
+ attach mds MDSDEV
setup ${MDS} ${MDSFS}
quit
EOF