

bad                          Command                          bad




Maintain list of bad blocks

bbaadd _o_p_t_i_o_n _f_i_l_e_s_y_s_t_e_m [ block ... ]

A hard  disk or floppy  disk may have  bad blocks on  it: a ``bad
block'' is a portion of disk that cannot be used reliably because
read or write errors occur  on them.  The COHERENT system keeps a
list of bad blocks so it can avoid using them.

The  command  bad  maintains the  bad-block  list  for the  given
filesystem, which  must be a block-special  file.  option must be
exactly one of  the characters acdl, which tell bad  to do one of
the following:


     aa   Add each given _b_l_o_c_k to the bad-block list
     cc   Clear the bad-block list
     dd   Delete each given _b_l_o_c_k from the bad-block list
     ll   List all blocks on the bad-block list


bad 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 -s option  immediately after bad  to correct the
problem, or run the command fsck.

filesystem should be unmounted if possible.  The user who invokes
bad must  have appropriate permissions for  the given filesystem.
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.

When  the  mkfs  command creates  a  file  system, the  prototype
specification may include a bad  block list for the new file sys-
tem.

***** See Also *****

badscan, commands, icheck, mkfs, umount

















COHERENT Lexicon                                           Page 1


