return to PRS Technologies website
Creating an HP/UX mirrored boot disk |
PROBLEMBy using mirror copies of the root or primary swap logical volumes on another disk, you will be able to use the copies to keep your system in operation, if either of these logical volumes fail. How can I create a mirrored boot disk? CONFIGURATIONMirrorDisk-UX RESOLUTIONIn this example the disk to be used as an additional mirror copy will be /dev/dsk/c0t5d0 on which as well the root as the swap logical volume will be mirrored. The primary mirror copy will be on /dev/dsk/c0t6d0. To mirror the root file system, add a bootable LVM disk. Create a physical volume using pvcreate with the -B option. # pvcreate -B /dev/rdsk/c0t5d0 Add the physical volume to the existing root volume group with vgextend: # vgextend /dev/vg00 /dev/dsk/c0t5d0 Use mkboot to place boot utilities in the boot area: # mkboot -l /dev/rdsk/c0t5d0 Use mkboot to add an AUTO file in boot LIF area: # mkboot -a "hpux" /dev/rdsk/c0t5d0 Or, use the -lq option to allow the system to boot in the event that one of the disks is unavailable, resulting in a loss of quorum. # mkboot -a "hpux -lq" /dev/rdsk/c0t5d0 NOTE: Use the -lq option when the root volume group contains only 2 disks. If more than 2 disks are in the root volume group, the -lq option is not needed as quorum will be maintained even if 1 disk fails. Check the contents of the AUTO file with # lifcp /dev/rdsk/c0t5d0:AUTO - Alternatively, one could set the alternate boot path variable according to e.g. # setboot -a 8/0/19/0.5.0 The hardware address of the disk that will become the mirror disk can be determined with 'ioscan -fnC' disk. To check use setboot without any arguments. Use pvdisplay -v to the order of the logical volumes on the primary disk. # pvdisplay -v NOTE: In the following, the standard sequence lvol1, lvol2, lvol3, and so forth, is assumed. Mirror the boot logical volume, primary swap logical volume, root logical volume and other logical volumes as needed, to the mirror disk in the correct sequence # lvextend -m 1 /dev/vg00/lvol1
/dev/dsk/c0t5d0 Use pvdisplay -v to the order of the logical volumes on the mirror disk to insure they are in the correct order. # pvdisplay -v Update all physical volumes in the volume group so that the logical volume become the root, boot, primary swap, or a dump volume when the system is next booted: For HP-UX 10.20 (not updated to) and 11.X only: # lvlnboot -r /dev/vg00/lvol3
/dev/vg00 For HP-UX 10.01, 10.10, and updates to 10.20 only: # lvlnboot -r /dev/vg00/lvol1
/dev/vg00 Check with # lvlnboot -v Both disks must be listed for root, boot and swap definitions. NOTE: If forgotten, it often occurs that the system has to be booted in LVM maintenance mode. If you need to know how to boot systems in LVM maintenance mode or other mode, please refer to document OZBEKBRC00000607. In order to test the mirror configuration, shut down the system and boot from the mirror disk. # shutdown -ry 0 The system will shut down and reboot. As the system starts to come back up, look for the message (system's output may vary): TO INTERRUPT THE BOOT SEQUENCE, PRESS ... Interrupt the boot sequence. This will display the Boot Admin display. At the boot_admin> prompt type: bo Mirror_disk_hardware_address
or if the alternate boot device has been configured. The system will prompt to interact with IPL, answer 'no', and the system will boot from the mirror root disk.
NOTE: This example includes creating a mirror copy of the primary swap logical volume. The primary swap mirror does not need to be on a specific disk or at a specific location, but it does need to be allocated on contiguous disk space. The recommended mirror policy for primary swap is to have the Mirror Write Cache and the Mirror Consistency Recovery mechanisms disabled. When primary swap is mirrored and your primary swap device also serves as a dump area, you must make sure that Mirror Write Cache and Mirror Consistency Recovery is set to off at boot time to avoid loss of your dump. To reset these options, you will need to reboot your system in maintenance mode. Then use the lvchange(1M) command with the -M n and -c n options. Installation of Offline Diagnostics (ODE) on Mirrored Boot Disks The following hardware support tools are distributed on the Support Plus Media in the OnlineDiag swinstall bundle:
There is an easy way to install the ODE to the mirror if you have already installed the OnlineDiag bundle. Check the existence of the updatediaglif file: # ll /usr/sbin/diag/lif/updatediaglif -r--r--r-- 1 bin bin 820224 Jul 26 21:56 /usr/sbin/diag/lif/updatediaglif List the contents of the LIF directory of the mirror: # lifls -l /dev/rdsk/c0t5d0 volume ISL10 data size 7984 directory size 8 96/05/28 04:10:13 filename type start size implement created =============================================================== ISL -12800 584 240 0 96/05/28 04:10:13 AUTO -12289 824 1 0 96/05/28 04:10:13 HPUX -12928 832 848 0 96/05/28 04:10:13 PAD -12290 1680 1652 0 96/05/28 04:10:14 LABEL BIN 3336 8 0 99/01/25 06:00:41 Install the ODE LIF files with mkboot and protect (-p) the existing LIF files which you detected with lifls as described above, e.g.: # mkboot -b /usr/sbin/diag/lif/updatediaglif
\ # mkboot -b
/usr/sbin/diag/lif/updatediaglif2 \ Check with # lifls /dev/rdsk/c0t5d0 One will find additional LIF files, e.g. ODE MAPFILE SYSLIB CONFIGDATA SLMOD SLDEV SLDRIVERS SLSCSI MAPPER IOTEST PERFVER PVCU SSINFO ISL HPUX AUTO PAD LABEL |