Whamcloud - gitweb
tests/snaprun.sh: simple script to test some snapshot features
[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 OBDDIR="`dirname $0`/.."
5 . $OBDDIR/demos/config.sh
6
7 qrun ls $MNTOBD
8 qrun chown bin.bin $MNTOBD
9 qrun ls -ld $MNTOBD
10 qrun ls -ld $MNTSNAP
11 qrun cp /etc/hosts $MNTOBD
12 qrun ls $MNTOBD
13 qrun ls $MNTSNAP
14
15 # More complicated because we can't pass ">>" as an argument easily
16 echo -n "Run 'echo today >> $MNTOBD/hello' [Y/n]" ; read JUNK
17 case $JUNK in
18     n*|N*) echo "not run" ;;
19     *)  plog log "echo today >> $MNTOBD/hello"
20         echo "today" >> $MNTOBD/hello ;;
21 esac
22
23 qrun cat $MNTOBD/hello
24 qrun cat $MNTSNAP/hello
25 qrun cat $MNTOBD/link
26 qrun cat $MNTSNAP/link
27 qrun rm $MNTOBD/goodbye
28 qrun ls $MNTOBD
29 qrun ls $MNTSNAP
30 qrun cat $MNTSNAP/goodbye