HPUX 11iv3 has a feature called MirrorDisk that enable user to do software mirroring, basically is integrated with LVM. However you need to pay extra in order to use it. After installing this feature, follow steps below to mirror the disks (assume the new disk as c2t2d0):
- Create physical volume for new disk:
pvcreate -f -B /dev/rdsk/c2t2d0
- Add disk to current root volume group.
vgextend /dev/vg00 /dev/dsk/c2t2d0
- Make new disk bootable.
- Copy correct AUTO file into new LIF area.
mkboot -a "hpux -lq (;0)/vmunix" /dev/rdsk/c2t2d0
- Here is the part to mirror up the logical volume, boot (stand) logical volume need to be done first so that it occupies the first contiguous set of extends on the new disk. Normally logical volume 1 is for stand, 2 is for swap and 3 is for root.
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t2d0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t2d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t2d0
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t2d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c2t2d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c2t2d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c2t2d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t2d0
- Update the boot information contained in BDRA for the mirror copies of boot, root and primary swap.
lvlnboot -b /dev/vg00/lvol1
lvlnboot -v -r /dev/vg00/lvol3
lvlnboot -s /dev/vg00/lvol2
- Check if the BDRA is correct.
lvlnboot -R /dev/vg00
- Verify if the mirrors were properly created.
After finish all the steps, try to restart the server and boot from the new disk. If server is able to boot, it means the mirroring setup is success.