


ICHECK(8)             MAINTENANCE COMMANDS              ICHECK(8)



NAME
     icheck - file system storage consistency check

SYNOPSIS
     /usr/etc/icheck [ -s ] -b _n_u_m_b_e_r_s ] [ _f_i_l_e_s_y_s_t_e_m ]

DESCRIPTION
     Note: icheck has  been  superseded  for  normal  consistency
     checking by fsck(8).

     icheck examines a file system, builds  a  bit  map  of  used
     blocks,  and  compares  this  bit  map against the free list
     maintained on the file system.  The normal output of  icheck
     includes a report of

          The total number of files and the numbers  of  regular,
          directory, block special and character special files.

          The total number of blocks in use and  the  numbers  of
          single-, double-, and triple-indirect blocks and direc-
          tory blocks.

          The number of free blocks.

          The number of blocks missing; that is, not in any  file
          nor in the free list.

     With the -s option icheck ignores the actual free  list  and
     reconstructs  a  new  one by rewriting the superblock of the
     file system.  The file system  should  be  dismounted  while
     this  is  done;  if this is not possible (for example if the
     root file system has to be salvaged) care  should  be  taken
     that the system is quiescent and that it is rebooted immedi-
     ately afterwards so that the old, bad in-core  copy  of  the
     superblock  will  not continue to be used.  Notice also that
     the words in the superblock which indicate the size  of  the
     free list and of the i-list are believed.  If the superblock
     has been curdled these words will have to be  patched.   The
     -s option suppresses the normal output reports.

     Following the -b option is a list of block numbers; whenever
     any  of the named blocks turns up in a file, a diagnostic is
     produced.

     icheck is faster if the raw version of the special  file  is
     used, since it reads the i-list many blocks at a time.

SEE ALSO
     fs(5), clri(8), dcheck(8), fsck(8), ncheck(8)

DIAGNOSTICS
     For duplicate blocks and bad blocks (which lie  outside  the



Sun Release 4.1   Last change: 9 September 1987                 1






ICHECK(8)             MAINTENANCE COMMANDS              ICHECK(8)



     file  system) icheck announces the difficulty, the i-number,
     and the kind of block involved.  If a read error is  encoun-
     tered,  the  block  number  of  the bad block is printed and
     icheck considers it to contain 0.

     Bad freeblock
          means that a block number outside the  available  space
          was encountered in the free list.

     _n dups in free
          means that _n blocks were found in the free  list  which
          duplicate  blocks either in some file or in the earlier
          part of the free list.

BUGS
     Since icheck is inherently two-pass  in  nature,  extraneous
     diagnostics  may  be produced if applied to active file sys-
     tems.

     It believes even preposterous superblocks  and  consequently
     can get core images.

     The system should be fixed so that the reboot  after  fixing
     the root file system is not necessary.































Sun Release 4.1   Last change: 9 September 1987                 2



