Follow the steps listed below to mirror hard disk or volume groupMirroring
These steps can be used to mirror a bootable disk or a normal data disk
1) Give the "bdf" command to check the mounted file systems and their corresponding volume groups.
2) Note down the logical volume order by issuing the following command
"pvdisplay -v /dev/dsk/c0t0d0"
3) Check if mirroring software has been installed by issuing the following command
"swlist -l fileset | grep -i mir"
This should return something like
LVM.LVM-MIRROR-RUN
4) Note the harddisk which needs to be mirrored( e.g /dev/dsk/c0t5d0)
5) Identify whether the new mirrored hard disk should be bootable
6) If it needs to be bootable use the following commands
# pvcreate -B /dev/rdsk/c0t5d0
This command will create a physical volume on the raw disk.
# vgextend /dev/vg00 /dev/dsk/c0t5d0
This will extend the volume group vg00 from c0t6d0 to include c0t5d0 also, hence if one disk fails the volume group configured on the other disk can be used.
# mkboot -l /dev/rdsk/c0t5d0
This will make the hard disk c0t5d0 bootable in case of failure of the original disk.
# mkboot -a "hp-ux -lq /stand/vmunix" /dev/rdsk/c0t5d0
This command is used with the -lq option only when there are two disk in the root volume group.This will ensure that when one disk fails the other disk can be made to boot with the option that quorum can be turned off.
In case there is only one disc then use
# mkboot -a "hpux (;0) /stand/vmunix" /dev/rdsk/c0t5d0
Check the contents of the AUTO file with
# lifcp /dev/rdsk/c0t5d0:AUTO
Set the alternate boot path if required by
# setboot -a 8/0/19/0.5.0 (hardware address)
The hardware address can be found by "ioscan -fnC disk"
7) If the disk is non-bootable then use
# pvcreate /dev/rdsk/c0t5d0
# vgextend /dev/vg00 /dev/dsk/c0t5d0
8) Once the volume groups are created then the logical volumes can be mirrored accordingly. Ensure that the mirrored copies are used in the correct order as specified.
9) Mirror the boot logical volume, primary swap logical volume, root logical volume and other volumes as required to the mirror disk in the correct sequence.
#
lvextend -m(mirror) 1(no.of copies) /dev/vg00/lvol1 /dev/dsk/c0t5d0
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c0t5d0
and so on.
Update all the physical volumes in the volume group so that the logical volume becomes the boot, primary swap or dump volume when the system is next booted. Here one should note that dump does not get mirrored seperately as it is always a part of swap. This updation can be done by
This can be done only on 10.20 & 11.00 versions
#
lvlnboot -r(root) /dev/vg00/lvol3 /dev/vg00
# lvlnboot -b(boot) /dev/vg00/lvol1 /dev/vg00
# lvlnboot -s(swap) /dev/vg00/lvol2 /dev/vg00
# lvlnboot -d(dump) /dev/vg00/lvol2 /dev/vg00
For 10.01, 10.10 and updates to 10.20 follow steps below
#
lvlnboot -r(root) /dev/vg00/lvol1 /dev/vg00
# lvlnboot -s(swap) /dev/vg00/lvol2 /dev/vg00
# lvlnboot -d(dump) /dev/vg00/lvol2 /dev/vg00
Check the above with
# lvlnboot -v (This will then list both the disks c0t5d0 & c0t6d0 for root, boot and swap definitions)
To test the mirror configuration the system needs to be shut down and booted from the mirror configuration
# shutdown -ry 0
The system reboots and here while the system comes up interrupt the boot sequence and at the boot_admin display type
# bo alt
The system will prompt you whether you want to interact with IPL. Specify "N" and the system will boot from the mirror disk.