--- /dev/null
+#!/bin/bash
+
+basedir=`echo $0 | sed 's/[^/]*$//g'`.
+. $basedir/common.sh
+
+mount
+enter_mydir
+
+iozone -c -e -s 1024M -r 16K -t 1 -F f1 -i 0 -i 1
+iozone -c -e -s 1024M -r 1M -t 1 -F f2 -i 0 -i 1
+iozone -c -e -s 10240M -r 1M -t 1 -F f3 -i 0 -i 1
+
+leave_mydir
+umount
--- /dev/null
+
+# defaults
+[ -z "$bindir" ] && bindir="." # location of init-ceph
+[ -z "$conf" ] && conf="$basedir/ceph.conf"
+[ -z "$mnt" ] && mnt="/c"
+[ -z "$monhost" ] && monhost="cephbooter"
+
+set -e
+
+mydir=`hostname`_`echo $0 | sed 's/\//_/g'`
+
+mount()
+{
+ /bin/mount -t ceph $monhost:/ $mnt
+}
+
+umount()
+{
+ /bin/umount $mnt
+ # look for VFS complaints
+ if dmesg | tail -n 50 | grep -c "VFS: Busy inodes" ; then
+ echo "looks like we left inodes pinned"
+ exit 1
+ fi
+}
+
+start()
+{
+ $bindir/init-ceph -c $conf start ${1}
+}
+
+stop()
+{
+ $bindir/init-ceph -c $conf stop ${1}
+}
+
+restart()
+{
+ $bindir/init-ceph -c $conf restart ${1}
+}
+
+enter_mydir()
+{
+ pushd .
+ test -d $mnt/$mydir && rm -r $mnt/$mydir
+ mkdir $mnt/$mydir
+ cd $mnt/$mydir
+}
+
+leave_mydir()
+{
+ popd
+}