

fsck                         Command                         fsck




Check and repair file systems interactively

/eettcc/ffsscckk [ -ffnnqqyy ] [ -tt _t_e_m_p_f_i_l_e ] [ _f_i_l_e_s_y_s_t_e_m ... ]

fsck checks  and interactively repairs  file systems.  If  all is
well, ffsscckk merely prints the  number of files used, the number of
blocks used, and the number of blocks that are free.  If the file
system is found to be inconsistent in one of the aspects outlined
below,  ffsscckk asks  whether it  should  fix the  inconsistency and
waits for you to reply yyeess or nnoo.

The following file  system aspects are checked for consistency by
fsck:

*  If  a block is claimed  by more than one  i-node, by an i-node
   and the free list, or more than once in the free list.

*  Whether  an i-node or  the free list claims  blocks beyond the
   file system's range.

*  Link counts that are incorrect.

*  Whether the directory size is not aligned for 16 bytes.

*  Whether the i-node format is correct.

*  Whether any blocks are not accounted for.

*  Whether a file points to an unallocated i-node.

*  Whether a file's i-node number is out of range.

*  Whether the super block refers to more than 65,536 i-nodes.

*  Whether  the super block  assigned more blocks  to the i-nodes
   than the system contains.

*  Whether the format of the free block list is correct.

*  Whether  the counts of the  total free blocks and  the free i-
   nodes are correct.

fsck prints  a warning message when  a file name is  null, has an
embedded slash  `/', is not null-padded, or if  `.' or `..' files
do not have the correct i-node numbers.

When ffsscckk repairs a file  system, any file that is orphaned (that
is, allocated  but not referenced) is deleted if  it is empty, or
copied to  a directory called lloosstt+ffoouunndd,  with its i-node number
as its name.  The directory  lloosstt+ffoouunndd must exist in the root of
the file  system being  checked before  ffsscckk is executed,  and it
must have room for  new entries without requiring that new blocks
be allocated.



COHERENT Lexicon                                           Page 1




fsck                         Command                         fsck



fsck accepts the following options:

-ff Fast check.  ffsscckk only checks whether a block has been claimed
   by more  than one i-node, by  an i-node and the  free list, or
   more  than once  in the  free list.   If necessary,  ffsscckk will
   reconstruct the free list.

-nn No  option: a default  reply of nnoo  is given to  all of ffsscckk's
   questions.

-qq Quiet option: run quietly.  ffsscckk automatically removes all un-
   referenced pipes,  and automatically fixes list  counts in the
   super block and the free list.  File-name warning messages are
   suppressed, but  ffsscckk still prints  the number of  files used,
   the  number of  blocks  used, and  the number  of blocks  that
   remain free.

-tt Specify temporary file option: ffsscckk uses RAM device /ddeevv/rrrraamm11
   for  temporary storage when  checking filesystems  larger than
   approximately 35  megabytes.  This  option allows the  user to
   specify temporary storage other than the RAM device.

-yy Yes option:  a default reply of yyeess is  given to all of ffsscckk's
   questions.

If you  do not name  a file system  in ffsscckk's command  line, ffsscckk
checks the file systems named in the file /eettcc/cchheecckklliisstt.

If fsck is invoked for a file system larger than approximately 35
megabytes,  it  uses  the  RAM  device /dev/rram1  for  temporary
storage.  For  this reason, it  is strongly advised  that you not
use /dev/rram1 as a RAM disk.

***** Files *****

/eettcc/cchheecckklliisstt

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

clri, commands, icheck, ncheck, ram, sync, umount

***** Notes *****

The  correction  of  file  systems  almost  always  involves  the
destruction of data.

You can run fsck only  when the COHERENT system is in single-user
mode.

Previous editions of fsck could check no partition larger than 35
megabytes.  This restriction has been lifted.






COHERENT Lexicon                                           Page 2


