Whamcloud - gitweb
Fixes to shell scripts to check for errors and other improvements
[fs/lustre-release.git] / lustre / demos / obdtest.sh
1 #! /bin/bash
2 # Utility script to create an OBD snapshot.  If an existing filesystem is
3 # not already mounted on /mnt/obd, we call the basic OBD setup script to
4 # create and mount a filesystem for us.
5 OBDDIR="`dirname $0`/.."
6 [ "$OBDDIR" = "" ] && OBDDIR=".."
7 . $OBDDIR/demos/config.sh
8
9 [ ! -d $MNTOBD/lost+found ] && $OBDDIR/demos/obdfssetup.sh
10
11 echo "yesterday" > $MNTOBD/hello        # create a file
12 echo "testing" > $MNTOBD/goodbye        # create a file
13 ln -s hello $MNTOBD/link                # create a symbolic link
14 cd $MNTOBD ; touch a b c ; cd -         # create a file