Search This Blog

Friday, May 30, 2014

IF ONE ROOT DISK GO BAD (FAULTY) --Hp-UX

IF ONE ROOT DISK GO BAD (FAULTY)

1.     Recognizing a Failing Disk

I/O Errors in the System Log
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(022000). search for a file whose minor number matches the lower six digits of the number following dev  

#  ll /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
NOTE :- This gives you a device file(specific disk) to use for further investigation.

Confirming Disk Failure

Three-step approach to confirm that a disk has failed or is failing:
STEP 1 : Checking ioscan output
       Use the ioscan command to check the S/W state of the disk. Only disks in state    CLAIMED are currently accessible by the system. Disks in other states such as NO_HW or disks that are completely missing from the ioscan output are suspicious. If the disk is marked as CLAIMED, then its controller is responding. For example:
# ioscan –fC disk  or # ioscan –fnC disk
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
disk 0 8/4.5.0 sdisk CLAIMED DEVICE SEAGATE ST34572WC
disk 1 8/4.8.0 sdisk UNCLAIMED UNKNOWN SEAGATE ST34572WC
disk 2 8/16/5.2.0 sdisk CLAIMED DEVICE TOSHIBA CD-ROM XM-5401TA
In this example the disk at hardware path 8/4.8.0 is not accessible.
If the disk has multiple hardware paths, be sure to check all the paths.
STEP 2 :   Checking disk status in diskinfo
       If the disk responds to the ioscan command, test it with the diskinfo command. The reported size must be nonzero, otherwise the device is not ready. For example:
# diskinfo /dev/rdsk/c0t5d0
SCSI describe of /dev/rdsk/c0t5d0:
vendor: SEAGATE
product id: ST34572WC

type: direct access

size: 0 Kbytes
bytes per sector: 512
In this example the size is 0, so the disk is malfunctioning.


STEP 3:    Testing the disk “dd” command
        If both ioscan and diskinfo succeed, the disk might still be failing. As a final test, try to read from the disk using the dd command. Depending on the size of the disk, a comprehensive read can be time-consuming, so you might want to read only a portion of the disk. If the disk is functioning properly, no I/O errors are reported.

For example, the following shows a successful read of the first 64 megabytes of the disk:

# dd if=/dev/rdsk/c0t5d0 of=/dev/null bs=1024k count=64

64+0 records in
64+0 records out

The following shows an unsuccessful read of the whole disk:


# dd if=/dev/rdsk/c1t3d0 of=/dev/null bs=1024k

dd read error: I/O error
0+0 records in 0+0 records out
 2.          REPLACING FAULTY DISK


# pvchange –a N

Stop the LVM to access secondary disk and remove it.
For example (output):

# pvchange -a N /dev/dsk/c14t0d0s2

Warning: Detaching a physical volume reduces the availability of data
within the logical volumes residing on that disk.
Prior to detaching a physical volume or the last available path to it,
verify that there are alternate copies of the data
available on other disks in the volume group.
If necessary, use pvchange(1M) to reverse this operation.
Physical volume "/dev/dsk/c14t0d0s2" has been successfully changed.

Check vg status--- (disk should show unavailable)

#vgdisplay –v

--- Physical volumes ---
   PV Name                /dev/dsk/c6t0d0s2
   PV Status              available                
   Total PE               4346   
   Free PE                1901   
   Autoswitch             On       
   Proactive Polling      On              

   PV Name                /dev/dsk/c14t0d0s2

   PV Status            unavailable   Search for this information in output.

   Total PE               4346   
   Free PE                1901   
   Autoswitch             On       
   Proactive Polling      On


Then remove the secondary disk and insert the new disk.


Use vi to create a partition description file by doing the following:

# vi /tmp/partitionfile

The 4 line entry for 11.23 and 11.31 should look like this:

3
EFI 500MB
HPUX 100%
HPSP 400MB

Use idisk to setup the disk partitioning using the file created above:

# idisk -wf /tmp/partitionfile /dev/rdsk/cXtXdX   è New devicefile


NOTE: There will be a prompt with a message saying the operation may be destructive and asks to continue. Be sure to answer 'yes' for the operation to be successful. If the prompt is answered with 'y' only, an error is received along with a message saying "user aborting".

 

For example (output):

# idisk /dev/rdsk/c14t0d0

idisk version: 1.32
idisk: Primary partition information not valid.
Run idisk with -r option to restore.
# idisk -wf /tmp/partitionfile /dev/rdsk/c14t0d0
idisk version: 1.32
********************** WARNING ***********************
If you continue you may destroy all data on this disk.
Do you wish to continue(yes/no)? yes

EFI Primary Header:
        Signature                 = EFI PART
        Revision                  = 0x10000
        HeaderSize                = 0x5c
        HeaderCRC32               = 0xdcef25a5
        MyLbaLo                   = 0x1
        MyLbaHi                   = 0x0
        AlternateLbaLo            = 0x1117732f
        AlternateLbaHi            = 0x0
        FirstUsableLbaLo          = 0x22
        FirstUsableLbaHi          = 0x0
        LastUsableLbaLo           = 0x1117730c
        LastUsableLbaHi           = 0x0
        Disk GUID                 = f1c3328e-4381-11e1-8001-d6217b60e588
        PartitionEntryLbaLo       = 0x2
        PartitionEntryLbaHi       = 0x0
        NumberOfPartitionEntries  = 0xc
        SizeOfPartitionEntry      = 0x80
        PartitionEntryArrayCRC32  = 0x658ec26d
Use insf to create the new device dfiles (cXtXdXs1, cXtXdX2 and cXtXdXs3)

# insf -e

Use mkboot to format and populate the newly created EFI partition:


# mkboot -e -l /dev/dsk/cXtXdX


Only when we are installing/changing disk in npar.


# mkboot -a "boot vmunix" /dev/rdsk/c2t0d0             only for npar systems


Only when we are installing/changing disk in vpar.
Change the auto file for the mirror to boot vpmon and verify the AUTO file:


# mkboot -a "boot vpmon -a" /dev/rdisk/ cXtXdX         only for vpar systems

Use standard LVM commands to restore the mirror information. Be careful to specify the s2 device file (cXtXdXs2) when performing LVM command.

# pvchange -a n /dev/dsk/cXtXdXs2


# vgcfgrestore -n vg00 /dev/rdsk/cXtXdXs2.

For example (output):

# vgcfgrestore -n vg00 /dev/rdsk/c14t0d0s2
Volume Group configuration has been restored to /dev/rdsk/c14t0d0s2


# pvchange -a y /dev/dsk/cXtXdXs2

For example (output):

# pvchange -a y /dev/dsk/c14t0d0s2
Physical volume "/dev/dsk/c14t0d0s2" has been successfully changed.


# vgchange -a y vg00

For example (output):


# vgchange -a y vg00
Volume group "vg00" has been successfully changed.
# vgsync vg00

# lvlnboot -r /dev/vg00/lvol3 /dev/vg00

# lvlnboot -b /dev/vg00/lvol1 /dev/vg00

# lvlnboot -s /dev/vg00/lvol2 /dev/vg00

# lvlnboot -d /dev/vg00/lvol2 /dev/vg00

# lvlnboot -v (to verify the results)

# vgdisplay -v/dev/vgxx (to verify the results)

Update and verify the EFI maps for each vPar:


#vparefiutil -u  
                           
Only for vpar
#vparefiutil


No comments:

Post a Comment