Whamcloud - gitweb
Update copyright and license information.
[fs/lustre-release.git] / lustre / tests / snaprun.sh
1 #!/bin/sh
2 # Utility script to test several features of a snapshot filesystem
3 # Assumes that snapshot has already been configured
4 #
5 # Copyright (C) 2001  Cluster File Systems, Inc.
6 #
7 # This code is issued under the GNU General Public License.
8 # See the file COPYING in this distribution
9
10 OBDDIR="`dirname $0`/.."
11 . $OBDDIR/demos/config.sh
12
13 qrun ls $MNTOBD
14 qrun chown bin.bin $MNTOBD
15 qrun ls -ld $MNTOBD
16 qrun ls -ld $MNTSNAP
17 qrun cp /etc/hosts $MNTOBD
18 qrun ls $MNTOBD
19 qrun ls $MNTSNAP
20
21 # More complicated because we can't pass ">>" as an argument easily
22 echo -n "Run 'echo today >> $MNTOBD/hello' [Y/n]" ; read JUNK
23 case $JUNK in
24     n*|N*) echo "not run" ;;
25     *)  plog log "echo today >> $MNTOBD/hello"
26         echo "today" >> $MNTOBD/hello ;;
27 esac
28
29 qrun cat $MNTOBD/hello
30 qrun cat $MNTSNAP/hello
31 qrun cat $MNTOBD/link
32 qrun cat $MNTSNAP/link
33 qrun rm $MNTOBD/goodbye
34 qrun ls $MNTOBD
35 qrun ls $MNTSNAP
36 qrun cat $MNTSNAP/goodbye