Whamcloud - gitweb
- ext2_obd.c --- fix the bugs in read/write for Linux 2.4.3
[fs/lustre-release.git] / lustre / demos / snapsetup.sh
index c1fee96..ff95718 100755 (executable)
@@ -2,17 +2,17 @@
 # Utility script to create an OBD snapshot.  If an existing filesystem is
 # not already mounted on /mnt/obd, we call the basic OBD setup script to
 # create and mount a filesystem for us.
+#
+# Copyright (C) 2001  Cluster File Systems, Inc.
+#
+# This code is issued under the GNU General Public License.
+# See the file COPYING in this distribution
+
 OBDDIR="`dirname $0`/.."
 . $OBDDIR/demos/config.sh
 
 
 # prepare the snapshot drive with a file to be COW'd
-mount | grep "$MNTOBD " > /dev/null 2>&1
-if [ x$? = x0 ]; then 
-    echo "Stuff still mounted on $MNTOBD; clean up first."
-    exit 
-fi
-
 if [ ! -d /mnt/obd/lost+found ]; then 
     $OBDDIR/demos/obdfssetup.sh
     if [ x$? != x0 ]; then 
@@ -29,9 +29,9 @@ if [ ! -f $MNTOBD/hello ]; then
     fi
 fi
 
-umount $MNTOBD
+plog umount $MNTOBD
 
-insmod $OBDDIR/snap/obdsnap.o
+#plog insmod $OBDDIR/snap/obdsnap.o
 
 rm -f $SNAPTABLE
 
@@ -55,10 +55,10 @@ q
 y
 snapset 0 $SNAPTABLE
 device /dev/obd1
-attach snap_obd 0 1 0
+attach obdsnap 0 1 0
 setup
 device /dev/obd2
-attach snap_obd 0 2 0
+attach obdsnap 0 2 0
 setup
 quit
 EOF