分类: 系统运维
2012-06-25 22:38:24
Information
A boot disk may get damage even if it is mirror and then it has to be replaced.
In this document disk8 is used for the example.
Details
1. Check if the disk to be replaced.
# ioscan -fnkNC disk
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
disk 8 64000/0xfa00/0x2 esdisk NO_HW DEVICE HP 36.4GST336754LC
/dev/disk/disk8 /dev/disk/disk8_p2 /dev/rdisk/disk8 /dev/rdisk/disk8_p2
/dev/disk/disk8_p1 /dev/disk/disk8_p3 /dev/rdisk/disk8_p1 /dev/rdisk/disk8_p3
2. Detach the physical volume from the volume group.
# pvchange -a N /dev/disk/disk8_p2
3. Physically replace the disk..
4. Replacing and executing ioscan again would not report the disk as CLAIMED yet.
The AUTH_FAILED state can be seen using the scsimgr command. This is a security mechanism implemented on HP-UX 11.31 to avoid replacing the bad disk unless user explicitly authorizes it from the OS.
# scsimgr get_info -D /dev/rdisk/disk8
STATUS INFORMATION FOR LUN PATH : lunpath2
Generic Status Information
SCSI services internal state = UNOPEN
Open close state = AUTH_FAILED
5. Notify the mass storage subsystem that the disk has been replaced.
# scsimgr -f replace_wwid -D /dev/rdisk/disk8 dsf
NOTE: The key dsf at the end of the command.
6. Create a description file to create the EFI partitions.
# vi /tmp/idf
3
EFI 500MB
HPUX 100%
HPSP 400MB
7. Use idisk to setup the disk partitioning using the file created above.
# idisk -wf /tmp/idf /dev/rdisk/disk8
# insf -e -H 64000/0xfa00/0x2
8. Verify the state disk and efi partitions:
# ioscan -fnNH 64000/0xfa00/0xa2
9. Use mkboot to format and populate the newly created EFI partition:
# mkboot -e -l /dev/dsk/disk8
10. Change the AUTO file contents:
# vi /tmp/auto
boot vmunix -lq
# efi_cp -d /dev/rdisk/disk8_p1 /tmp/auto /efi/hpux/auto
11. Restore the LVM headers.
# vgcfgrestore -n vg00 /dev/rdisk/disk8_p2
12. Activate the disk:
# pvchange -a y /dev/rdisk/disk8_p2
13. Reactivate the volume group to attach the physical volumen.
# vgchange -a y vgXX
NOTE: In case that the volume group do not start to synchronize the logical volumes automatically, user can force synchronization with:
# vgsync vgXX
14. Use lvlnboot to ensure that the LVM logical volumes are prepared to boot.
# lvlnboot -R
# lvlnboot -v
15. Update /stand/bootconf to reflect the current boot disks.
# cat /stand/bootconf
l /dev/disk/disk8