COHERENT manpages
This page displays the COHERENT manpage for bad [Maintain list of bad blocks].
List of available manpages
Index
bad -- Command Maintain list of bad blocks bad [-acdl] device [ block ... ] A hard disk or floppy disk may have bad blocks on it: a ``bad block'' is a portion of disk that is flawed, and so cannot reliably be read or written. It is the unusual disk that is free of bad blocks. COHERENT keeps a list of bad blocks so it can avoid using them. The command bad maintains this bad-block list for the given device, which must be a block-special file. bad recognizes the following command-line options: a Add each given block to the bad-block list c Clear the bad-block list d Delete each given block from the bad-block list l List all blocks on the bad-block list Note that bad merely adds a block to the list of bad blocks, or removes a block from that list. It does not deallocate any i-node associated with a block when adding it to the bad-block list. You should run the command icheck with the option -s immediately after bad to correct the problem, or run the command fsck. After you modify the list of bad blocks, you must reboot your system to force the kernel to use this modified list. The file system on device should be unmounted if possible. You must have appropriate permissions for device before you can invoke bad. For many file systems, only the superuser may use bad to change the bad-block list. Use the command badscan to create a prototype file of bad blocks. When the command mkfs creates a file system, the prototype specification may include a list of bad blocks for the new file system. See Also badscan, commands, icheck, mkfs