‘Repairing’ a disk under Solaris

If you are seeing errors about reading from a particular disk block on your system console, you can use the format utility to ‘repair’ the problem. In addition, you can use an analyze mode to detect (and repair) problems:

# format
Searching for disks…done

AVAILABLE DISK SELECTIONS: 0. c0t0d0 /pci@1f,4000/scsi@3/sd@0,0
Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted]
Warning: Current Disk has mounted partitions.

FORMAT MENU: disk – select a disk type – select (define) a disk type partition – select (define) a partition table current – describe the current disk format – format and analyze the disk repair – repair a defective sector label – write label to the disk analyze – surface analysis defect – defect list management backup – search for backup labels verify – read and display labels save – save new disk/partition definitions inquiry – show vendor, product and revision volname – set 8-character volume name ! – execute , then return quit
format> analyze

ANALYZE MENU: read – read only test (doesn’t harm SunOS) refresh – read then write (doesn’t harm data) test – pattern testing (doesn’t harm data) write – write then read (corrupts data) compare – write, read, compare (corrupts data) purge – write, read, write (corrupts data) verify – write entire disk, then verify (corrupts data) print – display data buffer setup – set analysis parameters config – show analysis parameters ! – execute , then return quit
analyze> read
Ready to analyze (won’t harm SunOS). This takes a long time,
but is interruptable with CTRL-C. Continue? y

pass 0 4884/26/70 pass 1 4884/26/70

Total of 0 defective blocks repaired.
analyze>

Tags:

Leave a Reply