Become superuser or assume an equivalent role.
Unmount the file system in the slice that contains the defective sector.
# umount /dev/dsk/device-name |
For more information, see mount(1M).
Invoke the format utility.
# format |
Select the affected disk.
Specify disk (enter its number):1 selecting c0t2d0: [disk formatted] Warning: Current Disk has mounted partitions. |
Select the analyze menu.
format> analyze |
Set up the analysis parameters by typing setup at the analyze> prompt.
Use the parameters shown here:
analyze> setup Analyze entire disk [yes]? n Enter starting block number [0, 0/0/0]: 12330 Enter ending block number [2052287, 2035/13/71]: 12360 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 |
Use the read command to find the defect.
analyze> read Ready to analyze (won't harm SunOS). This takes a long time, but is interruptible with Control-C. Continue? y pass 0 2035/12/1825/7/24 pass 1 Block 12354 (18/4/18), Corrected media error (hard data ecc) 25/7/24 ^C Total of 1 defective blocks repaired. |