3 # Example script to make a transaction log file
4 # Must be run as root. Remember to chown the file afterwards
6 # Insert the name of a tarfile here
7 tarfile=/home/amb/iptables/iptables_1.4.4.orig.tar.gz
9 conffile=${tmpnam}.conf
11 output=`pwd`/output.tr
15 cat >${conffile} <<EOF
19 transactionlog = $output
24 ./nbd-server -C ${conffile} -p ${pidfile} &
27 dd if=/dev/zero of=${tmpnam} bs=1M count=50
28 ./nbd-client -N export1 127.0.0.1 /dev/nbd0
30 mount -t ext3 -odata=journal,barrier=1 /dev/nbd0 /mnt
31 (cd /mnt ; tar xvzf ${tarfile} ; sync) 2>&1 >/dev/null
33 mount -t ext3 -odata=journal,barrier=1 /dev/nbd0 /mnt
34 (cd /mnt ; tar cvzf /dev/null . ; sync) 2>&1 >/dev/null
42 ./nbd-client -d /dev/nbd0
50 rm -f $tmpnam ${conffile}