Fill Me Up

Created to test SAN multipath connectivity

This can run in the background and will fill a file up until it is at a fixed size. After this size is exceeded, the file is reset to zero bytes.

Whilst this is running SAN paths can be failed off manually with some load on IO.

#!/bin/bash
#quick and dirty script to fill up some disk space
#whilst testing multipath failover
#Andrew Stringer, 29th October.

FILLMEUPFILE=testfile.txt
MAXSIZE=1024000

while [ 0 ]
do
date +%H-%M-%S >> ${FILLMEUPFILE}
echo "asdkjaskdjhkjweriuweroiweuqdkjcmxzcnm,zxn,mnaskdjklqweoijwn,masn,mnwd328742837432jhwqdjha" >> ${FILLMEUPFILE}
#sleep 1

FILESIZE=`stat -c %s ${FILLMEUPFILE}`
if [ "${FILESIZE}" -gt ${MAXSIZE} ]; then
        echo "Testfile is greater than ${MAXSIZE}, zeroing it."
        echo "" >  ${FILLMEUPFILE}
fi
done

exit 0

rb/scripts-fillmeup.txt · Last modified: 10/10/2013 15:21 (external edit)