Whamcloud - gitweb
ext2obd/ext2_obd.c: added iput() after reading a bad inode,
[fs/lustre-release.git] / lustre / demos / snaprestclean.sh
1 #! /bin/bash
2 # Utility script for cleaning up a simple OBDFS mounted filesystem
3 OBDDIR="`dirname $0`/.."
4 . $OBDDIR/demos/config.sh
5
6 umount $MNTOBD
7 mount | grep "$MNTOBD " > /dev/null 2>&1
8 if [ x$? = x0 ]; then 
9     echo "Stuff still mounted on $MNTOBD; clean up first."
10     exit 
11 fi
12
13 $OBDDIR/class/obdcontrol -f << EOF
14 device /dev/obd2
15 cleanup
16 detach
17 device /dev/obd0
18 cleanup
19 detach
20 quit
21 EOF
22
23 rmmod obdfs
24 rmmod obdsnap
25 rmmod obdext2
26 rmmod obdclass
27
28 rm $SNAPTABLE
29 $OBDDIR/demos/baseclean.sh