code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/bin/sh -x # # $Id: nfs4-zumastor-snapshot.sh 1605 2008-04-29 01:27:34Z williamanowak $ # # Export zumastor over NFSv4 to a slave and then perform some filesystem # actions. Verify that the filesystem actions arrive in the snapshot store. # # Copyright 2008 Google Inc. All rights reserved # Author: Drake Diedrich (...
Shell
#!/bin/sh -x # # $Id: replication-zumastor-lvm-resize.sh 1189 2008-2-12 00:27:19Z jiahotcake $ # # Set up testvg with origin and snapshot store, resize origin/snapshot volumes, # verify replication still works after resizing # # Copyright 2008 Google Inc. All rights reserved # Author: Jiaying Zhang (jiayingz@google.co...
Shell
#!/bin/sh -x # $Id$ # simple paramter script for zuma-test-dapper-i386.sh script # will wait until return is pressed set -e env hostname ifconfig eth0 || true ifconfig eth1 || true echo "slogin root@ the IP address above to work interactively" echo "Press return to end the session" read ret
Shell
#!/bin/sh -x # $Id: wait.sh 1004 2007-11-30 16:05:47Z drake.diedrich $ # simple paramter script for zuma-test-dapper-i386.sh script # will wait until return is pressed set -e env hostname ifconfig eth0 || true ifconfig eth1 || true echo "slogin root@ the IP address above to work interactively" echo "Press return t...
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-xfs-lvm-17T.sh 1670 2008-05-28 18:14:13Z drake.diedrich $ # # Make use of large, extra devices on /dev/sd[bcd] to test # multi-terabyte-sized zumastor filesystems. RAID0 and LVM are used to # create the large filesystems from 2045G disks provided by qemu (the # largest supported...
Shell
#!/bin/sh -x # # $Id: ddsnap-kernel.sh 1631 2008-05-01 21:32:45Z williamanowak $ # # Make sure we can load the ddsnap kernel module # # Copyright 2007 Google Inc. All rights reserved # Author: Will Nowak (willn@google.com) set -e TIMEOUT=1200 NUMDEVS=0 echo "1..4" depmod -a echo 'ok 1 - depmod' # Try to load the...
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-reiserfs.sh 1581 2008-04-24 20:27:34Z williamanowak $ # # Set up zumastor with origin and snapshot stores on /dev/sdb and /dev/sdc, # iterate through a few snapshots to verify that each is unique and # stable when taken. # # Copyright 2007-2008 Google Inc. All rights reserved # ...
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-ext3-resize.sh 1189 2007-12-22 00:27:19Z jiahotcake $ # # Set up testvg with origin and snapshot store, resize origin/snapshot volumes, # verify resize succeeds and data on origin/snapshot volumes still valid after resizing # # Copyright 2007 Google Inc. All rights reserved # Au...
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-xfs-lvm-5T.sh 1642 2008-05-02 18:10:38Z williamanowak $ # # Make use of large, extra devices on /dev/sd[bcd] to test # multi-terabyte-sized zumastor filesystems. RAID0 and LVM are used to # create the large filesystems from 2045G disks provided by qemu (the # largest supported b...
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-ext2.sh 1581 2008-04-24 20:27:34Z williamanowak $ # # Set up zumastor with origin and snapshot stores on /dev/sdb and /dev/sdc, # iterate through a few snapshots to verify that each is unique and # stable when taken. # # Copyright 2007-2008 Google Inc. All rights reserved # Auth...
Shell
#!/bin/sh -x # # $Id: boot-order.sh 1631 2008-05-01 21:32:45Z williamanowak $ # # Boot and install insserv, and make sure zumastor doesn't show up # in its list of warnings. # # Copyright 2007 Google Inc. All rights reserved # Author: Drake Diedrich (dld@google.com) set -e TIMEOUT=1200 NUMDEVS=0 env echo "1..3" r...
Shell
#!/bin/sh -x # # $Id: ddsnap-error-handling.sh 1234 2008-01-05 05:24:09Z jiayingz $ # # Verify that ddsnap/ddsnapd handle error messages correctly # # Copyright 2008 Google Inc. All rights reserved # Author: Jiaying Zhang (jiayingz@google.com) set -e NUMDEVS=2 DEV1SIZE=8 DEV2SIZE=4 #DEV1NAME=/dev/null #DEV2NAME=/dev...
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-ext3-resize.sh 1189 2007-12-22 00:27:19Z jiahotcake $ # # Set up testvg with origin and snapshot store, resize origin/snapshot volumes, # verify resize succeeds and data on origin/snapshot volumes still valid after resizing # # Copyright 2007 Google Inc. All rights reserved # Au...
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-xfs-2045G.sh 1623 2008-04-30 23:33:18Z williamanowak $ # # Make use of large, extra devices on /dev/sdb and /dev/sdc to test # terabyte-sized zumastor filesystems. Other than not using LVM and using # very large devices, this is the same as the snapshot-zumastor.sh test. # To re...
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-ext3.sh 1581 2008-04-24 20:27:34Z williamanowak $ # # Set up zumastor with origin and snapshot stores on /dev/sdb and /dev/sdc, # iterate through a few snapshots to verify that each is unique and # stable when taken. # # Copyright 2007-2008 Google Inc. All rights reserved # Auth...
Shell
#!/bin/sh -x # # Verify that ddsnap handles snapshot squashing/autodelete correctly. # # Copyright 2008 Google Inc. All rights reserved # Author: Jiaying Zhang (jiayingz@google.com) set -e NUMDEVS=2 DEV1SIZE=8 DEV2SIZE=4 MAXSNAPSHOTS=64 echo "1..10" apt-get update ddsnap initialize -y -c 8k $DEV2NAME $DEV1NAME ...
Shell
#!/bin/sh -x # # $Id: snapshot-ddsnap.sh 1648 2008-05-07 20:51:43Z williamanowak $ # # 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.co...
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-ext2.sh 1581 2008-04-24 20:27:34Z williamanowak $ # # Test to make sure there are no files with the same name in # /proc/driver/ddsnap # http://code.google.com/p/zumastor/issues/detail?id=126 # # Copyright 2007-2008 Google Inc. All rights reserved # Author: Will Nowak (willn@goo...
Shell
#!/bin/sh -x # # Verify ddsnap journal replay works correctly when # 'ddsnap server' restarts after an unclean exit # # Copyright 2008 Google Inc. All rights reserved # Author: Jiaying Zhang (jiayingz@google.com) set -e NUMDEVS=2 DEV1SIZE=8 DEV2SIZE=4 echo "1..5" # Five checking steps in this test # these three e...
Shell
#!/bin/sh -x # # $Id$ # # Make use of large, extra devices on /dev/sd[bcd] to test # multi-terabyte-sized zumastor filesystems. RAID0 and LVM are used to # create the large filesystems from 2045G disks provided by qemu (the # largest supported by the 32-bit UML disk backing format). # This is otherwise the same as the...
Shell
#!/bin/sh -x # # $Id$ # # Boot and install insserv, and make sure zumastor doesn't show up # in its list of warnings. # # Copyright 2007 Google Inc. All rights reserved # Author: Drake Diedrich (dld@google.com) set -e TIMEOUT=1200 NUMDEVS=0 env echo "1..3" rc=0 apt-get update aptitude install -y insserv nfs-kern...
Shell
#!/bin/sh -x # # $Id$ # # Set up zumastor with origin and snapshot stores on /dev/sdb and /dev/sdc, # iterate through a few snapshots to verify that each is unique and # stable when taken. # # Copyright 2007-2008 Google Inc. All rights reserved # Author: Drake Diedrich (dld@google.com) set -e # The required sizes o...
Shell
#!/bin/sh -x # # $Id: ddsnap-error-handling.sh 1234 2008-01-05 05:24:09Z jiayingz $ # # Verify that ddsnap/ddsnapd handle error messages correctly # # Copyright 2008 Google Inc. All rights reserved # Author: Jiaying Zhang (jiayingz@google.com) set -e NUMDEVS=2 DEV1SIZE=8 DEV2SIZE=4 #DEV1NAME=/dev/null #DEV2NAME=/dev...
Shell
#!/bin/sh -x # # $Id$ # # Make use of large, extra devices on /dev/sdb and /dev/sdc to test # terabyte-sized zumastor filesystems. Other than not using LVM and using # very large devices, this is the same as the snapshot-zumastor.sh test. # To reduce the runtime of this test, only the XFS filesystem is tested. # mkfs....
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-ext3-resize.sh 1189 2007-12-22 00:27:19Z jiahotcake $ # # Set up testvg with origin and snapshot store, resize origin/snapshot volumes, # verify resize succeeds and data on origin/snapshot volumes still valid after resizing # # Copyright 2007 Google Inc. All rights reserved # Au...
Shell
#!/bin/sh -x # # $Id$ # # Set up zumastor with origin and snapshot stores on /dev/sdb and /dev/sdc, # iterate through a few snapshots to verify that each is unique and # stable when taken. # # Copyright 2007-2008 Google Inc. All rights reserved # Author: Drake Diedrich (dld@google.com) set -e # The required sizes o...
Shell
#!/bin/sh -x # # $Id$ # # Make sure we can load the ddsnap kernel module # # Copyright 2007 Google Inc. All rights reserved # Author: Will Nowak (willn@google.com) set -e TIMEOUT=1200 NUMDEVS=0 echo "1..4" depmod -a echo 'ok 1 - depmod' # Try to load the kernel module, but don't fail if it isn't there. # ddsnap ...
Shell
#!/bin/sh # # Verify that zumastor handles snapshot squashing/autodelete correctly. # # Copyright 2008 Google Inc. All rights reserved # Author: Jiaying Zhang (jiayingz@google.com) set -e # wait for file. The first argument is the timeout, the second the file. timeout_file_wait() { local max=$1 local file=$2 l...
Shell
#!/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 # The required sizes of the sdb and sdc devices ...
Shell
#!/bin/sh -x # # $Id$ # # Set up a zumastor volume and verify that --zero really zeroes it out. # # Copyright 2007-2008 Google Inc. All rights reserved # Author: Drake Diedrich (dld@google.com) set -e # The required sizes of the sdb and sdc devices in M. # Read only by the test harness. NUMDEVS=2 DEV1SIZE=4 DEV2SIZ...
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-ext3-resize.sh 1189 2007-12-22 00:27:19Z jiahotcake $ # # Set up testvg with origin and snapshot store, resize origin/snapshot volumes, # verify resize succeeds and data on origin/snapshot volumes still valid after resizing # # Copyright 2007 Google Inc. All rights reserved # Au...
Shell
#!/bin/sh -x # # $Id$ # # Test that zumastor initialize works even when the origin and # snapshot storage specified are just symlinks to the real devices. # # Copyright 2007 Google Inc. All rights reserved # Author: Drake Diedrich (dld@google.com) set -e # The required sizes of the sdb and sdc devices in M. # Read ...
Shell
#!/bin/sh -x # # $Id$ # # Set up zumastor with origin and snapshot stores on /dev/sdb and /dev/sdc, # iterate through a few snapshots to verify that each is unique and # stable when taken. # # Copyright 2007-2008 Google Inc. All rights reserved # Author: Drake Diedrich (dld@google.com) set -e # The required sizes o...
Shell
#!/bin/sh -x # # $Id$ # # Set up zumastor with origin and snapshot stores on /dev/sdb and /dev/sdc, # iterate through a few snapshots to verify that each is unique and # stable when taken. # # Copyright 2007-2008 Google Inc. All rights reserved # Author: Drake Diedrich (dld@google.com) set -e # The required sizes o...
Shell
#!/bin/sh -x # # Verify that ddsnap handles snapshot squashing/autodelete correctly. # # Copyright 2008 Google Inc. All rights reserved # Author: Jiaying Zhang (jiayingz@google.com) set -e NUMDEVS=2 DEV1SIZE=8 DEV2SIZE=4 MAXSNAPSHOTS=64 echo "1..10" apt-get update ddsnap initialize -y -c 8k $DEV2NAME $DEV1NAME ...
Shell
#!/bin/sh -x # # $Id$ # # Make use of large, extra devices on /dev/sd[bcd] to test # multi-terabyte-sized zumastor filesystems. RAID0 and LVM are used to # create the large filesystems from 2045G disks provided by qemu (the # largest supported by the 32-bit UML disk backing format). # This is otherwise the same as the...
Shell
#!/bin/sh -x # # $Id: zero-zumastor.sh 1581 2008-04-24 20:27:34Z williamanowak $ # # Set up a zumastor volume and verify that --zero really zeroes it out. # # Copyright 2007-2008 Google Inc. All rights reserved # Author: Drake Diedrich (dld@google.com) set -e # The required sizes of the sdb and sdc devices in M. # ...
Shell
#!/bin/sh -x # # Verify ddsnap journal replay works correctly when # 'ddsnap server' restarts after an unclean exit # # Copyright 2008 Google Inc. All rights reserved # Author: Jiaying Zhang (jiayingz@google.com) set -e NUMDEVS=2 DEV1SIZE=8 DEV2SIZE=4 echo "1..5" # Five checking steps in this test # these three e...
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-ext2.sh 1581 2008-04-24 20:27:34Z williamanowak $ # # Test to make sure there are no files with the same name in # /proc/driver/ddsnap # http://code.google.com/p/zumastor/issues/detail?id=126 # # Copyright 2007-2008 Google Inc. All rights reserved # Author: Will Nowak (willn@goo...
Shell
#!/bin/sh # # Verify that zumastor handles snapshot squashing/autodelete correctly. # # Copyright 2008 Google Inc. All rights reserved # Author: Jiaying Zhang (jiayingz@google.com) set -e # wait for file. The first argument is the timeout, the second the file. timeout_file_wait() { local max=$1 local file=$2 l...
Shell
#!/bin/sh -x # # $Id: snapshot-zumastor-jfs.sh 1581 2008-04-24 20:27:34Z williamanowak $ # # Set up zumastor with origin and snapshot stores on /dev/sdb and /dev/sdc, # iterate through a few snapshots to verify that each is unique and # stable when taken. # # Copyright 2007-2008 Google Inc. All rights reserved # Autho...
Shell
#!/bin/sh -x # # $Id$ # # Test that zumastor initialize works even when the origin and # snapshot storage specified are just symlinks to the real devices. # # Copyright 2007 Google Inc. All rights reserved # Author: Drake Diedrich (dld@google.com) set -e # The required sizes of the sdb and sdc devices in M. # Read ...
Shell
#!/bin/bash -x # Run this only on Debian or Debian-derivative systems for now. # Manually inspect and run the components modified as necessary on # other systems. set -e stagefile=`mktemp` tmpdir=`mktemp -d` sudo apt-get -q --force-yes -y install devscripts build-essential fakeroot \ ...
Shell
#!/bin/bash # $Id: runtests.sh 1666 2008-05-20 18:38:25Z williamanowak $ # # Tests run without privileges, other than those granted by tunbr, which # must be installed first, along with interfaces-bridge.sh, proxy.sh, and # dnsmasq.sh as described in cbtb/host-setup/README. # Defaults to testing on dapper/i386 install...
Shell
#!/bin/bash # $Id: smoke.sh 1198 2007-12-22 11:43:15Z drake.diedrich $ # # build-i386.sh requires root privs via sudo, so this smoke test may # only be run interactively and is inherently somewhat dangerous. # You should inspect the scripts before running them. # # Several portions of this script require your host hav...
Shell
#!/bin/bash -x # # Make a tarball of the root system of a basic Ubunutu/dapper system, # for use in preparing UML root partition images # # $Id: debootstrap.sh 1626 2008-05-01 19:01:51Z williamanowak $ # Copyright 2007 Google Inc. # Author: Drake Diedrich <dld@google.com> # License: GPLv2 set -e OLDPWD=$PWD cd ../....
Shell
#!/bin/bash -x # Run the zumastor distribution and arch ext3 image using UML COW verify that it works. # The template should be left unmodified. # Any parameters are copied to the destination instance and executed as root # DIST and ARCH default to dapper/i386. but may be specified. Currently # only DIST=etch, ARCH=i...
Shell
#!/bin/bash -x # build packages and UML test kernel natively on Debian/etch i386 set -e if [ "x$DIST" = "x" ] then echo "This script needs a DIST env variable" exit 1 fi if [ "x$ARCH" = "x" ] then echo "This script needs an ARCH env variable" exit 1 fi if [ "x$LINUXDISTRIBUTION" = "x" ] then echo "This s...
Shell
#!/bin/bash # $Id: smoke.sh 1198 2007-12-22 11:43:15Z drake.diedrich $ # # build-i386.sh requires root privs via sudo, so this smoke test may # only be run interactively and is inherently somewhat dangerous. # You should inspect the scripts before running them. # # Several portions of this script require your host hav...
Shell
#!/bin/bash # $Id$ # # Tests run without privileges, other than those granted by tunbr, which # must be installed first, along with interfaces-bridge.sh, proxy.sh, and # dnsmasq.sh as described in cbtb/host-setup/README. # Defaults to testing on dapper/i386 installed template images, DIST=etch # and ARCH=i386 may also...
Shell
#!/bin/bash -x # Run this only on Debian or Debian-derivative systems for now. # Manually inspect and run the components modified as necessary on # other systems. set -e stagefile=`mktemp` tmpdir=`mktemp -d` sudo apt-get -q --force-yes -y install devscripts build-essential fakeroot \ ...
Shell
#!/bin/bash -x # # Make a tarball of the root system of a basic Ubunutu/dapper system, # for use in preparing UML root partition images # # $Id$ # Copyright 2007 Google Inc. # Author: Drake Diedrich <dld@google.com> # License: GPLv2 set -e OLDPWD=$PWD cd ../.. SRC=$PWD BUILD_DIR="$SRC/build" SVNREV=`awk '/^[0...
Shell
#!/bin/bash -x # build packages and UML test kernel natively on Debian/etch i386 set -e if [ "x$DIST" = "x" ] then echo "This script needs a DIST env variable" exit 1 fi if [ "x$ARCH" = "x" ] then echo "This script needs an ARCH env variable" exit 1 fi if [ "x$LINUXDISTRIBUTION" = "x" ] then echo "This s...
Shell
#!/bin/bash -x # Run the zumastor distribution and arch ext3 image using UML COW verify that it works. # The template should be left unmodified. # Any parameters are copied to the destination instance and executed as root # DIST and ARCH default to dapper/i386. but may be specified. Currently # only DIST=etch, ARCH=i...
Shell
#!/bin/sh # # $Id: tunbr-config 1004 2007-11-30 16:05:47Z drake.diedrich $ # # 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 ...
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 monthly done
Shell
#!/bin/bash for vol in $(ls /var/run/zumastor/cron) ; do zumastor snapshot $vol monthly 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 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/cron.monthly/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/cron.monthly/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 update-rc.d zumastor remove >/dev/null || exit 0 fi
Shell
#!/bin/sh if [ "$1" = "purge" ] ; then rm -rf /var/lib/zumastor update-rc.d zumastor remove >/dev/null || exit 0 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/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) echo "$0 ...
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 apt-get -q -y install \ ...
Shell
#!/bin/bash -x # # $Id$ # # based on buildcurrent.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 # Only builds deb src packages for upload to builder # # Copyright 2007 Google Inc. All rights reserved. #...
Shell
#!/bin/bash # zumastor automated build script # Shapor Naghibzadeh <shapor@google.com> KERNEL_VERSION=2.6.22.10 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/bash basedir=`mktemp -d` filepath="linux/drivers/md" for dir in a b do mkdir -p $basedir/$dir-$filepath done cp kernel/* $basedir/b-$filepath curdir=`pwd` cd $basedir diff -ruNp a-$filepath b-$filepath cd $curdir rm -rf $basedir
Shell
#!/bin/bash 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 basedir=`mktemp -d` filepath="linux/drivers/md" for dir in a b do mkdir -p $basedir/$dir-$filepath done cp kernel/* $basedir/b-$filepath curdir=`pwd` cd $basedir diff -ruNp a-$filepath b-$filepath cd $curdir rm -rf $basedir
Shell
#!/bin/bash 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.22.10 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 1656 2008-05-09 19:09:52Z williamanowak $ # # 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/bash # # Copy a large volume to an exported zumastor volume via nfs, with hourly # replication running between the zumastor-nfs server and a backup server. # # Copyright 2007 Google Inc. All rights reserved. # Author: Jiaying Zhang (jiayingz@google.com) set -e # change the configurations according to the machin...
Shell
#!/bin/bash # # Copy a large volume to an exported zumastor volume via nfs, with hourly # replication running between the zumastor-nfs server and a backup server. # # Copyright 2007 Google Inc. All rights reserved. # Author: Jiaying Zhang (jiayingz@google.com) set -e # change the configurations according to the machin...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # shutdown source and target umls . config_uml . config_replication ssh $SSH_OPTS $source_uml_host "zumastor forget volume $vol" >& /dev/null ssh $SSH_OPTS $target_uml_host "zumastor forget volume $vol" >& /dev/null ./stop_uml.sh ...
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> # download linux kernel and debian root file system image . config_uml # Download a file and checks its checksum download() { file=`basename "$1"` test -f $DOWNLOAD_CACHE/$file || (pushd $DOWNLOAD_CACHE; wget -c "$1"; popd) if ...
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 pushd $WORKDIR [[ -e linux-${KERNEL_VERSION} ]] && rm -rf linux-${KERNEL_VERSION} echo -n Unpacking kernel... tar...
Shell
#!/bin/bash # Copyright 2007 Google Inc. # Author: Jiaying Zhang <jiayingz@google.com> # This test is based on the failure injection scripts from Joel Votaw <jvotaw@google.com> # It untars a series of kernel tarball, at the same time, # simulates processes crashing and sysadmin mistakes at an accelerated rate . confi...
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 build-essential devscripts fakeroot debhelper > /dev/null 2>&1 || sudo apt-get install build-essential devscripts fakeroot debhelper dpkg -s uml-utilities > /dev/null 2>&1 || sudo apt-...
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 $WORKDIR/$uml_fs /mnt || exit 1 pushd $ZUMA_REPOSITORY/...
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 ./start_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 umount_exit() { echo $1 umount /mnt rm -f $uml_fs exit 1 } [[ $# -eq 1 ]] || { echo "Usage: build_fs.sh uml_fs"; exit 1; } uml_f...
Shell