Before shutdown the machine and physically replace the disk
1. Check for a successful make_recovery tape
2. Find the defective drive:
>ioscan -fnC disk
> lvlnboot –v vg00 ( capture the output to a file for comparison )
>vgdisplay -v
>ll /dev/dsk | grep “Minor #”
Note: in this particular case the defective drive is /dev/dsk/c1t2d0, root secondary pv
NOTE: If disk is showing no H/W or has a lot of stale extend, do not try dd or diskinfo on it, it may hang
3. Find the lvols on defective pv and make sure all are mirrored (ex: check free extent on both and compare).
>pvdisplay –v /dev/dsk/ c1t2d0
Note: in this particular case lvol1 to lvol9
4. Reduce the mirrors:
>lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c1t2d0 up to lvol9
5. Check the successful mirror reduction:
>lvdisplay -v /dev/vg00/lvol1 up to lvol9
6. Remove the physical volume from the volume group:
>vgreduce vg00 /dev/dsk/c1t2d0
7. Check with:
# vgdisplay -v vg00
Shutdown the machine and physically replace the disk
8. Replace the disk. (You can use dd if=/dev/rdsk/cXtYdZ of=/dev/null bs=1204k count=100 to identify disk if it is claimed or, if NOH/W, to isolate the disk by issuing this command on disk on the same path with an scid+1 or -1)
9. Check connectivity with disk and create device files:
>ioscan -fnC disk
10. Initialize the raw device as a boot disk:
>pvcreate -B /dev/rdsk/c1t2d0
11. Extend the volume group by adding the physical volume:
> vgextend /dev/vg00 /dev/dsk/c1t2d0
> mkboot -l /dev/rdsk/c1t2d0
> mkboot -a "hpux -lq" /dev/rdsk/c1t2d0
12. Mirror all logical volumes, which have been previously reduced:
>lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t2d0 up to lvol9
NOTE: make sure lvol1, lvol2 and lvol3 are FIRST mirrored in this exact sequence
13. Do:
> lvlnboot –Rv vg00
NOTE: check with lvlboot –v pay close attention to boot: lvol1, you can compare to previous lvlnboot –v if you kept an output
14. Check that you have successfully increased the number of mirror copies:
>lvdisplay -v /dev/vg00/lvol1 up to lvol9
15. Finally, check the status of the volume group:
# vgdisplay -v vg00 | more
If hard drive showing NO_HW then no need to split the mirror physically changes the disk and then:
vgcfgrestore -n /dev/vg00 /dev/rdsk/c1t2d0
vgchange -a y /dev/vg00
vgsync /dev/vg00
mkboot -l /dev/rdsk/c1t2d0
mkboot -a "hpux -lq" /dev/rdsk/c1t2d0
lvlnboot –Rv vg00
lvdisplay -v /dev/vg00/lvol1 up to lvol9
vgdisplay -v vg00 | more