Whamcloud - gitweb
7287d68b98f1edc73993cd448f5165be8cf4e858
[fs/lustre-release.git] / lustre / tests / llmountcleanup.sh
1 #!/bin/sh
2
3 SRCDIR="`dirname $0`/"
4 . $SRCDIR/common.sh
5
6 TIME=`date +'%s'`
7
8 $DBGCTL debug_kernel /tmp/debug.1.$TIME 1
9
10 if mount | grep '/mnt/lustre'; then
11         umount /mnt/lustre || fail "cannot unmount"
12 fi
13
14 killall acceptor
15 rmmod llite
16
17 $OBDCTL <<EOF
18 name2dev MDCDEV
19 cleanup
20 detach
21 name2dev OSCDEV
22 cleanup
23 detach
24 name2dev OSTDEV
25 cleanup
26 detach
27 name2dev OBDDEV
28 cleanup
29 detach
30 name2dev MDSDEV
31 cleanup
32 detach
33 name2dev LDLMDEV
34 cleanup
35 detach
36 name2dev RPCDEV
37 cleanup
38 detach
39 quit
40 EOF
41
42 rmmod obdecho
43 rmmod mds_extN
44 rmmod mds_ext3
45 rmmod mds_ext2
46 rmmod mds
47 rmmod mdc
48 rmmod osc
49 rmmod ost
50 rmmod obdfilter
51 rmmod obdext2
52 rmmod ldlm
53 rmmod ptlrpc
54 rmmod obdclass
55 rmmod extN
56
57 $DBGCTL debug_kernel /tmp/debug.2.$TIME 1
58
59 $PTLCTL <<EOF
60 setup tcp
61 disconnect
62 del_uuid self
63 del_uuid localhost
64 del_uuid localhost
65 del_uuid localhost
66 quit
67 EOF
68
69 rmmod kqswnal
70 rmmod ksocknal
71 rmmod portals
72
73 losetup -d ${LOOP}0
74 losetup -d ${LOOP}1
75 losetup -d ${LOOP}2
76 exit 0