Disk Arrays
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating backup disk

Garth_3
Occasional Visitor

Creating backup disk

I have two 36GB disks set mirrored pair, and would like to create a Backup disk of the system. If I pull 1 of the pair out will that work as a backup disk.
2 REPLIES

Re: Creating backup disk

Garth,

This really depends on your configuration. I need to know the following:

What type of array controller
What server
What OS
Are there other drives attached to this controller and what is their configuration?
Alexander M. Ermes
Honored Contributor

Re: Creating backup disk

Hi there.
Try to get a third disk.

1.
Break the mirror. Take out the secondary disk.
Put in the new one. Rebuild the mirror.

2.
Put in the new disk and create a backup with dd.

This idea came originally from Clay Stephenson
known as life boat.

#!/usr/bin/ksh

# Define the Source (SRC) and Destination (DEST) devices for the boot copy"
# Warning: Be very careful; you may overwrite actual boot devices or data!!!"
# Make certain corresponding SRC & DEST drives be identical.
# NOTE: Marvin Vesrion !!!


src="/dev/rdsk/c3t5d0 /dev/rdsk/c3t0d0"
DEST="/dev/rdsk/c3t9d0 /dev/rdsk/c3t8d0"

VRSN="[1.0]"
# 1.0 05/17/99 acs

PROG=$0
BLKSZ=8000k
SYNC_DELAY=10

readonly SRC DEST PROG VRSN BLKSZ SYNC_DELAY

PATH=/usr/bin:/usr/sbin:${PATH}
export PATH

HOST=`hostname`

readonly HOST

STAT=0
VERBOSE=1
while getopts :vVsS opts
do
case $opts in
v|V) VERBOSE=1
;;
s|S) VERBOSE=0
;;
? ) echo "${PROG}: Unknown arg\n" >&2
STAT=244
;;
esac
done

if [ ${STAT} -ne 0 ]
then
exit ${STAT}
fi

let SRCKNT=0
for X in $SRC
do
SRCRAY[${SRCKNT}]=$X
let SRCKNT=${SRCKNT}+1
done

let DESTKNT=0
for X in $DEST
do
DESTRAY[${DESTKNT}]=$X
let DESTKNT=${DESTKNT}+1
done


if [ ${SRCKNT} -ne ${DESTKNT} ]
then
echo "${PROG}: Boot source volume count not equal to destination \c" >&2
echo "count." >&2
STAT=255
exit $STAT
fi

let N=0
while [ ${N} -lt ${SRCKNT} -a ${STAT} -eq 0 ]
do
S=${SRCRAY[${N}]}
D=${DESTRAY[${N}]}
if [ -c "${S}" ]
then
if [ -c "${D}" ]
then
if [ "${S}" != "${D}" ]
then
let N=${N}+1
else
echo "${PROG}: Source and destinatrion device \"${S}\" " >&2
echo "identical." >&2
fi
else
echo "${PROG}: Destination volume \"${D}\" does not exist or " >&2
echo "is not a character special device." >&2
STAT=253
fi
else
echo "${PROG}: Source volume \"${S}\" does not exist or is not a " >&2
echo "character special device." >&2
STAT=254
fi
done

if [ $STAT -eq 0 ]
then
if [ ${VERBOSE} -ne 0 ]
then
echo "Host: ${HOST}"
echo
echo "Syncing disk(s). ...\c"
fi
sync; sync; sync
sleep $SYNC_DELAY
if [ ${VERBOSE} -ne 0 ]
then
echo
echo
fi
let N=0
while [ ${N} -lt ${SRCKNT} -a ${STAT} -eq 0 ]
do
S=${SRCRAY[${N}]}
D=${DESTRAY[${N}]}
let N=${N}+1
if [ ${VERBOSE} -ne 0 ]
then
echo "Copying Boot Disk ${N} of ${SRCKNT} in background. ... "
echo "\t${S} --> ${D} ... \c"
fi
dd if=${S} of=${D} bs=${BLKSZ} &
if [ ${VERBOSE} -ne 0 ]
then
echo
echo
fi
sleep $SYNC_DELAY
done
if [ ${VERBOSE} -ne 0 ]
then
echo
echo "Waiting for all copies to finish. ...\c"
fi
wait
STAT=$?
if [ ${STAT} -eq 0 ]
then
if [ ${VERBOSE} -ne 0 ]
then
echo " Done."
fi
else
echo "\n${PROG}: Host ${HOST}; copy failed; status = ${STAT}." >&2
fi
fi
exit $STAT



Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"