#!/bin/sh
-SRCDIR="`dirname $0`"
+SRCDIR="`dirname $0`/"
. $SRCDIR/common.sh
-$DBGCTL get_debug > /tmp/debug.1
+TIME=`date +'%s'`
-if [ "`mount | grep '/mnt/lustre'`" ]; then
+$DBGCTL debug_kernel /tmp/debug.1.$TIME 1
+
+if mount | grep '/mnt/lustre'; then
umount /mnt/lustre || fail "cannot unmount"
fi
killall acceptor
rmmod llite
-rmmod mdc
$OBDCTL <<EOF
-name2dev OSCDEV
+name2dev MDCDEV
cleanup
detach
-name2dev LDLMDEV
-cleanup
-detach
-name2dev RPCDEV
+name2dev OSCDEV
cleanup
detach
name2dev OSTDEV
name2dev MDSDEV
cleanup
detach
+name2dev LDLMDEV
+cleanup
+detach
+name2dev RPCDEV
+cleanup
+detach
quit
EOF
rmmod obdecho
+rmmod mds_extN
+rmmod mds_ext3
+rmmod mds_ext2
rmmod mds
+rmmod mdc
rmmod osc
rmmod ost
rmmod obdfilter
rmmod ldlm
rmmod ptlrpc
rmmod obdclass
+rmmod extN
-$DBGCTL get_debug > /tmp/debug.2
+$DBGCTL debug_kernel /tmp/debug.2.$TIME 1
$PTLCTL <<EOF
setup tcp
disconnect
del_uuid self
-del_uuid mds
-del_uuid ost
-del_uuid ldlm
+del_uuid localhost
+del_uuid localhost
+del_uuid localhost
quit
EOF
rmmod kqswnal
rmmod ksocknal
+
+$DBGCTL debug_kernel /tmp/debug.3.$TIME 1
+
rmmod portals
losetup -d ${LOOP}0
losetup -d ${LOOP}1
losetup -d ${LOOP}2
+exit 0