DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Adding hard disks

Scanning a disk for defects using badtrk

Use badtrk(ADM) to scan IDE, EIDE, UDMA, ESDI, and SCSI disks for defective tracks. It maps any flawed tracks to good ones elsewhere on the disk. It also creates a table of all the bad tracks on your hard disk.


NOTE: Do not run badtrk on IDA disks. IDA controllers handle bad tracks automatically.

When you first install a SCSI disk, badtrk creates a table of bad blocks in the partition. On SCSI disks, badtrk tries to use spare disk blocks that are maintained by the disk controller as replacements for bad blocks. If bad blocks cannot be mapped out in this way, the disk driver maps out bad blocks using the spare blocks and the bad block table in the disk partition. You can force it to use this table by specifying the -O option to badtrk. You can also enable Automatic Read/Write Remapping (ARR/AWR) for the entire SCSI disk if the disk controller supports this feature. Any defects that arise will be remapped without notifying you.

badtrk can:

When installing a new disk, you should perform a thorough destructive scan on the complete UNIX system partition. It may take several hours to scan a large hard disk.


WARNING: If you run badtrk(ADM) yourself, take care not to run a destructive scan on the wrong disk by mistake. For example, to specify the first partition of the third hard disk, you would enter:

/etc/badtrk -f /dev/rhd21 -s td

See hd(HW) for a description of hard disk naming conventions.


When using mkdev hd to install a hard disk, if badtrk finds a flaw in the first few tracks of the UNIX system partition, it returns you to fdisk. You can then repartition the disk to exclude the defective tracks from any partition. When you leave fdisk, badtrk runs again to allow you to scan the disk for further flaws. This process continues until badtrk finds no flaws in the first few tracks. You may have to experiment to determine how many tracks to exclude.

When you quit badtrk while first installing a disk, it prompts you for the number of tracks to reserve as replacements for flawed ones. Allocate at least as many tracks as badtrk recommends. This number is based on the current number of bad tracks plus an allowance for tracks that may go bad. If you ever exceed the number of allocated bad tracks, you must reinstall the hard disk.


WARNING: If you run badtrk on a disk which already contains filesystems, the data in these will be lost if you change the size of the bad block table. In such a case, remake the filesystems and restore the data from a backup archive.


Next topic: Dividing a disk partition into divisions using divvy
Previous topic: Partitioning a hard disk using fdisk

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003