Drucken

HP-UX Replace disk on root Volume Group (vg00)


This When Good Disks Go Bad(external link) is my reference document, from which i have made my own cook-book. This can save you someday.


In short terms, here is what to do if you have a bad diskdrive. You first need to locate the disk, by using stm, ioscan ... and also check the syslog for errors.
Often an error message in the system log file is your first indication of a disk problem. In /var/adm/syslog/syslog.log, you might see the following error:

SCSI: Request Timeout — lbolt: 329741615, dev: 1f022000


To map this error message to a specific disk, look under the /dev directory for a device file with a device number that matches the printed value. More specifically, search for a file whose minor number matches the lower six digits of the number following dev:. The device number in this example is 1f022000; its lower six digits are 022000, so search for that value using the following command:
ls -la /dev/*dsk | grep 022000
brw-r-----   1 bin        sys         31 0x022000 Sep 22  2002 c2t2d0
crw-r-----   1 bin        sys        188 0x022000 Sep 25  2002 c2t2d0

This gives you a device file to use for further investigation.
I’m using the below mentioned commands, to replace a disk in an LVM mirror.
pvchange -a N /dev/dsk/c2t15d0
* <replace the hot-swappable disk> *
vgcfgrestore –n vg00 /dev/rdsk/c2t15d0
pvchange -a y /dev/dsk/c2t15d0
vgchange –a y vg00

After doing this, your disk is starting to remirror. You also need to make your new disk bootable. There is a few things that you need to be aware of, so i urge you to read the attached PDF document.

For PA-RISC:
Use the mkboot command to set up the boot area:
mkboot /dev/rdsk/c2t15d0

Use the mkboot command to add an autoboot file to the disk boot area. If you expect to boot from this disk only when you lose quorum, you can use the alternate string hpux –lq to disable quorum checking:
mkboot –a “hpux” /dev/rdsk/c2t15d0

Verify that the mirrored disk is displayed as a boot disk and that the boot, root, and swap logical volumes appear to be on both disks:
lvlnboot –v

For Itanium:
Use the mkboot command to add an autoboot file to the disk boot area. If you expect to boot from this disk only when you lose quorum, you can use the alternate string hpux –lq to disable quorum checking:
mkboot –a “hpux” /dev/rdsk/c2t15d0

Update the root volume group information:
lvlnboot -R /dev/vg00

Specify the mirror disk as the alternate boot path in nonvolatile memory:
setboot –a 2/0/7.15.0