Here's the script. Re: Quick mirror setup for Sol9 vol manager??

From: Jason Price (storm@xmen.net)
Date: Fri Oct 03 2003 - 10:53:29 EDT


#!/bin/sh
#######################################################
# #
# Script to mirror root drive #
# #
#######################################################
NOTIFY="root"

/bin/touch /etc/file

## Change the disks below to match your system
dd if=/dev/rdsk/c1t9d0s2 of=/dev/rdsk/c1t10d0s2 bs=8192

## Check the target disk for errors, because it will have them
fsck -y /dev/rdsk/c1t10d0s0
fsck -y /dev/rdsk/c1t10d0s3
fsck -y /dev/rdsk/c1t10d0s4
fsck -y /dev/rdsk/c1t10d0s5
fsck -y /dev/rdsk/c1t10d0s6
fsck -y /dev/rdsk/c1t10d0s7

## Mount the target root slice and check that the copy worked
mkdir /mirrdir
mount /dev/dsk/c1t10d0s0 /mirrdir

if [ -r /mirrdir/etc/file ]; then
                /usr/ucb/Mail -s "Mirror copy successful for `hostname`"
$NOTIFY < /dev/null
        else
                /usr/ucb/Mail -s "Mirror copy for `hostname` unsuccessful
please check" $NOTIFY < /dev/null
fi

## Clean up the files and unmount
/bin/rm /mirrdir/etc/file
/bin/rm /etc/file
umount /mirrdir
/bin/rmdir /mirrdir
###########

Quoting Jason Price <storm@xmen.net>:

> With Solaris 7 and 8 we used a script to dupe the boot drives(script below).
>
> Since we're now using soft partitions and RAID 5 with Solaris 9's volume
> manager, I'm looking for a clear and simple instruction to setup boot drive
> mirroring using Sun's volume manager.
>
> Thanks for any help..
>
> Jason
> _______________________________________________
> sunmanagers mailing list
> sunmanagers@sunmanagers.org
> http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:27:14 EDT