From: adilger Date: Tue, 25 Jan 2000 21:59:53 +0000 (+0000) Subject: tests/snaprun.sh: simple script to test some snapshot features X-Git-Tag: v1_7_100~6113 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=6bdee0c416dbf94826fcb1bfd36f5e9e765513b2;hp=c23034aa2b2101e0220d811161613983f58821a2 tests/snaprun.sh: simple script to test some snapshot features --- diff --git a/lustre/tests/snaprun.sh b/lustre/tests/snaprun.sh new file mode 100755 index 0000000..4eb09c6 --- /dev/null +++ b/lustre/tests/snaprun.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# Utility script to test several features of a snapshot filesystem +# Assumes that snapshot has already been configured +OBDDIR="`dirname $0`/.." +. $OBDDIR/demos/config.sh + +qrun ls $MNTOBD +qrun chown bin.bin $MNTOBD +qrun ls -ld $MNTOBD +qrun ls -ld $MNTSNAP +qrun cp /etc/hosts $MNTOBD +qrun ls $MNTOBD +qrun ls $MNTSNAP + +# More complicated because we can't pass ">>" as an argument easily +echo -n "Run 'echo today >> $MNTOBD/hello' [Y/n]" ; read JUNK +case $JUNK in + n*|N*) echo "not run" ;; + *) plog log "echo today >> $MNTOBD/hello" + echo "today" >> $MNTOBD/hello ;; +esac + +qrun cat $MNTOBD/hello +qrun cat $MNTSNAP/hello +qrun cat $MNTOBD/link +qrun cat $MNTSNAP/link +qrun rm $MNTOBD/goodbye +qrun ls $MNTOBD +qrun ls $MNTSNAP +qrun cat $MNTSNAP/goodbye