Whamcloud - gitweb
Fixes to shell scripts to check for errors and other improvements
[fs/lustre-release.git] / lustre / demos / snapclean.sh
1 #! /bin/bash
2 # Utility script for cleaning up snapshots and removing modules.
3 OBDDIR="`dirname $0`/.."
4 [ "$OBDDIR" = "" ] && OBDDIR=".."
5 . $OBDDIR/demos/config.sh
6
7 plog umount $MNTOBD
8 plog umount $MNTSNAP
9
10 plog log "CLEANUP /dev/obd2 /dev/obd1"
11 $OBDDIR/class/obdcontrol -f << EOF
12 device /dev/obd2
13 cleanup
14 detach
15 device /dev/obd1
16 cleanup
17 detach
18 quit
19 EOF
20
21 rmmod obdsnap
22
23 $OBDDIR/demos/obdfsclean.sh