Whamcloud - gitweb
Minor cleanups and debugging statements added.
[fs/lustre-release.git] / lustre / tests / llmountcleanup.sh
1 #!/bin/sh
2 LOOP0=/dev/loop0
3 LOOP1=/dev/loop1
4
5 if [ ! -e $LOOP0 ]; then
6     echo $LOOP0 'doesnt exist: (not) using devfs?' 
7     exit
8 fi
9
10 umount /mnt/obd
11
12 rmmod llight
13 rmmod mdc
14 /usr/src/obd/utils/obdctl <<EOF
15 device 3
16 cleanup
17 detach
18 device 2
19 cleanup
20 detach
21 device 1
22 cleanup
23 detach
24 device 0
25 cleanup
26 detach
27 quit
28 EOF
29 rmmod mds
30 rmmod osc
31 rmmod ost
32 rmmod obdext2
33 rmmod obdclass
34 rmmod ptlrpc
35 /usr/src/portals/linux/utils/ptlctl <<EOF
36 setup tcp localhost 1234
37 disconnect self
38 disconnect mds
39 EOF
40 rmmod ksocknal
41 killall acceptor
42 rmmod portals
43
44 losetup -d $LOOP0
45 losetup -d $LOOP1