Basis Step is to Scan the Disk and Then Install the Driver

Embed Size (px)

DESCRIPTION

basis step by step guide

Citation preview

Basis step is to scan the disk and then install the driver

Ioscan funC disk -- this will scan the device , class specified is disk in here.Insf a once the disk is scanned run this command to installed the driver for the new installed device.

1)In Root volume groupU have to add the disk and mirror it.Steps:#pvcreate -fB /dev/rdisk/diskXX#vgextend vg00 /dev/disk/diskX# mkboot /dev/rdisk/diskX# mkboot a hpux lq(;0)/stand/vmunix /dev/rdisk/diskX#lvextend m 1 /dev/vg00/lvol1 /dev/disk/diskX#lvextend m 1 /dev/vg00/lvol2 /dev/disk/diskX ..#lvextend m 1 /dev/vg00/lvol7 /dev/disk/diskX#lvextend m 1 /dev/vg00/lvol8/dev/disk/diskX#vgdisplay v vg00#lvdisplay v /dev/vg00/lvol1#lvlnboot R#setboot -a hardware_path of added disk

Verify the setbboot by#lvlnboot v

# setboot

2)For non root volume group#pvcreate -f /dev/rdisk/diskX#vgextend vg0X /dev/disk/diskX

Background Replacing a mirror disk under LVM is a critical procedure. MirrorDisk/UX is used to protect critical data volumes, like the boot devices of a HP-UX 11i or other high sensitive data. There exist two common scenarios where this operation is performed. 1. The mirror disk(s) is(are) inside the system or in an enclosure that cannot be extracted on a live system. If this is the case, you must shutdown the system, replace the failed disk and in case where are replacing a mirror boot disk, boot from the remaining disk. You can repair the mirror after booting the system. 2. The mirror disk(s) is(are) in a hot swappable bay or an external array, that allows the disk or lun to be removed live, but only if the system bus (scsi/fc/sas) is not sending I/O requests to the disk(s). To be sure to comply with this requirement, is necessary to disable the usage of the disk. To perform this task, you may use the OLR (Online Replacement) feature, disable the disk from the volume group, or completly disable the volume group. Completely disabling volume group vg00 is not an option since this volume group contains several critical filesystems (/, /var, /usr). Using Hot-Swappable Disks The hot-swap feature provides the ability to remove or add an inactive hard disk drive module to a system while electrical power is on the system and the SCSI bus is still active (but not sending I/O requests to the disk that need to be exchanged). In other words, you can replace or remove a hot-swappable disk from a system without turning off the power of the entire system or/and the external enclosure. Consult your system hardware manuals for information about which disk in your system are hot-swappable. Specifications for other hard disks are available in their installation manuals at http://docs.hp.com. Disable I/O requests to the physical volume Using "vgchange" command Sometimes, even if the OLR feature is not enable on the system, is still possible to disable the I/O requests to the disk that need to be exchanged, allowing you to exchange the drive. You may also found situations when the failed disk has been hot replaced, without causing the system to hang, but leaving the volume group in a state where the vgcfgrestore command cannot be performed because the kernel still believes is an active part of the volume group. Turning off the system and booting without quorum restrictions correct this situation, but require a maintenance window that may be unpractical. The basic concept is to make the kernel aware that the physical volume that forms part of the volume group conglomerate has failed. If the disk is completely down (HARDWARE UNCLAIMED, diskinfo cannot query the disk or the PVRA/VGRA is damage), you can try to re enable the active volume group allowing the kernel to realize that the disk is not longer available. # vgchange a y q n /dev/vgXX.The command will query the physical volumes and report those physical volumes that cannot be reattached to the volume group. That left the physical volume in a state were it can be hot replaced or vgcfgrestored. After that, you follow the normal restore procedure. If the vgcfgrestore n /dev/vgXX /dev/rdsk/c#t#d# give an error message informing that the disk is still enable on the volume group, you will need to reboot the system, replace the disk and boot with the quorum restriction disable. Reducing the logical volume mirrors Is has been a common practice, before the appearance of the OLR feature in 11i v1, to reduce the logical volumes from the failed disk and reduce the physical volume from the volume group to assure that no I/O requests are going to the failed disk. This procedure has several drawbacks: 1. The disk should be accessible and the PVRA/VGRA should be working. 2. This approach usually produces more harm than benefits. Its not uncommon that the system hangs during these tasks. 3. The procedure is prune to errors. You need to lvreduce the logical volume(s) mirror(s), vgreduce the logical volume group, replace the physical volume, pvcreate the physical volume, vgextend the volume group and lvextend the logical volume(s) mirror(s). That is particulary complex on Integrity systems when disk should be partitioned with the idisk command. The best practice is to preserve the system logical volume mirror structure and try any of the procedures describe on this document. Never reduce the logical mirrors or remove the disk from the volume group if the OLR feature is available or if the disk report heavy damages with diskinfo or ioscan commands. Be aware, nonetheless, that on HP-UX 11.0 and below, this is the only way to disable I/O requests to the disks. Be aware than trying this method may hang up the system, and you will have to boot into single user mode / maintenance mode without quorum restriction disable to recover back the system to a proper state. SAS Controllers (Serial Attach SCSI) Serial Attach SCSI controllers adds another layer of complexity to LVM mirror disk replacement. Every SAS attached disk create a new disk instance on the system. To acomplish the disk replacement, is necesary to "redirect" the the hardware path to the old disk instance. Legacy Device Special Files 1. Determinate the current state of the legacy special device special files an the status of the SAS controller. # ioscan -fnC diskClass I H/W Path Driver S/W State H/W Type Description===============================================================================disk 3 0/4/1/0.0.0.0.0 sdisk NO_HW DEVICE HP DG072A9BB7 /dev/dsk/c0t0d0 /dev/rdsk/c0t0d0disk 2 0/4/1/0.0.0.1.0 sdisk CLAIMED DEVICE HP DG072A9BB7 /dev/dsk/c0t1d0 /dev/rdsk/c0t1d0disk 6 0/4/1/0.0.0.2.0 sdisk CLAIMED DEVICE HP DG072A9BB7 /dev/dsk/c0t2d0 /dev/rdsk/c0t2d0disk 8 0/4/1/0.0.0.3.0 sdisk CLAIMED DEVICE HP DG072A9BB7 /dev/dsk/c0t3d0 /dev/rdsk/c0t3d0disk 10 0/4/1/0.0.0.4.0 sdisk CLAIMED DEVICE HP DG072A9BB7 /dev/dsk/c0t4d0 /dev/rdsk/c0t4d0

