Ignite-UX and MirrorDisk/UX

# Make sure the disk is removed from the group by using vgreduce.
echo \" \n\nReducing $DISK2 from vg00.\"
vgreduce /dev/vg00 $DISK2
# Once reduced we need to section the disk with the idisk command
# the sizes of the EFI and HPSP sections need to match the mirror.
# This assumes that there is a HP Service Partition (HPSP). If the
# size of any partition is different the sizes below need to be
# changed.
PARTS1=${DISK1#/dev/dsk/}
PARTS2=${DISK2#/dev/dsk/}
PART1=$(echo $PARTS1|cut -c 0-6)
PART2=$(echo $PARTS2|cut -c 0-6)
# So we know that PART1 & 2 have no Disk sectioning in the
# device file name. We'll presume PARISC and set PARTS2
# with no disk section device file for NON IA lvm commands.
PARTS2=${PART2}
if [ $CPU = IA ]
then
# If we get here we know we're IA so ... we'll set PARTS2
# disk section device file for IA lvm commands.
PARTS2=${PART2}s2
# Let figure out the partition sizes on DISK and use those
# on DISK2.
LBA=$(idisk -p /dev/rdsk/$PART1|grep -e Starting -e Ending |\
awk ' { print $4 } ' )
echo $LBA |read EFIS EFIE HPUXS HPUXE HPSPS HPSPE
efisize=\"ibase=16;$(echo ${EFIE#0[xX]}\
|tr \\"\"[abcdef]\"\\" \\"\"[ABCDEF]\"\\")-\
$(echo ${EFIS#0[xX]}|tr \\"\"[abcdef]\"\\"
\\"\"[ABCDEF]\"\\")+1\"
EFIsize=$(echo $efisize |bc)
EFISIZE=$(echo $EFIsize\/2\/1024|bc)
hpspsize=\"ibase=16;$(echo ${HPSPE#0[xX]}\
|tr \\"\"[abcdef]\"\\" \\"\"[ABCDEF]\"\\")-\
$(echo ${HPSPS#0[xX]}|tr \\"\"[abcdef]\"\\"
\\"\"[ABCDEF]\"\\")+1\"
HPSPsize=$(echo $hpspsize |bc)
HPSPSIZE=$(echo $HPSPsize\/2\/1024|bc)
echo \"\n\n It has been determined that partition 1 ond 3 \"
echo \" on $PART1 are $EFISIZE MB and $HPSPSIZE MB\"
echo \" in size. These sizes will be used to partition $PART2.\"
echo \" The remainder of the disk will be assigned to partition
2.\"
12