Repair Hard Disk Bad Sectors in Solaris

1. A disk can start creating trouble if sectors on it are bad. We can try to verify and repair the defective sectors. For example, the following message shows that the block 100 is defective:

WARNING: /io-unit@f,e0200000...
 Error for command 'read' Error Level: Retryable
 Requested Block 243, Error Block 100
 Sense Key: Media Error
 Vendor ...
 ASC = 0x11 (unrecovered read error) ...

2. We can try to take corrective action by performing a surface scan analysis. First we need to unmount all slices on the defective disk and then invoke the format utility. (Note: This example shows only s0 mounted on target 2.)

# umount /dev/dsk/c0t2d0s0
# format

3. When we are asked to select the disk, provide the number:

Specify disk (enter its number): 1
selecting c0t2d0:
[disk formatted]
Warning: Current Disk has mounted partitions.

4. Now we should invoke the analyze menu and provide the parameters as asked:

format> analyze
analyze> setup
Analyze entire disk [yes]? n
Enter starting block number [0, 0/0/0]: enter start block
Enter ending block number [2052287, 2035/13/71]: enter end block
Loop continuously [no]: y
Repair defective blocks [yes]: n
Stop after first error [no]: n
Use random bit patterns [no]: n
Enter number of blocks per transfer [126, 0/1/54]: 1
Verify media after formatting [yes]: y
Enable extended messages [no]: n
Restore defect list [yes]: y
Create defect label [yes]: y
analyze> read
Ready to analyze (won't harm SunOS). This takes a long time,
but is interruptible with Control-C. Continue? Y
 pass 0
 ...
 pass 1
 block 100, Corrected media error (hard data ecc)
 ...
 Total of 1 defective blocks repaired.

5. Now we have found the absolute block number of the defective block on the disk, and we will repair it.

analyze> q
format> repair
Enter absolute block number of defect: 100
Ready to repair defect, continue? y
Repairing block 100 ...ok.
format> q

Original Source:
http://www.sun.com/bigadmin/content/submitted/recover_sector_disk.jsp

You May Also Like

1 Comment

  1. Nice way describe you in this post but here is another way to resolved this bad sector problem, try Kernel for windows data recovery software. it scans the entire hard drive sector by sector to trace files that could be recovered and also repair bad sectors.

Leave a Reply?