# sasmgr get_info -D /dev/sasd0 -q lun=all -q lun_locate/dev/rdsk/c0t1d0 0/4/1/0.0.0.1.0 1 8 OFF /dev/rdsk/c0t2d0 0/4/1/0.0.0.2.0 1 4 OFF /dev/rdsk/c0t3d0 0/4/1/0.0.0.3.0 1 3 OFF /dev/rdsk/c0t4d0 0/4/1/0.0.0.4.0 1 7 OFFThe 0/4/1/0.0.0.0.0 hardware path correspond to the failed drive. The new dsf /dev/rdsk/c0t4d0 has been created after installing the new drive. 2. Redirect the new dsf to the original dsf, so the SAS controller identified the new disk with the previous address. # sasmgr replace_tgt -D /dev/sasd0 -q old_dev=/dev/dsk/c0t0d0 -q new_tgt_hwpath=0/4/1/0.0.0.4.0Persistent Device Special files (HP-UX 11.31) The approach is similar that with legacy device special files on HP-UX 11.23 / 11.31. The may difference is that the usage of persistent device special files (Agile View) needs that you use the "io_redirect_dsf" command instead of "sasmgr". The example uses an Integrity system that also display the dsf for the different EFI partitions. 1. Determinate the current state of the legacy special device special files an the status of the SAS controller. # ioscan -N -fnC diskClass I H/W Path Driver S/W State H/W Type Description===========================================================================disk 3 64000/0xfa00/0x1 esdisk CLAIMED DEVICE HP DG072A9BB7 /dev/disk/disk3 /dev/disk/disk3_p2 /dev/rdisk/disk3 /dev/rdisk/disk3_p2 /dev/disk/disk3_p1 /dev/disk/disk3_p3 /dev/rdisk/disk3_p1 /dev/rdisk/disk3_p3disk 4 64000/0xfa00/0x2 esdisk NO_HW DEVICE HP DG072A9BB7 /dev/disk/disk4 /dev/disk/disk4_p2 /dev/rdisk/disk4 /dev/rdisk/disk4_p2 /dev/disk/disk4_p1 /dev/disk/disk4_p3 /dev/rdisk/disk4_p1 /dev/rdisk/disk4_p3disk 5 64000/0xfa00/0x3 esdisk CLAIMED DEVICE HP DG072A9BB7 /dev/disk/disk5 dev/rdisk/disk5disk 7 64000/0xfa00/0x8 esdisk CLAIMED DEVICE HP DG072A9BB7 /dev/disk/disk7 /dev/rdisk/disk7disk 9 64000/0xfa00/0x9 esdisk CLAIMED DEVICE HP DG072A9BB7 /dev/disk/disk9 /dev/rdisk/disk9disk 11 64000/0xfa00/0xa esdisk CLAIMED DEVICE HP DG072A9BB7 /dev/disk/disk11 /dev/rdisk/disk112. Redirect the new dsf (/dev/disk/disk5) to the previous dsf allowing the SAS to replace one disk with the other. # io_redirect_dsf -d /dev/disk/disk4 -n /dev/disk/disk5Replacement procedures HP 9000 (PA-RISC) - Required reboot 1. Shutdown the system. # shutdown hy 02. Replace the damaged disk. Is the damage disk one of the boot disk mirrors? No, jump to step 6. 3. Boot up the system again. 4. Interrupt the PDC boot sequence. [Escape]5. Boot from the good mirror disk, with quorum disabled. SEA IPLChoose the boot disk:P#Interact with IPL? yesISL> hpux lq6. Rescan the hardware and create the new device special files: # ioscan C disk# insf C disk7. Restore the LVM reserved areas (PVRA/VGRA): # vgcfgrestore n vgXX /dev/rdsk/cXtXdXIs the damage disk one of the boot disk mirrors? No, jump to step 10. 8. Repopulate the LIF area: # mkboot /dev/rdsk/cXtXdX9. Change the AUTO file contents choosing the best police for the boot path: A) Primary boot disk. # mkboot a hpux /dev/rdsk/cXtXdXB) Alternate boot disk. # mkboot a hpux lq /dev/rdsk/cXtXdX10. Reactivate the volume group to attach the physical volumen. # vgchange a y vgXX Note: In case that the volume group dont start to synchronize the logical volumes automatically, you can force synchronization with: # vgsync vgXX11. Use lvlnboot to ensure that the LVM logical volumes are prepared to be root, primary swap or dump volume. # lvlnboot -R# lvlnboot -vHP 9000 (PA-RISC) - Online Hot Plug 1. Detach the physical volume from volume group: # pvchange -a n /dev/dsk/cXtXdX2. Hot swap the disk. 3. Restore the LVM reserved areas (PVRA/VGRA): # vgcfgrestore n vgXX /dev/rdsk/cXtXdXIs a bootable disk? No, jump to step 6. 4. Repopulate the LIF area: # mkboot /dev/rdsk/cXtXdX5. Change the AUTO file contents to the proper mode: A) Primary boot disk. # mkboot a hpux /dev/rdsk/cXtXdXB) Alternate boot disk. # mkboot a hpux lq /dev/rdsk/cXtXdX6. Reattach the new disk: # pvchange -a y /dev/dsk/cXtXdX7. Reactivate the volume group to attach the physical volumen. # vgchange a y vgXXNote: In case that the volume group dont start to synchronize the logical volumes automatically, you can force synchronization with: # vgsync vgXX8. Use lvlnboot to ensure that the LVM logical volumes are prepared to be root, primary swap or dump volume. # lvlnboot -R# lvlnboot -vHP 9000 (PA-RISC) 11.31 - Persistent DSF 1. Save hardware paths information of the disk (printout or file). It's very important to save this information, since some of these details won't be available after the scsimgr command. # ioscan -fnkNC diskClass 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/rdisk/disk8

# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description=======================================================================disk 8 64000/0xfa00/0x2 esdisk NO_HW DEVICE offline HP 36.4GST336754LC 0/1/1/0.0xa.0x0 /dev/disk/disk8 /dev/rdisk/disk8

# ioscan -fnkNC lunpathClass I H/W Path Driver S/W State H/W Type Description==================================================================lunpath 2 0/1/1/0.0xa.0x0 eslpt NO_HW LUN_PATH LUN path for disk8Note: If the server is rebooted to execute the change, only the new LUN instance will be displayed. The old LUN will disappear from the ioscan output. Keep the output of these commands in a secure place. 2. Detach the physical volume from the volume group. # pvchange -a N /dev/disk/disk83. Physically replace the disk. 4. Replacing and executing ioscan again won't report the disk as CLAIMED yet. Checking the lunpath(s) you should be able to see the AUTH_FAILED state. This is a security mechanism implemented on HP-UX 11.31 to avoid replacing the bad disk unless you explicitly authorize it from the OS. # scsimgr get_info -C lunpath -I 2

STATUS INFORMATION FOR LUN PATH: lunpath2

Generic Status Information

SCSI services internal state = UNOPENOpen close state = AUTH_FAILED5. Notify the mass storage subsystem that the disk has been replaced (Authorize the replacement). Make sure you have created the logs specified in step #1, the lunpath HW path can't be read from the original disk after this command. # scsimgr -f replace_wwid -D /dev/rdisk/disk8scsimgr: Successfully validated binding of LUN paths with new LUN.Note: This command allows the storage subsystem to replace the old disk's LUN World-Wide-Identifier (WWID) with the new disk's LUN WWID. The storage subsystem will create a new LUN instance and new device special files for the new disk. This command is not required if you reboot the server because no lunpath will be assign to the old /dev/rdisk/disk8, because the system automatically authorizes the replacement after the reboot. 6. Determine the new persistent device special file (agile view) of the disk. The lunpath HW path(0/1/1/0.0xa.0x0) was originally assigned to disk8, it is now temporary assigned to disk3 in this example. Using the lunpath HW path you ensure that disk3 is the correct new disk that replaces disk8. # ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description=======================================================================disk 8 64000/0xfa00/0x2 esdisk NO_HW DEVICE offline HP 36.4GST336754LC /dev/disk/disk8 /dev/rdisk/disk8disk 3 64000/0xfa00/0x3 esdisk CLAIMED DEVICE online HP 36.4GST336753LC 0/1/1/0.0xa.0x0 /dev/disk/disk3 /dev/rdisk/disk37. Assign the old instance number to the replacement disk. This commands restores disk8 as the valid device file to acces the new disk and removes disk3 device files. # io_redirect_dsf -d /dev/disk/disk8 -n /dev/disk/disk3

# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description======================================================================disk 8 64000/0xfa00/0x3 esdisk CLAIMED DEVICE online HP 36.4GST336753LC 0/1/1/0.0xa.0x0 /dev/disk/disk8 /dev/rdisk/disk8

# ioscan -fnkNC diskClass I H/W Path Driver S/W State H/W Type Description===================================================================disk 8 64000/0xfa00/0x3 esdisk CLAIMED DEVICE HP 36.4GST336753LC /dev/disk/disk8 /dev/rdisk/disk88. Repopulate the LIF area: # mkboot /dev/disk/disk89. Change the AUTO file contents to the proper mode: A) Primary boot disk. # mkboot a hpux /dev/disk/disk8B) Alternate boot disk. # mkboot a hpux lq /dev/disk/disk810. Reattach the new disk: # pvchange -a y /dev/disk/disk811. Use lvlnboot to ensure that the LVM logical volumes are prepared to be root, primary swap or dump volume. # lvlnboot -R# lvlnboot -v12. Reactivate the volume group to attach the physical volumen. # vgchange a y vgXXNote: In case that the volume group dont start to synchronize the logical volumes automatically, you can force synchronization with: # vgsync vgXX13. Use lvlnboot to ensure that the LVM logical volumes are prepared to be root, primary swap or dump volume. # lvlnboot -R# lvlnboot -v14. Update /stand/bootconf to reflect your current boot disks. The format is "l" for "larry" followed by an space and the disk name, for example: # cat /stand/bootconfl /dev/disk/disk8Integrity (Itanium) - Required reboot 1. Initiate the boot sequence: # shutdown ry 02. Replace the damaged disk. The damage disk is one of the boot disk mirrors? No, jump to step 11. 3. Interrupt the EFI boot manager autoboot. EFI Boot Manager ver 1.10 (14.60] Firmware ver 1.61 [4241][Escape]4. Select the proper mirror. Can be primary or alternate. Depend of which disk you have replaced. your mirrored disk from the boot manager selection menu. EFI Boot Manager ver 1.10 (14.60] Firmware ver 1.61 [4241]Please select a boot option HP-UX Primary Boot HP-UX Alternate Boot EFI Shell [Built-in]5. Verify which disk/kernel you booted from # grep Boot devices HP-UX path /var/adm/syslog.log vmunix: Boot devices HP-UX HW path is: 0.0.0.0.1.06. In the HP-UX system prompt, recreate the device files for EFI and OS partitions on the new disk: # mksf H 0/1/1/0.1.0 s 1# mksf H 0/1/1/0.1.0 s 2# mksf H 0/1/1/0.1.0 s 3# mksf H 0/1/1/0.1.0 -r s 1# mksf H 0/1/1/0.1.0 -r s 2# mksf H 0/1/1/0.1.0 -r s 37. Create the EFI and OS partititions using an IPF partition description file. # cat >> /tmp/idf > /tmp/auto > /tmp/auto > /tmp/idf > /tmp/auto > /tmp/auto > /tmp/idf > /tmp/auto > /tmp/auto