Cover V08, I08
Article
Figure 1
Figure 2
Figure 3
Listing 1
Listing 2
Listing 3

aug99.tar


Listing 1: Single system, offline spare

#!/bin/sh
#  This script is designed to make a duplicate boot disk for zagloba.

#  In the give credit where credit is due department, it is based on a script
#  from Don Geitzen of Sun Microsystems (and tws).  Ron Jachim modified it
#  for the Karmanos Cancer Institute to replicate their main server on
#  demand.

#  Define the source (src) and destination (dst) disks
#  using standard SVR4 device names in the form cXtXdX.

src=c1t0d0
dst=c1t2d0

#  Determine the optimal block size based on the physical parameters
#  of the disk drives.  You will want to tune this for your disks.

HEADS=16
SPT=135
SECTORSIZE=512

BLOCKSIZE=`expr $HEADS \* $SPT \* $SECTORSIZE`b

#  Now copy the entire source drive to the destination drive.  Note
#  that this assumes that disk partition (slice) 2 is defined as the
#  entire disk drive.  This is the default for Solaris systems.

dd if=/dev/rdsk/"$src"s2 of=/dev/rdsk/"$dst"s2 bs=$BLOCKSIZE

#  Verify that all of the copied partitions are OK

fsck -y /dev/rdsk/"$dst"s0

exit