|      |      #Login as root and start a scriptlog. script -a /var/adm/install-logs/IQ-mirror-rootdisk.scriptlog # Step 1 uname -a id  |   |
|      |      #Find your second root disk. #Set the variable MIRROR_DISK, with the short name of the entire disk (eg, #disk3, but not /dev/disk/disk3 or disk3_p2) #Step 2 vgdisplay -v vg00|grep ‘PV Name’ ioscan -funNC disk | more MIRROR_DISK=<short name of the entire disk, not a partition, eg.   disk3. DO NOT USE THE FULL NAME.> echo ${MIRROR_DISK}  |   |
|      |      #Ensure the MIRROR_DISK is set correctly, as expected by this checklist. #Step 3 ll /dev/disk/${MIRROR_DISK}    #No errors should be reported and device file for ENTIRE disk shown.    |   |
|      |      # Determine the HW path of the disk, using the MIRROR_DISK variable #Step 4 MIRROR_HW=`ioscan -m lun /dev/disk/${MIRROR_DISK}|awk '{if ( NR == 4 ) print $1}'` echo $MIRROR_HW          #The Hardware path of the disk should be displayed. ioscan -m hwpath -H $MIRROR_HW     #The lun h/w path and lunpath h/w path displayed.  |   
|      |      #Create Partition description file and partition the disk. #Step 5 echo "3\nEFI 500MB\nHPUX 100%\nHPSP 400MB" > /tmp/idf cat /tmp/idf idisk -f /tmp/idf -w /dev/rdisk/${MIRROR_DISK} idisk /dev/rdisk/${MIRROR_DISK} | more  |      |   
|      |      #Create device files for the new partition. #Step 6 insf -eC disk ll /dev/rdisk/${MIRROR_DISK}_p[123] ioscan -m lun  /dev/rdisk/${MIRROR_DISK}_p3      |      |   
|      |      #Format partition 2 as a bootable lvm disk and add to vg00. #Step 7 pvcreate -B /dev/rdisk/${MIRROR_DISK}_p2 vgextend vg00 /dev/disk/${MIRROR_DISK}_p2  |      |   
|      |      #Place boot utilities in the boot area. #Step 8 mkboot -e -l /dev/rdisk/${MIRROR_DISK}  |      |   
|      |      #Create autoboot file. #Step 9 mkboot -a "hpux -lq" /dev/rdisk/${MIRROR_DISK}  |      |   
|      |      #Mirror the LVs in the same order in which they are placed in the primary. Change to “m 2” in lvextend command below, if this is a second mirror   (third disk). #Step 10 PRIMARY_DISK=`vgdisplay -v vg00|awk '/PV Name/ { print  $3 }'|head -1` echo $PRIMARY_DISK for lv in `pvdisplay -v $PRIMARY_DISK|awk '/current.*0000 $/ {print $3 }’` do   echo Mirroring $lv   lvextend -m 1 $lv /dev/disk/${MIRROR_DISK}_p2   done vgdisplay -v vg00|more                |      |   
|      |      #Update root volume group information and verify that the mirrored disk is displayed as a boot disk and that the  boot, root, and swap logical volumes appear to be on both disks. #Step 11 lvlnboot -R /dev/vg00 lvlnboot -v  |      |   
|      |      #Specify mirror disk as HA alternate boot device in nvram. Change the setboot otion in first command to “-a” if this is a second mirror (third   disk). #Step 12 setboot -h $MIRROR_HW setboot -v  |      |   
|      |      #Add a line to /stand/bootconf for the new boot disk if required.   #Step 13 cat /stand/bootconf echo "l  /dev/disk/${MIRROR_DISK}_p2" >> /stand/bootconf cat /stand/bootconf  |      |   
|      |      #copy the HPSP partition. #Step 14 PRIMARY_HPSP=`echo $PRIMARY_DISK|sed 's/2$/3/'` dd if=$PRIMARY_HPSP   of=/dev/rdisk/${MIRROR_DISK}_p3 bs=64k conv=sync efi_ls -d /dev/disk/${MIRROR_DISK}_p3 EFI/HP/DIAG/ODE  |      |   
|      |      #Reboot using this mirror to test. Interupt the boot process and select HA Alternate device to boot. Exit scirptlog if reboot cannot be scheduled   immediately. #Step 15 shutdown -ry 0  #Recommended. Interupt boot and select the HA Alternate (or alternate, if third mirror) to boot. #OR exit  |      |