 如何使用表面分析确定有缺陷的扇区
如何使用表面分析确定有缺陷的扇区成为超级用户或承担等效角色。
取消挂载包含有缺陷扇区的片中的文件系统。
| # umount /dev/dsk/device-name | 
有关更多信息,请参见 mount(1M)。
调用 format 实用程序。
| # format | 
选择受影响的磁盘。
| Specify disk (enter its number):1 selecting c0t2d0: [disk formatted] Warning: Current Disk has mounted partitions. | 
选择 analyze 菜单。
| format> analyze | 
通过在 analyze> 提示符下键入 setup 设置分析参数。
使用如下所示的参数:
| 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 | 
使用 read 命令查找缺陷。
| 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. |