Ignite-UX and MirrorDisk/UX
cpu=$(/usr/bin/getconf CPU_VERSION)
if [ $cpu = 532 ]
then
CPU=PA
else
CPU=IA
fi
# Recreate a mirror of the boot disk. This assumes that the root
# volume group was mirrored when this configuration was added
# if this is an initial mirroring the disk does not have to be
# reduced from the volume group.
# CHECK how many Disks in root vg
NO_OF_00_DSKS=$(vgdisplay -v vg00 |grep \"PV Name\" |wc -l)
if [ $NO_OF_00_DSKS != 2 ]
then
echo \" This script is designed to work with ignite.\"
echo \" It remirrors a PV in vg00 to a second PV.\"
echo \" It presumes the disks were previously mirrored.\"
echo \" In so doing only works with vg00s that have 2 disks.\"
echo \" This script will not run because this vg00 has
$NO_OF_00_DSKS disks.\"
exit
fi
echo \"\n\n This vg00 has $NO_OF_00_DSKS disks. Continuing on.\n\n\"
# I want 1 disk with 0 lvols and another disk with more than 2.
ROOT_DSKS=$(vgdisplay -v vg00 |grep \"PV Name\" | awk ' { print $3 }
')
echo $ROOT_DSKS|read DISK1 DISK2
NUM_OF_LVOLS1=$(/usr/sbin/pvdisplay $DISK1 |/usr/bin/grep LV|awk ' {
print $3 } ' )
NUM_OF_LVOLS2=$(/usr/sbin/pvdisplay $DISK2 |/usr/bin/grep LV|awk ' {
print $3 } ' )
# Lets Check Which Disk has lvols on it and use that as the primary.
if [ $NUM_OF_LVOLS2 -gt 2 -a $NUM_OF_LVOLS1 = 0 ]
then
echo $ROOT_DSKS|read DISK2 DISK1
/usr/sbin/pvdisplay $DISK1 |/usr/bin/grep LV\
|/usr/bin/read CUR LV NUM_OF_LVOLS1
/usr/sbin/pvdisplay $DISK2 |/usr/bin/grep LV\
|/usr/bin/read CUR LV NUM_OF_LVOLS2
fi
echo \" Since $DISK1 has $NUM_OF_LVOLS1 lvols\"
echo \" and $DISK2 has $NUM_OF_LVOLS2 lvols,\"
echo \" Mirror-UX will be used to make a mirror \"
echo \" of $DISK1 on $DISK2.\"
11