code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/bin/sh -x # # $Id$ # # Use ddsnap directly to create a snapshot, modify the origin, and create # another snapshot. Verify that checksums change and remain correct. # # Copyright 2007 Google Inc. All rights reserved # Author: Drake Diedrich (dld@google.com) set -e rc=0 # Terminate test in 10 minutes. Read by ...
Shell
#!/bin/sh -x # # $Id$ # # Set up sysvg with origin and snapshot store, iterate through a few # snapshots to verify that each is unique and stable when taken. # # Copyright 2007 Google Inc. All rights reserved # Author: Drake Diedrich (dld@google.com) set -e # Terminate test in 10 minutes. Read by test harness. TIM...
Shell
#!/bin/sh # # $Id: tunbr-config 673 2007-09-10 20:59:52Z chklin $ # # Source /etc/default/testenv for the VIRT* variables, and output # appropriate compiler flags to build a locally customized tunbr # for the network and interface bridge specified. if [ -x /etc/default/testenv ] then . /etc/default/testenv fi if [ ...
Shell
#!/bin/sh # # $Id$ # # Source /etc/default/testenv for the VIRT* variables, and output # appropriate compiler flags to build a locally customized tunbr # for the network and interface bridge specified. if [ -x /etc/default/testenv ] then . /etc/default/testenv fi if [ "x$VIRTNET" != "x" ] then echo $VIRTNET | \ ...
Shell
#!/bin/bash for vol in $(ls /var/run/zumastor/cron) ; do zumastor snapshot $vol daily done
Shell
#!/bin/bash for vol in $(ls /var/run/zumastor/cron) ; do zumastor snapshot $vol daily done
Shell
#!/bin/bash for vol in $(ls /var/run/zumastor/cron) ; do zumastor snapshot $vol hourly done
Shell
#!/bin/bash for vol in $(ls /var/run/zumastor/cron) ; do zumastor snapshot $vol hourly done
Shell
#!/bin/bash for vol in $(ls /var/run/zumastor/cron) ; do zumastor snapshot $vol weekly done
Shell
#!/bin/bash for vol in $(ls /var/run/zumastor/cron) ; do zumastor snapshot $vol weekly done
Shell
#!/bin/bash # Zumastor Linux Storage Server # Copyright (c) 2006 Google Inc. # Author: Daniel Phillips <phillips@google.com> # Licensed under the GNU GPL version 2 ### BEGIN INIT INFO # Provides: zumastor # Required-Start: $network # Required-Stop: $network # Should-Start: lvm $named # should-Sto...
Shell
#!/bin/bash # Zumastor Linux Storage Server # Copyright (c) 2006 Google Inc. # Author: Daniel Phillips <phillips@google.com> # Licensed under the GNU GPL version 2 ### BEGIN INIT INFO # Provides: zumastor # Required-Start: $network # Required-Stop: $network # Should-Start: lvm $named # should-Sto...
Shell
#!/bin/sh rm /bin/zumastor rm -r /lib/zumastor rm -r /var/lib/zumastor rm -r /var/run/zumastor rm -r /var/log/zumastor rm /etc/cron.hourly/zumastor rm /etc/cron.daily/zumastor rm /etc/cron.weekly/zumastor rm /etc/init.d/zumastor rm -r /etc/zumastor
Shell
#!/bin/sh [ -z "$DESTDIR" ] && DESTDIR=/ rm ${DESTDIR}/lib/zumastor >/dev/null 2>&1 # in case of symlink rm ${DESTDIR}/var/lib/zumastor >/dev/null 2>&1 # in case of symlink rm ${DESTDIR}/var/run/zumastor >/dev/null 2>&1 # in case of symlink rm ${DESTDIR}/etc/zumastor >/dev/null 2>&1 # in case of symlink echo ${DESTD...
Shell
#!/bin/bash . /lib/zumastor/common clear while true; do clear for vol in $(ls $VOLUMES 2>/dev/null); do echo Volume $vol: sock=$SERVERS/$vol size=$(ddsnap status $sock --size) || exit 1 size=$(($size*512)) for host in $(ls $VOLUMES/$vol/targets 2>/dev/null); do echo " Target: $host" sendfile=$VOLUMES/$vol/t...
Shell
#!/bin/sh rm /bin/zumastor rm -r /lib/zumastor rm -r /var/lib/zumastor rm -r /var/run/zumastor rm -r /var/log/zumastor rm /etc/cron.hourly/zumastor rm /etc/cron.daily/zumastor rm /etc/cron.weekly/zumastor rm /etc/init.d/zumastor rm -r /etc/zumastor
Shell
#!/bin/sh ln -s $(pwd)/bin/zumastor /bin/zumastor ln -s $(pwd)/lib/zumastor /lib/zumastor ln -s $(pwd)/var/lib/zumastor /var/lib/zumastor ln -s $(pwd)/var/run/zumastor /var/run/zumastor ln -s $(pwd)/var/log/zumastor /var/log/zumastor ln -s $(pwd)/etc/cron.hourly/zumastor /etc/cron.hourly/zumastor ln -s $(pwd)/etc/cro...
Shell
#!/bin/sh [ -z "$DESTDIR" ] && DESTDIR=/ rm ${DESTDIR}/lib/zumastor >/dev/null 2>&1 # in case of symlink rm ${DESTDIR}/var/lib/zumastor >/dev/null 2>&1 # in case of symlink rm ${DESTDIR}/var/run/zumastor >/dev/null 2>&1 # in case of symlink rm ${DESTDIR}/etc/zumastor >/dev/null 2>&1 # in case of symlink echo ${DESTD...
Shell
#!/bin/bash . /lib/zumastor/common clear while true; do clear for vol in $(ls $VOLUMES 2>/dev/null); do echo Volume $vol: sock=$SERVERS/$vol size=$(ddsnap status $sock --size) || exit 1 size=$(($size*512)) for host in $(ls $VOLUMES/$vol/targets 2>/dev/null); do echo " Target: $host" sendfile=$VOLUMES/$vol/t...
Shell
#!/bin/sh ln -s $(pwd)/bin/zumastor /bin/zumastor ln -s $(pwd)/lib/zumastor /lib/zumastor ln -s $(pwd)/var/lib/zumastor /var/lib/zumastor ln -s $(pwd)/var/run/zumastor /var/run/zumastor ln -s $(pwd)/var/log/zumastor /var/log/zumastor ln -s $(pwd)/etc/cron.hourly/zumastor /etc/cron.hourly/zumastor ln -s $(pwd)/etc/cro...
Shell
#!/bin/bash # Zumastor Linux Storage Server # Copyright (c) 2006 Google Inc. # Author: Daniel Phillips <phillips@google.com> # Licensed under the GNU GPL version 2 ### BEGIN INIT INFO # Provides: zumastor # Required-Start: $network # Required-Stop: $network # Should-Start: lvm $named # should-Sto...
Shell
#!/bin/sh if [ "$1" = "purge" ] ; then rm -rf /var/lib/zumastor fi
Shell
#!/bin/sh if [ "$1" = "purge" ] ; then rm -rf /var/lib/zumastor fi
Shell
#!/bin/bash # Zumastor Linux Storage Server # Copyright (c) 2006 Google Inc. # Author: Daniel Phillips <phillips@google.com> # Licensed under the GNU GPL version 2 declare -r VOLUMES=/var/lib/zumastor/volumes declare -r RUNPATH=/var/run/zumastor declare -r LOGS=/var/log/zumastor declare -r RUNFILE=$RUNPATH/running dec...
Shell
#!/bin/bash # Zumastor Linux Storage Server # Copyright (c) 2006 Google Inc. # Author: Daniel Phillips <phillips@google.com> # Licensed under the GNU GPL version 2 declare -r VOLUMES=/var/lib/zumastor/volumes declare -r RUNPATH=/var/run/zumastor declare -r LOGS=/var/log/zumastor declare -r RUNFILE=$RUNPATH/running dec...
Shell
#!/bin/sh echo set title \"Time to untar a kernel source tree vs Number of Snapshots\" echo set xlabel \"Number of Snapshots\" echo set ylabel \"Real time \(s\) to untar kernel and sync\" echo set key $X_COORD_PLOT_KEY, 100 echo set terminal jpeg echo set output \"all_tests.jpg\" echo -n "plot " count=0 for testfile i...
Shell
#!/bin/sh set -u # let make sure we use initialized variable AGENT_LOG=/tmp/agent.log SERVER_LOG=/tmp/server.log AGENT_PIPE=/tmp/control SERVER_PIPE=/tmp/server . config.sh TEST_ROOT_DIR=~/zumastor/zumastor/test/nsnaps X_COORD_PLOT_KEY=0 global_test_num=0 function setup_tar() { mkfs.ext3 $TAR_DEV || { echo "un...
Shell
#!/bin/sh set -u # let make sure we use initialized variable AGENT_LOG=/tmp/agent.log SERVER_LOG=/tmp/server.log AGENT_PIPE=/tmp/control SERVER_PIPE=/tmp/server . config.sh TEST_ROOT_DIR=~/zumastor/zumastor/test/nsnaps X_COORD_PLOT_KEY=0 global_test_num=0 function setup_tar() { mkfs.ext3 $TAR_DEV || { echo "un...
Shell
#!/bin/sh set -u # let make sure we use initialized variable #setting up system parameters for nsnaps script #Example: #VOLUME_NAME= volume you are replicating #ORIGIN_MOUNT= location of the volume's mount point #TAR_DEV= tar device #TAR_MNT= location of where TAR_DEV is mounted #SOURCE_TAR= kernel source tree #KERN...
Shell
#!/bin/sh echo set title \"Time to untar a kernel source tree vs Number of Snapshots\" echo set xlabel \"Number of Snapshots\" echo set ylabel \"Real time \(s\) to untar kernel and sync\" echo set key $X_COORD_PLOT_KEY, 100 echo set terminal jpeg echo set output \"all_tests.jpg\" echo -n "plot " count=0 for testfile i...
Shell
#!/bin/sh set -u # let make sure we use initialized variable #setting up system parameters for nsnaps script #Example: #VOLUME_NAME= volume you are replicating #ORIGIN_MOUNT= location of the volume's mount point #TAR_DEV= tar device #TAR_MNT= location of where TAR_DEV is mounted #SOURCE_TAR= kernel source tree #KERN...
Shell
#!/bin/bash -x # # $Id$ # # based on build_packages.sh # builds whatever is in current working directory, # does not pull any external source # may be run inside an isolated virtual machine for safe automatic builds # # Copyright 2007 Google Inc. All rights reserved. # Author: Drake Diedrich (dld@google.com) KERNEL_V...
Shell
#!/bin/sh -x # # $Id$ # # Install build dependencies if they are missing on the qemu build machine apt-get update # I wish these worked pushd zumastor apt-get build-dep zumastor popd pushd ddsnap apt-get build-dep ddsnap popd # manually install all build dependencies, including kernel build aptitude -y install \ ...
Shell
#!/bin/bash # zumastor automated build script # Shapor Naghibzadeh <shapor@google.com> KERNEL_VERSION=2.6.21.1 BUILD_DIR=build # relative to current directory LOG=/dev/null TIME=`date +%s` [[ -e $1 ]] || { echo "Usage: $0 <path_to_kernel_config> [revision]"; exit 1; } [[ $# -eq 2 ]] && REV="-r $2" mkdir $BUILD_DIR ...
Shell
#!/bin/sh tmp=/tmp/$$ ver=$1 kpath=$2 [[ -z $ver ]] && { echo "usage: $0 <kernelversion> <pathintree>"; exit 1; } [[ -d kernel ]] || { echo "no kernel dir"; exit 1; } [[ -d patches/$ver ]] || { echo "no patches/$ver dir"; exit 1; } mkdir $tmp || { echo "tmpdir $tmp already exists"; exit 1; } mkdir $tmp/linux-$ver.orig...
Shell
#!/bin/sh pushd patches >/dev/null vers=$(echo *) popd >/dev/null for ver in $vers do ./scripts/genpatch.sh $ver drivers/md > patches/$ver/AUTO.ddsnap.files.patch done
Shell
#!/bin/sh tmp=/tmp/$$ ver=$1 kpath=$2 [[ -z $ver ]] && { echo "usage: $0 <kernelversion> <pathintree>"; exit 1; } [[ -d kernel ]] || { echo "no kernel dir"; exit 1; } [[ -d patches/$ver ]] || { echo "no patches/$ver dir"; exit 1; } mkdir $tmp || { echo "tmpdir $tmp already exists"; exit 1; } mkdir $tmp/linux-$ver.orig...
Shell
#!/bin/sh pushd patches >/dev/null vers=$(echo *) popd >/dev/null for ver in $vers do ./scripts/genpatch.sh $ver drivers/md > patches/$ver/AUTO.ddsnap.files.patch done
Shell
#!/bin/bash # zumastor automated build script # Shapor Naghibzadeh <shapor@google.com> KERNEL_VERSION=2.6.21.1 BUILD_DIR=build # relative to current directory LOG=/dev/null TIME=`date +%s` [[ -e $1 ]] || { echo "Usage: $0 <path_to_kernel_config> [revision]"; exit 1; } [[ $# -eq 2 ]] && REV="-r $2" mkdir $BUILD_DIR ...
Shell
#!/bin/sh -x # # $Id: builddepends.sh 844 2007-11-06 01:08:05Z drake.diedrich $ # # Install build dependencies if they are missing on the qemu build machine apt-get update # I wish these worked pushd zumastor apt-get build-dep zumastor popd pushd ddsnap apt-get build-dep ddsnap popd # manually install all build dep...
Shell
#!/bin/sh set -x # # We don't expect or want any arguments. # if [ $# -ge 1 ]; then usage fi # # Add the tet user if it doesn't already exist. # grep tet /etc/passwd if [ $? -ne 0 ]; then adduser --system tet fi # # Extract the tarfiles into the tet home directory. # cd /home/tet mkdir TET cd TET tar xf /tmp/tet.ta...
Shell
#!/bin/sh set -x # Name of the Zumastor volume. TESTVOL=testvol usage() { echo "Usage: $0 [-v <test volume>]" 1>&2 echo "Where <test volume> is the name of the volume that will be used for testing." exit 1 } while getopts "v:" option ; do case "$option" in v) TESTVOL="$OPTARG";; *) usage;; esac done shift $(...
Shell
#!/bin/sh #set -x # Name of the volume group that has the origin and snap store volumes. VGNAME=sysvg # Name and size in megabytes of the origin volume. ORIGNAME=ztestorig ORIGSIZE=4096 # Name and size in megabytes of the snap store volume. SNAPNAME=ztestsnap SNAPSIZE=2048 # Name of the Zumastor volume. TESTVOL=testv...
Shell
#!/bin/sh #set -x # # Potentially modifiable parameters. # # Number of virtual images to create. NUMIMAGES=1 # The number to start with. STARTNUM=1 # Working directory, where images and ancillary files live. WORKDIR=~/local # The CD image to install. CDIMAGE=~/cd/test.iso # Suffix of disk image names. IMGSUFFIX=.img ...
Shell
#!/bin/sh #set -x # Default name if we create a new volume group VGNAME=sysvg # Name and size in megabytes of volume to be used for origin. ORIGVOLNAME=ztestorig ORIGVOLSIZE=2048 # Name and size in megabytes of volume to be used for snap store. SNAPVOLNAME=ztestsnap SNAPVOLSIZE=8192 usage() { echo "Usage: $0 [-n <v...
Shell
#!/bin/sh #set -x # # Potentially modifiable parameters. # # Number of virtual images to create. NUMIMAGES=1 # The number to start with. STARTNUM=1 # Working directory, where images and ancillary files live. WORKDIR=~/local # The CD image to install. CDIMAGE=~/cd/test.iso # Suffix of disk image names. IMGSUFFIX=.img ...
Shell
#!/bin/sh #set -x # # Potentially modifiable parameters. # # Working directory, where images and ancillary files live. WORKDIR=~/local # Where the svn output goes. BUILDLOG=build.log # Name of target Zumastor support directory. This must match the name in the # preseed file! Note: No leading "/"! ZUMADIR=zinst # W...
Shell
#!/bin/sh set -x # Name of the Zumastor volume. TESTVOL=testvol usage() { echo "Usage: $0 [-v <test volume>]" 1>&2 echo "Where <test volume> is the name of the volume that will be used for testing." exit 1 } while getopts "v:" option ; do case "$option" in v) TESTVOL="$OPTARG";; *) usage;; esac done shift $(...
Shell
#!/bin/sh # # Script by Leigh Purdie of InterSect Alliance # # 1) Install a Ubuntu system, and remove packages according to your # requirements using synaptic. I use QEMU. # Don't install any new packages that are NOT available from the CD, # at this stage. # # 2) dpkg -l > PackageList # Copy this file to $...
Shell
#!/bin/sh #set -x # Name of the volume group that has the origin and snap store volumes. VGNAME=sysvg # Name and size in megabytes of the origin volume. ORIGNAME=ztestorig ORIGSIZE=4096 # Name and size in megabytes of the snap store volume. SNAPNAME=ztestsnap SNAPSIZE=2048 # Name of the Zumastor volume. TESTVOL=testv...
Shell
#!/bin/sh #set -x # User to ssh as on the source and target systems. SSHUSER=root # Where the test support scripts are located, so we can find volcreate, # zinstalltet and zruntet. SCRIPTS=~/zumastor/test/scripts usage() { echo "Usage: $0 [-s <script directory>] [-v <volume list>] <source> <target>" >&2 echo "Wher...
Shell
#!/bin/sh set -x # # We don't expect or want any arguments. # if [ $# -ge 1 ]; then usage fi # # Add the tet user if it doesn't already exist. # grep tet /etc/passwd if [ $? -ne 0 ]; then adduser --system tet fi # # Extract the tarfiles into the tet home directory. # cd /home/tet mkdir TET cd TET tar xf /tmp/tet.ta...
Shell
#!/bin/sh set -x # # Potentially modifiable parameters. # # Working directory, where images and ancillary files live. WORKDIR=~/local # Where the svn output goes. SVNLOG=svn.log # Name of the main installed Qemu disk image. TESTIMG=${WORKDIR}/test.img # Names of the working replication source and target disk images. ...
Shell
#!/bin/sh set -x # # Potentially modifiable parameters. # # Working directory, where images and ancillary files live. WORKDIR=~/local # Where the svn output goes. SVNLOG=svn.log # Name of the main installed Qemu disk image. TESTIMG=${WORKDIR}/test.img # Names of the working replication source and target disk images. ...
Shell
#!/bin/sh #set -x # User to ssh as on the source and target systems. SSHUSER=root # Where the test support scripts are located, so we can find volcreate, # zinstalltet and zruntet. SCRIPTS=~/zumastor/test/scripts usage() { echo "Usage: $0 [-s <script directory>] [-v <volume list>] <source> <target>" >&2 echo "Wher...
Shell
#!/bin/sh # # Script by Leigh Purdie of InterSect Alliance # # 1) Install a Ubuntu system, and remove packages according to your # requirements using synaptic. I use QEMU. # Don't install any new packages that are NOT available from the CD, # at this stage. # # 2) dpkg -l > PackageList # Copy this file to $...
Shell
#!/bin/sh #set -x # Default name if we create a new volume group VGNAME=sysvg # Name and size in megabytes of volume to be used for origin. ORIGVOLNAME=ztestorig ORIGVOLSIZE=2048 # Name and size in megabytes of volume to be used for snap store. SNAPVOLNAME=ztestsnap SNAPVOLSIZE=8192 usage() { echo "Usage: $0 [-n <v...
Shell
#!/bin/sh #set -x # # Potentially modifiable parameters. # # Working directory, where images and ancillary files live. WORKDIR=~/local # Where the svn output goes. BUILDLOG=build.log # Name of target Zumastor support directory. This must match the name in the # preseed file! Note: No leading "/"! ZUMADIR=zinst # W...
Shell
#!/bin/bash . config_uml . config_replication ssh $SSH_OPTS $source_uml_host "zumastor forget volume $vol" ssh $SSH_OPTS $target_uml_host "zumastor forget volume $vol" ssh $SSH_OPTS $source_uml_host "halt" ssh $SSH_OPTS $target_uml_host "halt"
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # configure uml network [[ $# -eq 3 ]] || [[ $# -eq 4 ]] || { echo "Usage: $setup_network.sh uml_ip uml_hostname [uml_fs]"; exit 1; } uml_ip=$1 host_tap_ip=$2 uml_host=$3 uml_fs=$4 echo -n Setting up IP MASQUERADE... iptables -t n...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # build kernel linux uml with the KERNEL_VERSION specified in config_uml and with ddsnap kerenel patches . config_uml # Download a file and checks its checksum download() { file=`basename "$1"` test -f $DOWNLOAD_CACHE/$file || (...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # build kernel linux uml with the KERNEL_VERSION specified in config_uml and with ddsnap kerenel patches . config_uml [[ -e linux-${KERNEL_VERSION} ]] && rm -rf linux-${KERNEL_VERSION} echo -n Unpacking kernel... tar xjfk $DOWNLOAD...
Shell
#!/bin/sh # Demostrates how to run all UML-based Zumastor tests set -e set -x # utilities to build debian packages and run uml dpkg -s devscripts fakeroot debhelper >& /dev/null || sudo apt-get install devscripts fakeroot debhelper dpkg -s uml-utilities >& /dev/null || sudo apt-get install uml-utilities sudo chmod a+r...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> . config_uml . config_replication ./start_uml.sh $source_uml_fs $source_ubdb_dev $source_ubdc_dev $source_uml_host || exit 1 ./start_uml.sh $target_uml_fs $target_ubdb_dev $target_ubdc_dev $target_uml_host || { killall linux; exit ...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # update zumastor and ddsnap . config_uml [[ $# -eq 1 ]] || { echo "Usage: update_zuma.sh uml_fs"; exit 1; } uml_fs=$1 echo -n Upgrading ddsnap and zumastor... mount -o loop $uml_fs /mnt || exit 1 pushd $ZUMA_REPOSITORY/ddsnap ma...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # keep running full volume replication between source and target . config_uml . config_replication ./setup_replication.sh || { echo UNRESOLVED; exit 1; } echo -n Start full-volume replication test... ssh $SSH_OPTS $source_uml_hos...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # install all the required libraries and utilities based on the image downloaded from uml website [[ $# -eq 1 ]] || { echo "Usage: build_fs.sh uml_fs"; exit 1; } uml_fs=$1 mount -o loop $uml_fs /mnt || exit 1 echo -n Setting up a...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # test zumastor stop on target . config_uml . config_single # load up uml ./start_uml.sh $uml_fs $ubdb_dev $ubdc_dev $uml_host || { echo UNRESOLVED; exit 1; } echo -n Setting up volume... ssh $SSH_OPTS $uml_host "zumastor forget ...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # test zumastor stop on target . config_uml . config_replication ./setup_replication.sh || { echo UNRESOLVED; exit 1; } echo -n Start replication ... ssh $SSH_OPTS $source_uml_host "zumastor define target $vol $target_uml_host:$t...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # build kernel linux uml with the KERNEL_VERSION specified in config_uml and with ddsnap kerenel patches . config_uml [[ -e linux-${KERNEL_VERSION} ]] && rm -rf linux-${KERNEL_VERSION} echo -n Unpacking kernel... tar xjfk $DOWNLOAD...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # build kernel linux uml with the KERNEL_VERSION specified in config_uml and with ddsnap kerenel patches . config_uml # Download a file and checks its checksum download() { file=`basename "$1"` test -f $DOWNLOAD_CACHE/$file || (...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> . config_uml . config_replication ./start_uml.sh $source_uml_fs $source_ubdb_dev $source_ubdc_dev $source_uml_host || exit 1 ./start_uml.sh $target_uml_fs $target_ubdb_dev $target_ubdc_dev $target_uml_host || { killall linux; exit ...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # update zumastor and ddsnap . config_uml [[ $# -eq 1 ]] || { echo "Usage: update_zuma.sh uml_fs"; exit 1; } uml_fs=$1 echo -n Upgrading ddsnap and zumastor... mount -o loop $uml_fs /mnt || exit 1 pushd $ZUMA_REPOSITORY/ddsnap ma...
Shell
#!/bin/bash . config_uml [[ $# -eq 4 ]] || { echo "Usage: start_uml.sh uml_fs ubd_dev ubc_dev uml_host"; exit 1; } uml_fs=$1 ubdb_dev=$2 ubdc_dev=$3 uml_host=$4 function create_device { dd if=/dev/zero of=$1 count=102400 bs=1024 >& /dev/null [[ $? -eq 0 ]] || { echo "can not create device $1, error ...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # Download the base filesystem image from uml website . ./config_uml [[ $# -eq 1 ]] || { echo "Usage: build_fs.sh uml_fs"; exit 1; } uml_fs=$1 if [[ ! -e $uml_fs ]]; then echo -n Unpacking root file system image... bunzip2 -k $...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # configure uml network [[ $# -eq 3 ]] || [[ $# -eq 4 ]] || { echo "Usage: $setup_network.sh uml_ip uml_hostname [uml_fs]"; exit 1; } uml_ip=$1 host_tap_ip=$2 uml_host=$3 uml_fs=$4 echo -n Setting up IP MASQUERADE... iptables -t n...
Shell
#!/bin/sh # Demostrates how to run all UML-based Zumastor tests set -e set -x # utilities to build debian packages and run uml dpkg -s devscripts fakeroot debhelper >& /dev/null || sudo apt-get install devscripts fakeroot debhelper dpkg -s uml-utilities >& /dev/null || sudo apt-get install uml-utilities sudo chmod a+r...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # test replication resuming after network goes down and up # this program requires root previlige . config_uml . config_replication ./setup_replication.sh || { echo UNRESOLVED; exit 1; } echo -n Start replication ... ssh $SSH_OPT...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # test zumastor stop on source . config_uml . config_replication ./setup_replication.sh || { echo UNRESOLVED; exit 1; } echo -n Start replication ... ssh $SSH_OPTS $source_uml_host "zumastor define target $vol $target_uml_host:$t...
Shell
#!/bin/bash . config_uml . config_replication ssh $SSH_OPTS $source_uml_host "zumastor forget volume $vol" ssh $SSH_OPTS $target_uml_host "zumastor forget volume $vol" ssh $SSH_OPTS $source_uml_host "halt" ssh $SSH_OPTS $target_uml_host "halt"
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # test replication resuming after network goes down and up # this program requires root previlige . config_uml . config_replication ./setup_replication.sh || { echo UNRESOLVED; exit 1; } echo -n Start replication ... ssh $SSH_OPT...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # install all the required libraries and utilities based on the image downloaded from uml website [[ $# -eq 1 ]] || { echo "Usage: build_fs.sh uml_fs"; exit 1; } uml_fs=$1 mount -o loop $uml_fs /mnt || exit 1 echo -n Setting up a...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # Download the base filesystem image from uml website . ./config_uml [[ $# -eq 1 ]] || { echo "Usage: build_fs.sh uml_fs"; exit 1; } uml_fs=$1 if [[ ! -e $uml_fs ]]; then echo -n Unpacking root file system image... bunzip2 -k $...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # test zumastor stop on target . config_uml . config_single # load up uml ./start_uml.sh $uml_fs $ubdb_dev $ubdc_dev $uml_host || { echo UNRESOLVED; exit 1; } echo -n Setting up volume... ssh $SSH_OPTS $uml_host "zumastor forget ...
Shell
#!/bin/bash . config_uml [[ $# -eq 4 ]] || { echo "Usage: start_uml.sh uml_fs ubd_dev ubc_dev uml_host"; exit 1; } uml_fs=$1 ubdb_dev=$2 ubdc_dev=$3 uml_host=$4 function create_device { dd if=/dev/zero of=$1 count=102400 bs=1024 >& /dev/null [[ $? -eq 0 ]] || { echo "can not create device $1, error ...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # test zumastor stop on source . config_uml . config_replication ./setup_replication.sh || { echo UNRESOLVED; exit 1; } echo -n Start replication ... ssh $SSH_OPTS $source_uml_host "zumastor define target $vol $target_uml_host:$t...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # test zumastor stop on target . config_uml . config_replication ./setup_replication.sh || { echo UNRESOLVED; exit 1; } echo -n Start replication ... ssh $SSH_OPTS $source_uml_host "zumastor define target $vol $target_uml_host:$t...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # keep running full volume replication between source and target . config_uml . config_replication ./setup_replication.sh || { echo UNRESOLVED; exit 1; } echo -n Start full-volume replication test... ssh $SSH_OPTS $source_uml_hos...
Shell
./fs_perms 001 99 99 12 100 x 1 ./fs_perms 010 99 99 200 99 x 1 ./fs_perms 100 99 99 99 500 x 1 ./fs_perms 002 99 99 12 100 w 1 ./fs_perms 020 99 99 200 99 w 1 ./fs_perms 200 99 99 99 500 w 1 ./fs_perms 004 99 99 12 100 r 1 ./fs_perms 040 99 99 200 99 r 1 ./fs_perms 400 99 99 99 500 r 1 ./fs_perms 000 99 99 99 99 r 0 ....
Shell
#!/bin/sh # replicate.sh : replication test case #set -x tet_startup="startup" tet_cleanup="cleanup" iclist="ic1 ic2 ic3" ic1="small_repl1 small_repl2" ic2="medium_repl1 medium_repl2" ic3="large_repl1 large_repl2" # source TET API shell functions . $TET_ROOT/lib/xpg3sh/tetapi.sh repl_init() { vol=$1 # # Verify t...
Shell
#!/bin/sh # replicate.sh : replication test case #set -x tet_startup="startup" tet_cleanup="cleanup" iclist="ic1 ic2 ic3" ic1="small_repl1 small_repl2" ic2="medium_repl1 medium_repl2" ic3="large_repl1 large_repl2" # source TET API shell functions . $TET_ROOT/lib/xpg3sh/tetapi.sh repl_init() { vol=$1 # # Verify t...
Shell
#!/bin/bash output_dir=$1 for dir in `ls $output_dir`; do [[ -d $output_dir/$dir ]] || continue rm -f $output_dir/$dir.dots rm -f /tmp/dots for subdir in `ls $output_dir/$dir`; do tail -n 1 $output_dir/$dir/$subdir/summary >> /tmp/dots sort -n /tmp/dots > $output_dir/$dir.dots done done echo set title \"Fst...
Shell
#!/bin/bash # example script for comparing nfs performances of nfs-only (without zumastor), # nfs-zumastor (with zumastor and zero snapshot), and nfs-snapshot (with zumastor and one snapshot) # please change the testing nfs loads according to the server capacity LOADS="200 400 600 800 1000" # type of tests TESTS="nfs...
Shell
#!/bin/bash output_dir=$1 for dir in `ls $output_dir`; do [[ -d $output_dir/$dir ]] || continue rm -f $output_dir/$dir.dots rm -f /tmp/dots for subdir in `ls $output_dir/$dir`; do tail -n 1 $output_dir/$dir/$subdir/summary >> /tmp/dots sort -n /tmp/dots > $output_dir/$dir.dots done done echo set title \"Fst...
Shell
#!/bin/bash # example script for comparing nfs performances of nfs-only (without zumastor), # nfs-zumastor (with zumastor and zero snapshot), and nfs-snapshot (with zumastor and one snapshot) # please change the testing nfs loads according to the server capacity LOADS="200 400 600 800 1000" # type of tests TESTS="nfs...
Shell
#!/bin/sh echo set title \"Time to untar a kernel source tree vs Number of Snapshots\" echo set xlabel \"Number of Snapshots\" echo set ylabel \"Real time \(s\) to untar kernel and sync\" echo set key below echo set terminal postscript enhanced color echo set output \"all_tests.ps\" echo -n "plot " count=0 for testfil...
Shell
#!/bin/sh set -u # let make sure we use initialized variable AGENT_LOG=/tmp/agent.log SERVER_LOG=/tmp/server.log AGENT_PIPE=/tmp/control SERVER_PIPE=/tmp/server . config.sh global_test_num=0 function setup_tar() { mkfs.ext3 $TAR_DEV || { echo "unable to mkfs tar device"; exit 1; } mount_dir $TAR_DEV $TAR_MNT ...
Shell
#!/bin/sh set -u # let make sure we use initialized variable AGENT_LOG=/tmp/agent.log SERVER_LOG=/tmp/server.log AGENT_PIPE=/tmp/control SERVER_PIPE=/tmp/server . config.sh global_test_num=0 function setup_tar() { mkfs.ext3 $TAR_DEV || { echo "unable to mkfs tar device"; exit 1; } mount_dir $TAR_DEV $TAR_MNT ...
Shell
#!/bin/sh set -u # let make sure we use initialized variable #setting up system parameters for nsnaps script #Example: #VOLUME_NAME= volume you are replicating #ORIGIN_MOUNT= location of the volume's mount point #TAR_DEV= tar device #TAR_MNT= location of where TAR_DEV is mounted #SOURCE_TAR= kernel source tree #KERN...
Shell
#!/bin/sh echo set title \"Time to untar a kernel source tree vs Number of Snapshots\" echo set xlabel \"Number of Snapshots\" echo set ylabel \"Real time \(s\) to untar kernel and sync\" echo set key below echo set terminal postscript enhanced color echo set output \"all_tests.ps\" echo -n "plot " count=0 for testfil...
Shell