How to keep a spare mirror before a major system upgrade
This document describes a method to use LVM Mirror-UX to keep a backup copy of the bootable LVM /dev/vg00 volume group prior to a major system upgrade. The traditional and recommended method is using Ignite-UX make_tape_recovery | make_net_recovery commands. Alternative on HP-UX 11i v2 and above, Dynamic Root Disk provided a similar approach were /dev/vg00 is cloned to a spare disk that can be used to reduce downtime during major system upgrades.
The procedures work better on systems where the OLR feature patches are installed. In systems where the patches are not installed is necesary to shutdown to physically remove the spare mirror copy.
The nature of the procedure can be explained in a single phrase: "Remove one of the /dev/vg00 mirror disks and keep it on your safe box."
Remember that on HP-UX 11i v3 the device special files names to the disks have change to Agile View naming. The names change from /dev/dsk/c#t#d# to /dev/disk/disk#. On Integrity systems also the EFI partitions have change from /dev/dsk/c#t#d#s# to /dev/disk/disk#_p#.
1. Create a current Ignite-UX backup. That is the last resort recovery media before a cold install.
2. Verify that both disk are configure to boot without quorum restrictions
# lifcp /dev/dsk/rdsk:AUTO -
# efi_cp -d /dev/rdsk/c#t#d#s1 -u /EFI/HPUX/AUTO /tmp/auto # cat /tmp/auto
3. Verify that you can boot the system from the alternate path. Reboot your server and boot from the alternate path. Booting to single user mode or to init 1 is enough to test that the system is bootable if all the logical volumes of /dev/vg00 are mirrored.
4. Disable one of the LVM physical volumes that contains the mirrors:
# pvchange -a n /dev/dsk/c#t#d#
If the OLR patches are not installed, reboot the system, remove from the Hotplug bay the disk you want to preserve and boot from the other disk is still on the system.
5. Perform all the system updates. All the changes are store on the disk kept on the system.
6. When you verify that all the updates are perform and the system is working as expected, insert and enable the other mirror:
If anything or everything goes wrong, just remove the failed updated disk, swap the drives and boot the system from the good spare drive. After that, follow this procedure to rebuild the mirror on the wrong drive.
Rebuild mirror on PA-RISC
Rebuild mirror on Integrity system
Why using lvmerge / lvsplit is not recommended?
Is very common to try using the lvsplit / lvmerge commands instead of the above procedure, but using this commands has important drawbacks, specially if you assume worst case scenarios: