		Using the formatdisk and reassignblock Utilities


Occasionally, SCSI disk drives fail in such a way that they become unusable because of bad sectors.  Such drives do not neccessarily need to be replaced. Two utilities are avaialable to repair drives with bad sectors.  One utility, called reassignblock, attempts to remap a known bad sector to a new location on the disk.  The other utility, called formatdisk, performs a surface-level format of the entire disk. 

formatdisk

When more than a few sectors have all gone bad on a particular disk, it is necessary to reformat the disk.  Reformatting involves "wiping the slate clean", so to speak, and re-writing each header on the disk.  This procedure is not to be taken lightly; all user data is, of course, lost during this procedure.  The formatdisk utility is a last resort before replacing the drive and returning the defective unit to NeXT (or the manufacturer of the drive) for repair.  To use the formatdisk utility, as superuser type

formatdisk raw_device

Where

raw_device is /dev/rsd0a, /dev/rsd1a, etc.

Notes on formatdisk

1. This program can take up to 20 or 30 minutes to run.

2. If this program is run on a machine with the old 53C90 SCSI chip, access to other SCSI devices will be impossible during the duration of the formatdisk command.

3. This command can NOT be performed on one's root device.  The program will detect this situation and immediately abort.

4. The drive being formatted should be UNMOUNTED before running formatdisk. 

5. A complete re-initialization of the volume will be necessary after successful execution of formatdisk.  This means running 'disk -i', newfs, or BuildDisk.


