Home > HP-UX > HP-UX mirroring with mirror-ux

HP-UX mirroring with mirror-ux

Steps to create a mirrored boot disk on PA-Risc HP-UX (10.x and 11.x) systems:

  • In order to mirror disks on HP-UX, you must have Mirror-Disk-UX installed. The following command will check if it’s installed or not:
 # swlist -l fileset | grep -i mirror
  • You should see something similar to below:
LVM.LVM-MIRROR-RUN
  • In this example, the disk to be used as the additional mirror copy will be /dev/dsk/c0t5d0, which will include root and the swap logical volumes. 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 the pvcreate command:
 # pvcreate -B /dev/rdsk/c0t5d0
  • Add the physical volume to the existing root volume group with vgextend:
 # vgextend /dev/vg00 /dev/dsk/c0t5d0
  • Use the mkboot command to place boot utilities in the boot area:
 # mkboot -l /dev/rdsk/c0t5d0
  • Use mkboot to add an AUTO file in the boot LIF area. If only two disks are in the root volume group (recommended), be certain to use the -lq option in the event of a disk failure which results in a loss of quorum. If more than two disks are in the root volume group, quorum will be maintained without the -lq option.
 # mkboot -a "hpux -lq" /dev/rdsk/c0t5d0
  • Verify the contents of the AUTO file in the boot area:
 # lifcp /dev/rdsk/c0t5d0:AUTO -
  • Determine the hardware address of the disk which will become the mirror disk with the ioscan command:
 # ioscan -fnC disk
  • Set the alternate boot path variable according to the hardware path determined above (example below):
 # setboot -a 8/0/19/0.5.0
  • To validate it was set, use the setboot command without any parameters.
  • Activate the autosearch and autoboot capabilities:
 # setboot -s on -b on
  • Use the pvdisplay command to view the order of the logical volumes on the primary disk:
 # pvdisplay -v /dev/dsk/c0t6d0
  • Mirrot the boot, primary swap, root, and other logical volumes as needed to the mirror disk in the correct sequence found above. In the following, the standard sequence of lvol1, lvol2, lvol3 and so on is assumed:
 # lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t5d0
 # lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c0t5d0
 # lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c0t5d0
 # lvextend -m 1 (additional LV as necessary)
  • Use the pvdisplay command to view the order of the logical volumes on the mirror disk to validate the are in the correct order:
 # pvdisplay -v /dev/dsk/c0t5d0
  • Update all physical volumes in the volume group so that the logical volumes become the root, boot, primary swap or a dump volume when the system is booted next:
  • For HP-UX 10.20(not updated to) and 11.x only:
 # lvlnboot -r /dev/vg00/lvol3 /dev/vg00
 # lvlnboot -b /dev/vg00/lvol1 /dev/vg00
 # lvlnboot -s /dev/vg00/lvol2 /dev/vg00
 # lvlnboot -d /dev/vg00/lvol2 /dev/vg00
  • For HP-UX 10.01, 10.10, and updated to 10.20 only:
 # lvlnboot -r /dev/vg00/lvol1 /dev/vg00
 # lvlnboot -s /dev/vg00/lvol2 /dev/vg00
 # lvlnboot -d /dev/vg00/lvol2 /dev/vg00
  • To validate the updates, check with:
 # lvlnboot -v
  • Both disks must be listed for root, boot and swap definitions. Without the lvlnboot sequence, the system will not be able to boot automatically if the primary disk fails. In order to correct it then, the system will have to be booted into LVM maintenance mode.
  • In order to test the mirror configuration, shut down the system and boot from the mirror disk:
 # shutdown -ry 0
  • The system will begin to shutdown and reboot. As the system starts to come back up, look for a message similar to:
 TO INTERRUPT THE BOOT SEQUENCE, PRESS ...
  • Interrupt the book sequence. This will display the Boot Admin display. At the boot_admin> prompt, type:
 bo <Alternate disk's hardware path>      -or-
 bo alt
  • If the alternate boot device has been configured properly, the system will prompt to interact with the IPL. Answer “no”, and the system will boot from the mirror root disk.

Installation of Offline Diagnostics (ODE) on Mirrored Boot Disks

  • Check the existance of the updatediaglif file:
 # ll /usr/sbin/diag/lif/updatediaglif
  • List the contents of the LIF directory of the mirror:
 # lifls -l /dev/rdsk/c0t5d0
  • Use the getconf command below to determine which type of cpu is supported (32, 32/64, 64):
 # getconf HW_CPU_SUPP_BITS
  • Install the ODE LIF files with mkboot and protect (-p) the existing LIF files which you detected with lifls in previous step:
 # mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD
-p LABEL /dev/rdsk/c0t5d0
  • For pure 64-bit (No 32-bit CPU support) systems use:
 # mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD
-p LABEL /dev/rdsk/c0t5d0
  • Check with the lifls command:
# lifls /dev/rdsk/c0t5d0

Here’s a link to a doc on how to vgfcrestore and lvsplit if you should need to do a recovery or lvsplit a mirror and back it up:
MIRROR-UX failure recovery options

Categories: HP-UX
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: