Using the Bad Block Locator Utility to Detect
Media Errors
The
DCL command ANALYZE/MEDIA invokes the optional Bad Block Locator
utility (BAD), which analyzes block-addressable media and records
the location of blocks that cannot reliably store data.
Many newer devices automatically check for bad blocks;
therefore, BAD is more useful with older devices that do not check
for bad blocks.
To test the blocks on a volume, ANALYZE/MEDIA performs the
following tasks:
Writes a test pattern to each block
on the media
Reads the contents of the block into a buffer
Compares the data read back with the data written
If the data does not compare exactly, a block cannot reliably
store data.
When the Bad Block Locator utility locates a bad block, it
records the address of the block. Consecutive bad blocks are recorded
as single entries for non-last-track devices. After it finishes
testing the disk, BAD
writes the addresses of the bad blocks into a file called the detected
bad block file (DBBF).
Testing a volume for bad blocks destroys its contents.
However, you can update the detected bad block file (DBBF) without
erasing the contents of the volume by using the ANALYZE/MEDIA qualifiers
/NOEXERCISE and /BAD_BLOCKS.