








       FFsscckk__ffffss -- TThhee UUNNIIXX FFiillee SSyysstteemm CChheecckk PPrrooggrraamm


                   _M_a_r_s_h_a_l_l _K_i_r_k _M_c_K_u_s_i_c_k
              Computer Systems Research Group
                 Computer Science Division
 Department of Electrical Engineering and Computer Science
             University of California, Berkeley
                    Berkeley, CA  94720

                       _T_. _J_. _K_o_w_a_l_s_k_i
                     Bell Laboratories
               Murray Hill, New Jersey 07974


                          _A_B_S_T_R_A_C_T

          This document reflects the  use  of  _f_s_c_k___f_f_s
     with  the  4.2BSD and 4.3BSD file system organiza-
     tion.  This is a revision of  the  original  paper
     written by T. J. Kowalski.

          File  System  Check  Program (_f_s_c_k___f_f_s) is an
     interactive file system check and repair  program.
     _F_s_c_k___f_f_s uses the redundant structural information
     in the UNIX file system to perform several consis-
     tency checks.  If an inconsistency is detected, it
     is reported to the operator, who may elect to  fix
     or  ignore each inconsistency.  These inconsisten-
     cies result from the permanent interruption of the
     file  system  updates,  which  are performed every
     time a file is modified.  Unless there has been  a
     hardware  failure, _f_s_c_k___f_f_s is able to repair cor-
     rupted file systems using  procedures  based  upon
     the  order  in which UNIX honors these file system
     update requests.

          The purpose of this document is  to  describe
     the normal updating of the file system, to discuss
     the possible causes of file system corruption, and
     to  present  the corrective actions implemented by
     _f_s_c_k___f_f_s_.  Both the program  and  the  interaction
     between   the   program   and   the  operator  are
-----------
UNIX is a trademark of Bell Laboratories.
This  work was done under grants from the National
Science Foundation under  grant  MCS80-05144,  and
the Defense Advance Research Projects Agency (DoD)
under Arpa Order No. 4031 monitored by Naval Elec-
tronic   System   Command   under   Contract   No.
N00039-82-C-0235.









SMM:3-2                   The UNIX File System Check Program


     described.



     Revised July 16, 1985


























































The UNIX File System Check Program                   SMM:3-3


                     TTAABBLLEE OOFF CCOONNTTEENNTTSS


11..  IInnttrroodduuccttiioonn

22..  OOvveerrvviieeww ooff tthhee ffiillee ssyysstteemm
2.1.    Superblock
2.2.    Summary Information
2.3.    Cylinder groups
2.4.    Fragments
2.5.    Updates to the file system

33..  FFiixxiinngg ccoorrrruupptteedd ffiillee ssyysstteemmss
3.1.    Detecting and correcting corruption
3.2.    Super block checking
3.3.    Free block checking
3.4.    Checking the inode state
3.5.    Inode links
3.6.    Inode data size
3.7.    Checking the data associated with an inode
3.8.    File system connectivity

AAcckknnoowwlleeddggeemmeennttss

RReeffeerreenncceess

44..  AAppppeennddiixx AA
4.1.     Conventions
4.2.     Initialization
4.3.     Phase 1 - Check Blocks and Sizes
4.4.     Phase 1b - Rescan for more Dups
4.5.     Phase 2 - Check Pathnames
4.6.     Phase 3 - Check Connectivity
4.7.     Phase 4 - Check Reference Counts
4.8.     Phase 5 - Check Cyl groups
4.9.     Cleanup



























SMM:3-4                   The UNIX File System Check Program


11..  IInnttrroodduuccttiioonn

     This document reflects the use  of  _f_s_c_k___f_f_s  with  the
4.2BSD and 4.3BSD file system organization.  This is a revi-
sion of the original paper written by T. J. Kowalski.

     When a UNIX operating system is brought up,  a  consis-
tency  check of the file systems should always be performed.
This precautionary measure helps to insure a reliable  envi-
ronment  for  file  storage on disk.  If an inconsistency is
discovered, corrective action must be taken.  _F_s_c_k___f_f_s  runs
in  two  modes.  Normally it is run non-interactively by the
system after a normal boot.  When running in this  mode,  it
will  only make changes to the file system that are known to
always be correct.  If an unexpected inconsistency is  found
_f_s_c_k___f_f_s  will exit with a non-zero exit status, leaving the
system running single-user.   Typically  the  operator  then
runs  _f_s_c_k___f_f_s  interactively.   When  running in this mode,
each problem is listed followed by  a  suggested  corrective
action.   The  operator  must decide whether or not the sug-
gested correction should be made.

     The purpose of this memo is to dispel the mystique sur-
rounding  file  system  inconsistencies.  It first describes
the updating of the file system (the calm before the  storm)
and  then  describes  file  system  corruption  (the storm).
Finally, the set of deterministic corrective actions used by
_f_s_c_k___f_f_s (the Coast Guard to the rescue) is presented.

22..  OOvveerrvviieeww ooff tthhee ffiillee ssyysstteemm

     The file system is discussed in detail in [Mckusick84];
this section gives a brief overview.

22..11..  SSuuppeerrbblloocckk

     A file system is described  by  its  _s_u_p_e_r_-_b_l_o_c_k.   The
super-block  is  built  when  the  file  system  is  created
(_n_e_w_f_s(8)) and never changes.  The super-block contains  the
basic  parameters  of the file system, such as the number of
data blocks it contains and a count of the maximum number of
files.   Because  the  super-block  contains  critical data,
_n_e_w_f_s replicates it to protect  against  catastrophic  loss.
The  _d_e_f_a_u_l_t  _s_u_p_e_r  _b_l_o_c_k  always resides at a fixed offset
from the beginning of the file system's disk partition.  The
_r_e_d_u_n_d_a_n_t  _s_u_p_e_r  _b_l_o_c_k_s  are  not  referenced unless a head
crash or other hard disk error  causes  the  default  super-
block  to  be  unusable.  The redundant blocks are sprinkled
throughout the disk partition.

     Within the file system are files.   Certain  files  are
distinguished  as  directories  and  contain  collections of
pointers to files that may themselves be directories.  Every
file  has  a  descriptor associated with it called an _i_n_o_d_e.









The UNIX File System Check Program                   SMM:3-5


The inode contains information describing ownership  of  the
file,  time  stamps indicating modification and access times
for the file, and an array of indices pointing to  the  data
blocks  for  the  file.  In this section, we assume that the
first 12 blocks of the file are directly referenced by  val-
ues stored in the inode structure itself.  The inode  struc-
ture may also contain references to indirect blocks contain-
ing further data block indices.  In a  file  system  with  a
4096  byte block size, a singly indirect block contains 1024
further block addresses, a doubly  indirect  block  contains
1024  addresses  of  further  single  indirect blocks, and a
triply indirect block contains  1024  addresses  of  further
doubly  indirect  blocks (the triple indirect block is never
needed in practice).

     In order to create files with up to  232  bytes,  using
only  two  levels of indirection, the minimum size of a file
system block is 4096 bytes.  The size of file system  blocks
can  be any power of two greater than or equal to 4096.  The
block size of the file system is maintained  in  the  super-
block, so it is possible for file systems of different block
sizes to be accessible simultaneously on  the  same  system.
The  block  size must be decided when _n_e_w_f_s creates the file
system; the block size cannot be subsequently changed  with-
out rebuilding the file system.

22..22..  SSuummmmaarryy iinnffoorrmmaattiioonn

     Associated  with the super block is non replicated _s_u_m_-
_m_a_r_y _i_n_f_o_r_m_a_t_i_o_n.  The summary information  changes  as  the
file  system  is modified.  The summary information contains
the number of blocks, fragments, inodes and  directories  in
the file system.

22..33..  CCyylliinnddeerr ggrroouuppss

     The  file  system  partitions the disk into one or more
areas called _c_y_l_i_n_d_e_r _g_r_o_u_p_s.  A cylinder group is comprised
of one or more consecutive cylinders on a disk.  Each cylin-
der group includes  inode  slots  for  files,  a  _b_l_o_c_k  _m_a_p
describing  available blocks in the cylinder group, and sum-
mary information describing the usage of data blocks  within
the  cylinder  group.  A fixed number of inodes is allocated
for each cylinder group when the  file  system  is  created.
The  current  policy  is to allocate one inode for each 2048
bytes of disk space; this is expected to be far more  inodes
than will ever be needed.

     All the cylinder group bookkeeping information could be
placed at the beginning of each cylinder group.  However  if
this approach were used, all the redundant information would
-----------
The  actual number may vary from system to system,
but is usually in the range 5-13.









SMM:3-6                   The UNIX File System Check Program


be on the top  platter.   A  single  hardware  failure  that
destroyed the top platter could cause the loss of all copies
of the redundant  super-blocks.   Thus  the  cylinder  group
bookkeeping information begins at a floating offset from the
beginning of the cylinder group.  The offset for  the  _i_+_1st
cylinder group is about one track further from the beginning
of the cylinder group than  it  was  for  the  _ith  cylinder
group.   In this way, the redundant information spirals down
into the pack; any single track, cylinder, or platter can be
lost  without losing all copies of the super-blocks.  Except
for the first cylinder group, the space between  the  begin-
ning of the cylinder group and the beginning of the cylinder
group information stores data.

22..44..  FFrraaggmmeennttss

     To avoid waste in storing small files, the file  system
space  allocator divides a single file system block into one
or more _f_r_a_g_m_e_n_t_s.  The fragmentation of the file system  is
specified  when the file system is created; each file system
block can be optionally broken into 2, 4, or  8  addressable
fragments.   The  lower bound on the size of these fragments
is constrained by the disk sector size; typically 512  bytes
is  the lower bound on fragment size.  The block map associ-
ated with each cylinder group records the space availability
at  the  fragment  level.  Aligned fragments are examined to
determine block availability.

     On a file system with a block size of 4096 bytes and  a
fragment  size  of 1024 bytes, a file is represented by zero
or more 4096 byte blocks of  data,  and  possibly  a  single
fragmented block.  If a file system block must be fragmented
to obtain space for a small amount of data, the remainder of
the  block  is made available for allocation to other files.
For example,  consider  an  11000  byte  file  stored  on  a
4096/1024  byte  file  system.  This file uses two full size
blocks and a 3072 byte fragment.  If no  fragments  with  at
least  3072  bytes are available when the file is created, a
full size block is split yielding the  necessary  3072  byte
fragment  and  an unused 1024 byte fragment.  This remaining
fragment can be allocated to another file, as needed.

22..55..  UUppddaatteess ttoo tthhee ffiillee ssyysstteemm

     Every working day hundreds of files are created,  modi-
fied, and removed.  Every time a file is modified, the oper-
ating system performs  a  series  of  file  system  updates.
These updates, when written on disk, yield a consistent file
system.  The file system stages all modifications of  criti-
cal  information;  modification  can  either be completed or
cleanly backed out after a crash.  Knowing  the  information
that is first written to the file system, deterministic pro-
cedures can be developed to repair a corrupted file  system.
To  understand  this  process,  the  order  that  the update









The UNIX File System Check Program                   SMM:3-7


requests were being honored must first be understood.

     When a user program does an  operation  to  change  the
file  system,  such  as  a  _w_r_i_t_e, the data to be written is
copied into an internal _i_n_-_c_o_r_e buffer in the kernel.   Nor-
mally,  the  disk update is handled asynchronously; the user
process is allowed to proceed even though the data  has  not
yet  been  written  to  the  disk.  The data, along with the
inode information reflecting the change, is eventually writ-
ten  out  to disk.  The real disk write may not happen until
long after the _w_r_i_t_e system call has returned.  Thus at  any
given time, the file system, as it resides on the disk, lags
the state of the file  system  represented  by  the  in-core
information.

     The  disk information is updated to reflect the in-core
information when the buffer is  required  for  another  use,
when   a  _s_y_n_c(2)  is  done  (at  30  second  intervals)  by
_/_e_t_c_/_u_p_d_a_t_e(8), or by manual operator intervention with  the
_s_y_n_c(8)  command.   If  the system is halted without writing
out the in-core information, the file  system  on  the  disk
will be in an inconsistent state.

     If all updates are done asynchronously, several serious
inconsistencies can arise.   One  inconsistency  is  that  a
block  may  be claimed by two inodes.  Such an inconsistency
can occur when the system is halted before  the  pointer  to
the  block  in the old inode has been cleared in the copy of
the old inode on the disk, and  after  the  pointer  to  the
block  in  the new inode has been written out to the copy of
the new inode on the disk.  Here, there is no  deterministic
method  for  deciding  which  inode  should really claim the
block.  A similar problem can arise with a multiply  claimed
inode.

     The  problem  with  asynchronous  inode  updates can be
avoided by  doing  all  inode  deallocations  synchronously.
Consequently,  inodes and indirect blocks are written to the
disk synchronously (_i_._e_. the process blocks until the infor-
mation  is really written to disk) when they are being deal-
located.  Similarly  inodes  are  kept  consistent  by  syn-
chronously  deleting, adding, or changing directory entries.

33..  FFiixxiinngg ccoorrrruupptteedd ffiillee ssyysstteemmss

     A file system can become  corrupted  in  several  ways.
The  most  common of these ways are improper shutdown proce-
dures and hardware failures.

     File systems may become  corrupted  during  an  _u_n_c_l_e_a_n
_h_a_l_t.   This happens when proper shutdown procedures are not
observed, physically write-protecting a mounted file system,
or a mounted file system is taken off-line.  The most common
operator procedural failure is forgetting to _s_y_n_c the system









SMM:3-8                   The UNIX File System Check Program


before halting the CPU.

     File  systems  may  become  further corrupted if proper
startup procedures are not observed, e.g.,  not  checking  a
file system for inconsistencies, and not repairing inconsis-
tencies.  Allowing a corrupted file system to be used  (and,
thus, to be modified further) can be disastrous.

     Any  piece  of hardware can fail at any time.  Failures
can be as subtle as a bad block on a disk pack, or  as  bla-
tant as a non-functional disk-controller.

33..11..  DDeetteeccttiinngg aanndd ccoorrrreeccttiinngg ccoorrrruuppttiioonn

     Normally  _f_s_c_k___f_f_s  is  run non-interactively.  In this
mode it will only fix corruptions that are expected to occur
from  an unclean halt.  These actions are a proper subset of
the actions that _f_s_c_k___f_f_s  will  take  when  it  is  running
interactively.    Throughout   this  paper  we  assume  that
_f_s_c_k___f_f_s is being run interactively, and all possible errors
can  be encountered.  When an inconsistency is discovered in
this mode, _f_s_c_k___f_f_s reports the inconsistency for the opera-
tor to chose a corrective action.

     A  quiescent  file system may be checked for structural
integrity by performing consistency checks on the  redundant
data  intrinsic  to  a  file  system.  The redundant data is
either read from the file system,  or  computed  from  other
known  values.  The file system mmuusstt be in a quiescent state
when _f_s_c_k___f_f_s is run, since _f_s_c_k___f_f_s is  a  multi-pass  pro-
gram.

     In  the  following sections, we discuss methods to dis-
cover inconsistencies and possible  corrective  actions  for
the  cylinder group blocks, the inodes, the indirect blocks,
and the data blocks containing directory entries.

33..22..  SSuuppeerr--bblloocckk cchheecckkiinngg

     The most commonly corrupted item in a  file  system  is
the  summary  information  associated  with the super-block.
The summary information is prone to corruption because it is
modified  with  every  change to the file system's blocks or
inodes, and is usually corrupted after an unclean halt.

     The super-block is checked for inconsistencies  involv-
ing  file-system  size,  number of inodes, free-block count,
and the free-inode count.   The  file-system  size  must  be
larger than the number of blocks used by the super-block and
the number of blocks used by the list of inodes.  The  file-
system  size  and  layout  information are the most critical
pieces of information for _f_s_c_k___f_f_s.  While there is  no  way
-----------
 I.e., unmounted and not being written on.









The UNIX File System Check Program                   SMM:3-9


to  actually  check  these  sizes, since they are statically
determined by _n_e_w_f_s, _f_s_c_k___f_f_s can check that these sizes are
within  reasonable  bounds.   All  other  file system checks
require that these sizes be correct.   If  _f_s_c_k___f_f_s  detects
corruption  in  the  static parameters of the default super-
block, _f_s_c_k___f_f_s requests the operator to specify  the  loca-
tion of an alternate super-block.

33..33..  FFrreeee bblloocckk cchheecckkiinngg

     _F_s_c_k___f_f_s  checks  that all the blocks marked as free in
the cylinder group block maps are not claimed by any  files.
When  all  the  blocks  have  been  initially accounted for,
_f_s_c_k___f_f_s checks that the number of free blocks plus the num-
ber  of blocks claimed by the inodes equals the total number
of blocks in the file system.

     If anything is wrong with the  block  allocation  maps,
_f_s_c_k___f_f_s  will  rebuild  them, based on the list it has com-
puted of allocated blocks.

     The summary information associated with the super-block
counts  the total number of free blocks within the file sys-
tem.  _F_s_c_k___f_f_s compares this count to  the  number  of  free
blocks  it  found within the file system.  If the two counts
do not agree, then _f_s_c_k___f_f_s replaces the incorrect count  in
the summary information by the actual free-block count.

     The summary information counts the total number of free
inodes within the file system.  _F_s_c_k___f_f_s compares this count
to  the  number of free inodes it found within the file sys-
tem.  If the two counts do not agree, then _f_s_c_k___f_f_s replaces
the incorrect count in the summary information by the actual
free-inode count.

33..44..  CChheecckkiinngg tthhee iinnooddee ssttaattee

     An individual inode is not as likely to be corrupted as
the  allocation  information.  However, because of the great
number of active inodes, a few of  the  inodes  are  usually
corrupted.

     The  list  of  inodes  in  the  file  system is checked
sequentially starting with inode 2  (inode  0  marks  unused
inodes;  inode  1  is saved for future generations) and pro-
gressing through the last inode in  the  file  system.   The
state of each inode is checked for inconsistencies involving
format and type, link count, duplicate blocks,  bad  blocks,
and inode size.

     Each  inode  contains  a  mode  word.   This  mode word
describes the type and state of the inode.  Inodes  must  be
one  of  six types: regular inode, directory inode, symbolic
link inode, special block inode, special character inode, or









SMM:3-10                  The UNIX File System Check Program


socket  inode.   Inodes may be found in one of three alloca-
tion states: unallocated, allocated, and neither unallocated
nor allocated.  This last state suggests an incorrectly for-
mated inode.  An inode can get in this state if bad data  is
written  into  the inode list.  The only possible corrective
action is for _f_s_c_k___f_f_s is to clear the inode.

33..55..  IInnooddee lliinnkkss

     Each inode counts the total number of directory entries
linked  to  the  inode.  _F_s_c_k___f_f_s verifies the link count of
each inode by starting at the root of the file  system,  and
descending through the directory structure.  The actual link
count for each inode is calculated during the descent.

     If the stored link count is  non-zero  and  the  actual
link  count is zero, then no directory entry appears for the
inode.  If this happens, _f_s_c_k___f_f_s  will  place  the  discon-
nected  file in the _l_o_s_t_+_f_o_u_n_d directory.  If the stored and
actual link counts are non-zero  and  unequal,  a  directory
entry may have been added or removed without the inode being
updated.  If this happens, _f_s_c_k___f_f_s replaces  the  incorrect
stored link count by the actual link count.

     Each inode contains a list, or pointers to lists (indi-
rect blocks), of all the blocks claimed by the inode.  Since
indirect  blocks  are  owned by an inode, inconsistencies in
indirect blocks directly affect the inode that owns it.

     _F_s_c_k___f_f_s compares each block number claimed by an inode
against  a  list  of  already  allocated blocks.  If another
inode already claims a block number, then the  block  number
is added to a list of _d_u_p_l_i_c_a_t_e _b_l_o_c_k_s.  Otherwise, the list
of allocated blocks is updated to include the block  number.

     If  there  are any duplicate blocks, _f_s_c_k___f_f_s will per-
form a partial second pass over the inode list to  find  the
inode  of  the duplicated block.  The second pass is needed,
since without examining  the  files  associated  with  these
inodes for correct content, not enough information is avail-
able to determine which inode is  corrupted  and  should  be
cleared.   If this condition does arise (only hardware fail-
ure will cause it), then the inode with the earliest  modify
time  is  usually incorrect, and should be cleared.  If this
happens, _f_s_c_k___f_f_s prompts the operator to clear both inodes.
The  operator must decide which one should be kept and which
one should be cleared.

     _F_s_c_k___f_f_s checks the range of each block number  claimed
by  an  inode.   If the block number is lower than the first
data block in the file system, or greater than the last data
block,  then  the  block number is a _b_a_d _b_l_o_c_k _n_u_m_b_e_r.  Many
bad blocks in an inode are usually  caused  by  an  indirect
block  that  was not written to the file system, a condition









The UNIX File System Check Program                  SMM:3-11


which can only occur if there has been a  hardware  failure.
If an inode contains bad block numbers, _f_s_c_k___f_f_s prompts the
operator to clear it.

33..66..  IInnooddee ddaattaa ssiizzee

     Each inode contains a  count  of  the  number  of  data
blocks  that  it contains.  The number of actual data blocks
is the sum of the allocated data  blocks  and  the  indirect
blocks.   _F_s_c_k___f_f_s computes the actual number of data blocks
and compares that block count against the actual  number  of
blocks  the inode claims.  If an inode contains an incorrect
count _f_s_c_k___f_f_s prompts the operator to fix it.

     Each inode contains a thirty-two bit size  field.   The
size is the number of data bytes in the file associated with
the inode.  The  consistency  of  the  byte  size  field  is
roughly checked by computing from the size field the maximum
number of blocks that should be associated with  the  inode,
and  comparing  that expected block count against the actual
number of blocks the inode claims.

33..77..  CChheecckkiinngg tthhee ddaattaa aassssoocciiaatteedd wwiitthh aann iinnooddee

     An inode can directly  or  indirectly  reference  three
kinds  of  data  blocks.   All referenced blocks must be the
same kind.  The three types of data blocks are:  plain  data
blocks,  symbolic  link  data  blocks,  and  directory  data
blocks.  Plain data blocks contain the information stored in
a  file;  symbolic  link  data  blocks contain the path name
stored in a link.  Directory data blocks  contain  directory
entries.   _F_s_c_k___f_f_s can only check the validity of directory
data blocks.

     Each directory data block is checked for several  types
of inconsistencies.  These inconsistencies include directory
inode numbers  pointing  to  unallocated  inodes,  directory
inode  numbers that are greater than the number of inodes in
the file system, incorrect directory inode numbers for ``..''
and  ``....'',  and  directories  that are not attached to the
file system.  If the inode number in a directory data  block
references  an  unallocated inode, then _f_s_c_k___f_f_s will remove
that directory entry.  Again, this condition can only  arise
when there has been a hardware failure.

     _F_s_c_k  also  checks  for  directories  with  unallocated
blocks (holes).  Such directories should never  be  created.
When  found,  _f_s_c_k will prompt the user to adjust the length
of the offending directory which is done by  shortening  the
size of the directory to the end of the last allocated block
preceding the hole.  Unfortunately, this means that  another
Phase  1  run  has to be done.  _F_s_c_k will remind the user to
rerun fsck after repairing a directory containing an unallo-
cated block.









SMM:3-12                  The UNIX File System Check Program


     If  a  directory  entry inode number references outside
the inode list, then _f_s_c_k___f_f_s  will  remove  that  directory
entry.   This condition occurs if bad data is written into a
directory data block.

     The directory inode number entry for ``..''  must be the
first  entry  in the directory data block.  The inode number
for ``..''  must reference itself; e.g., it  must  equal  the
inode  number  for  the directory data block.  The directory
inode number entry for ``....'' must be the  second  entry  in
the  directory  data  block.  Its value must equal the inode
number for the parent of the directory entry (or  the  inode
number  of  the directory data block if the directory is the
root directory).  If the directory inode numbers are  incor-
rect,  _f_s_c_k___f_f_s  will  replace them with the correct values.
If there are multiple hard links to a directory,  the  first
one  encountered  is  considered  the  real  parent to which
``....'' should point; _f_s_c_k___f_f_s recommends  deletion  for  the
subsequently discovered names.

33..88..  FFiillee ssyysstteemm ccoonnnneeccttiivviittyy

     _F_s_c_k___f_f_s  checks  the  general connectivity of the file
system.  If directories are not linked into the file system,
then  _f_s_c_k___f_f_s links the directory back into the file system
in the _l_o_s_t_+_f_o_u_n_d directory.   This  condition  only  occurs
when there has been a hardware failure.

AAcckknnoowwlleeddggeemmeennttss

     I  thank  Bill  Joy, Sam Leffler, Robert Elz and Dennis
Ritchie for their suggestions and help in  implementing  the
new file system.  Thanks also to Robert Henry for his edito-
rial input to get this document together.  Finally we  thank
our  sponsors,  the  National Science Foundation under grant
MCS80-05144,  and  the  Defense  Advance  Research  Projects
Agency  (DoD)  under  Arpa Order No. 4031 monitored by Naval
Electronic    System    Command    under    Contract     No.
N00039-82-C-0235. (Kirk McKusick, July 1983)

     I  would  like  to  thank Larry A. Wehr for advice that
lead to the first version of _f_s_c_k___f_f_s and Rick B. Brandt for
adapting _f_s_c_k___f_f_s to UNIX/TS. (T. Kowalski, July 1979)



RReeffeerreenncceess


[Dolotta78]         Dolotta,  T. A., and Olsson, S. B. eds.,
                    _U_N_I_X _U_s_e_r_'_s _M_a_n_u_a_l_, _E_d_i_t_i_o_n _1_._1, January
                    1978.











The UNIX File System Check Program                  SMM:3-13


[Joy83]             Joy, W., Cooper, E., Fabry, R., Leffler,
                    S., McKusick, M., and Mosher, D.  4.2BSD
                    System  Manual, _U_n_i_v_e_r_s_i_t_y _o_f _C_a_l_i_f_o_r_n_i_a
                    _a_t _B_e_r_k_e_l_e_y, _C_o_m_p_u_t_e_r  _S_y_s_t_e_m_s  _R_e_s_e_a_r_c_h
                    _G_r_o_u_p _T_e_c_h_n_i_c_a_l _R_e_p_o_r_t #4, 1982.

[McKusick84]        McKusick,  M., Joy, W., Leffler, S., and
                    Fabry, R.  A Fast File System for  UNIX,
                    _A_C_M  _T_r_a_n_s_a_c_t_i_o_n_s _o_n _C_o_m_p_u_t_e_r _S_y_s_t_e_m_s _2,
                    3.  pp. 181-197, August 1984.

[Ritchie78]         Ritchie, D. M., and  Thompson,  K.,  The
                    UNIX  Time-Sharing System, _T_h_e _B_e_l_l _S_y_s_-
                    _t_e_m _T_e_c_h_n_i_c_a_l _J_o_u_r_n_a_l 5577, 6 (July-August
                    1978, Part 2), pp. 1905-29.

[Thompson78]        Thompson,  K.,  UNIX Implementation, _T_h_e
                    _B_e_l_l  _S_y_s_t_e_m  _T_e_c_h_n_i_c_a_l  _J_o_u_r_n_a_l  5577,  6
                    (July-August 1978, Part 2), pp. 1931-46.












































SMM:3-14                  The UNIX File System Check Program


44..  AAppppeennddiixx AA -- FFsscckk__ffffss EErrrroorr CCoonnddiittiioonnss

44..11..  CCoonnvveennttiioonnss

     _F_s_c_k___f_f_s is a multi-pass  file  system  check  program.
Each  file  system  pass  invokes  a  different Phase of the
_f_s_c_k___f_f_s program.  After the initial  setup,  _f_s_c_k___f_f_s  per-
forms  successive  Phases  over  each  file system, checking
blocks  and  sizes,  path-names,   connectivity,   reference
counts,  and  the  map  of free blocks, (possibly rebuilding
it), and performs some cleanup.

Normally _f_s_c_k___f_f_s is run non-interactively to _p_r_e_e_n the file
systems  after an unclean halt.  While preen'ing a file sys-
tem, it will only fix corruptions that are expected to occur
from  an unclean halt.  These actions are a proper subset of
the actions that _f_s_c_k___f_f_s  will  take  when  it  is  running
interactively.   Throughout  this  appendix many errors have
several options that the operator can take.  When an  incon-
sistency  is  detected, _f_s_c_k___f_f_s reports the error condition
to the operator.  If a response is required, _f_s_c_k___f_f_s prints
a  prompt  message and waits for a response.  When preen'ing
most errors are fatal.  For those  that  are  expected,  the
response taken is noted.  This appendix explains the meaning
of each error condition, the  possible  responses,  and  the
related error conditions.

The  error  conditions  are  organized  by  the _P_h_a_s_e of the
_f_s_c_k___f_f_s program in which they can occur.  The error  condi-
tions  that  may  occur  in more than one Phase will be dis-
cussed in initialization.

44..22..  IInniittiiaalliizzaattiioonn

     Before a file system check can  be  performed,  certain
tables  have  to  be  set up and certain files opened.  This
section concerns itself with the opening of  files  and  the
initialization  of  tables.  This section lists error condi-
tions resulting from command line options, memory  requests,
opening  of files, status of files, file system size checks,
and creation of the scratch file.   All  the  initialization
errors are fatal when the file system is being preen'ed.


_C ooppttiioonn??
_C  is  not a legal option to _f_s_c_k___f_f_s; legal options are -b,
-c, -y, -n, and -p.  _F_s_c_k___f_f_s terminates on this error  con-
dition.   See  the  _f_s_c_k___f_f_s(8)  manual  entry  for  further
detail.


ccaannnnoott aalllloocc NNNNNN bbyytteess ffoorr bblloocckkmmaapp
ccaannnnoott aalllloocc NNNNNN bbyytteess ffoorr ffrreeeemmaapp
ccaannnnoott aalllloocc NNNNNN bbyytteess ffoorr ssttaatteemmaapp









The UNIX File System Check Program                  SMM:3-15


ccaannnnoott aalllloocc NNNNNN bbyytteess ffoorr llnnccnnttpp
_F_s_c_k___f_f_s's request for memory for its virtual memory  tables
failed.   This  should never happen.  _F_s_c_k___f_f_s terminates on
this error condition.  See a guru.


CCaann''tt ooppeenn cchheecckklliisstt ffiillee:: _F
The file system checklist file _F  (usually  _/_e_t_c_/_f_s_t_a_b)  can
not  be  opened  for  reading.   _F_s_c_k___f_f_s terminates on this
error condition.  Check access modes of _F.


CCaann''tt ssttaatt rroooott
_F_s_c_k___f_f_s's request for statistics about the  root  directory
``/''  failed.   This  should never happen.  _F_s_c_k___f_f_s termi-
nates on this error condition.  See a guru.


CCaann''tt ssttaatt _F
CCaann''tt mmaakkee sseennssee oouutt ooff nnaammee _F
_F_s_c_k___f_f_s's request for statistics about the  file  system  _F
failed.   When running manually, it ignores this file system
and continues checking the next file  system  given.   Check
access modes of _F.


CCaann''tt ooppeenn _F
_F_s_c_k___f_f_s's request attempt to open the file system _F failed.
When running manually, it ignores this file system and  con-
tinues  checking  the  next file system given.  Check access
modes of _F.


_F:: ((NNOO WWRRIITTEE))
Either the -n flag was specified or  _f_s_c_k___f_f_s's  attempt  to
open  the  file  system  _F for writing failed.  When running
manually, all the diagnostics are printed out, but no  modi-
fications are attempted to fix them.


ffiillee iiss nnoott aa bblloocckk oorr cchhaarraacctteerr ddeevviiccee;; OOKK
You  have  given  _f_s_c_k___f_f_s  a  regular file name by mistake.
Check the type of the file specified.

Possible responses to the OK prompt are:

YES  ignore this error condition.

NO   ignore this file system and continues checking the next
     file system given.


UUNNDDEEFFIINNEEDD OOPPTTIIMMIIZZAATTIIOONN IINN SSUUPPEERRBBLLOOCCKK ((SSEETT TTOO DDEEFFAAUULLTT))
The  superblock  optimization  parameter is neither OPT_TIME









SMM:3-16                  The UNIX File System Check Program


nor OPT_SPACE.

Possible responses to the SET TO DEFAULT prompt are:

YES  The superblock is set to request optimization to  mini-
     mize  running  time of the system.  (If optimization to
     minimize disk space utilization is desired, it  can  be
     set using _t_u_n_e_f_s(8).)

NO   ignore this error condition.


IIMMPPOOSSSSIIBBLLEE MMIINNFFRREEEE==_D IINN SSUUPPEERRBBLLOOCCKK ((SSEETT TTOO DDEEFFAAUULLTT))
The  superblock minimum space percentage is greater than 99%
or less than 0%.

Possible responses to the SET TO DEFAULT prompt are:

YES  The minfree parameter is set to 10%.   (If  some  other
     percentage  is desired, it can be set using _t_u_n_e_f_s(8).)

NO   ignore this error condition.


IIMMPPOOSSSSIIBBLLEE IINNTTEERRLLEEAAVVEE==_D IINN SSUUPPEERRBBLLOOCCKK ((SSEETT TTOO DDEEFFAAUULLTT))
The file system interleave is less than or equal to zero.

Possible responses to the SET TO DEFAULT prompt are:

YES  The interleave parameter is set to 1.

NO   ignore this error condition.


IIMMPPOOSSSSIIBBLLEE NNPPSSEECCTT==_D IINN SSUUPPEERRBBLLOOCCKK ((SSEETT TTOO DDEEFFAAUULLTT))
The number of physical sectors per track is  less  than  the
number of usable sectors per track.

Possible responses to the SET TO DEFAULT prompt are:

YES  The  npsect  parameter  is  set to the number of usable
     sectors per track.

NO   ignore this error condition.


One of the following messages will appear:
MMAAGGIICC NNUUMMBBEERR WWRROONNGG
NNCCGG OOUUTT OOFF RRAANNGGEE
CCPPGG OOUUTT OOFF RRAANNGGEE
NNCCYYLL DDOOEESS NNOOTT JJIIVVEE WWIITTHH NNCCGG**CCPPGG
SSIIZZEE PPRREEPPOOSSTTEERROOUUSSLLYY LLAARRGGEE
TTRRAASSHHEEDD VVAALLUUEESS IINN SSUUPPEERR BBLLOOCCKK
and will be followed by the message:









The UNIX File System Check Program                  SMM:3-17


_F:: BBAADD SSUUPPEERR BBLLOOCCKK:: _B
UUSSEE --bb OOPPTTIIOONN TTOO FFSSCCKK__FFFFSS TTOO SSPPEECCIIFFYY LLOOCCAATTIIOONN OOFF  AANN  AALLTTEERR--
NNAATTEE
SSUUPPEERR--BBLLOOCCKK TTOO SSUUPPPPLLYY NNEEEEDDEEDD IINNFFOORRMMAATTIIOONN;; SSEEEE ffsscckk__ffffss((88))..
The  super  block  has been corrupted.  An alternative super
block must be selected from among those listed by _n_e_w_f_s  (8)
when  the  file system was created.  For file systems with a
blocksize less than 32K, specifying -b 32 is  a  good  first
choice.


IINNTTEERRNNAALL IINNCCOONNSSIISSTTEENNCCYY:: _M
_F_s_c_k___f_f_s's has had an internal panic, whose message is spec-
ified as _M.  This should never happen.  See a guru.


CCAANN NNOOTT SSEEEEKK:: BBLLKK _B ((CCOONNTTIINNUUEE))
_F_s_c_k___f_f_s's request for moving to a specified block number  _B
in the file system failed.  This should never happen.  See a
guru.

Possible responses to the CONTINUE prompt are:

YES  attempt to continue  to  run  the  file  system  check.
     Often,  however  the  problem will persist.  This error
     condition will not allow a complete check of  the  file
     system.  A second run of _f_s_c_k___f_f_s should be made to re-
     check this file system.  If the block was part  of  the
     virtual  memory  buffer  cache, _f_s_c_k___f_f_s will terminate
     with the message ``Fatal I/O error''.

NO   terminate the program.


CCAANN NNOOTT RREEAADD:: BBLLKK _B ((CCOONNTTIINNUUEE))
_F_s_c_k___f_f_s's request for reading a specified block number _B in
the  file  system  failed.  This should never happen.  See a
guru.

Possible responses to the CONTINUE prompt are:

YES  attempt to continue to run the file system  check.   It
     will retry the read and print out the message:
     TTHHEE FFOOLLLLOOWWIINNGG SSEECCTTOORRSS CCOOUULLDD NNOOTT BBEE RREEAADD:: _N
     where  _N  indicates the sectors that could not be read.
     If _f_s_c_k___f_f_s ever tries to write back one of the  blocks
     on which the read failed it will print the message:
     WWRRIITTIINNGG ZZEERROO''EEDD BBLLOOCCKK _N TTOO DDIISSKK
     where  _N  indicates  the  sector  that was written with
     zero's.  If the disk is experiencing hardware problems,
     the  problem  will  persist.  This error condition will
     not allow a complete check of the file system.  A  sec-
     ond  run  of  _f_s_c_k___f_f_s  should be made to re-check this
     file system.  If the block  was  part  of  the  virtual









SMM:3-18                  The UNIX File System Check Program


     memory  buffer  cache, _f_s_c_k___f_f_s will terminate with the
     message ``Fatal I/O error''.

NO   terminate the program.


CCAANN NNOOTT WWRRIITTEE:: BBLLKK _B ((CCOONNTTIINNUUEE))
_F_s_c_k___f_f_s's request for writing a specified block number _B in
the  file system failed.  The disk is write-protected; check
the write protect lock on the drive.  If  that  is  not  the
problem, see a guru.

Possible responses to the CONTINUE prompt are:

YES  attempt  to continue to run the file system check.  The
     write operation will be retried with the failed  blocks
     indicated by the message:
     TTHHEE FFOOLLLLOOWWIINNGG SSEECCTTOORRSS CCOOUULLDD NNOOTT BBEE WWRRIITTTTEENN:: _N
     where  _N  indicates the sectors that could not be writ-
     ten.  If the disk is  experiencing  hardware  problems,
     the  problem  will  persist.  This error condition will
     not allow a complete check of the file system.  A  sec-
     ond  run  of  _f_s_c_k___f_f_s  should be made to re-check this
     file system.  If the block was part of the virtual mem-
     ory buffer cache, _f_s_c_k___f_f_s will terminate with the mes-
     sage ``Fatal I/O error''.

NO   terminate the program.


bbaadd iinnooddee nnuummbbeerr DDDDDD ttoo ggiinnooddee
An internal error has attempted to read  non-existent  inode
_D_D_D.  This error causes _f_s_c_k___f_f_s to exit.  See a guru.

44..33..  PPhhaassee 11 -- CChheecckk BBlloocckkss aanndd SSiizzeess

     This  phase  concerns itself with the inode list.  This
section lists error conditions resulting from checking inode
types, setting up the zero-link-count table, examining inode
block numbers for bad or duplicate  blocks,  checking  inode
size,  and  checking inode format.  All errors in this phase
except IINNCCOORRRREECCTT BBLLOOCCKK CCOOUUNNTT and PPAARRTTIIAALLLLYY  TTRRUUNNCCAATTEEDD  IINNOODDEE
are fatal if the file system is being preen'ed.


UUNNKKNNOOWWNN FFIILLEE TTYYPPEE II==_I ((CCLLEEAARR))
The mode word of the inode _I indicates that the inode is not
a special  block  inode,  special  character  inode,  socket
inode, regular inode, symbolic link, or directory inode.

Possible responses to the CLEAR prompt are:

YES  de-allocate inode _I by zeroing its contents.  This will
     always invoke the UNALLOCATED error condition in  Phase









The UNIX File System Check Program                  SMM:3-19


     2 for each directory entry pointing to this inode.

NO   ignore this error condition.


PPAARRTTIIAALLLLYY TTRRUUNNCCAATTEEDD IINNOODDEE II==_I ((SSAALLVVAAGGEE))
_F_s_c_k___f_f_s  has  found  inode _I whose size is shorter than the
number of blocks allocated to  it.   This  condition  should
only occur if the system crashes while in the midst of trun-
cating a file.  When preen'ing  the  file  system,  _f_s_c_k___f_f_s
completes the truncation to the specified size.

Possible responses to SALVAGE are:

YES  complete  the  truncation  to the size specified in the
     inode.

NO   ignore this error condition.


LLIINNKK CCOOUUNNTT TTAABBLLEE OOVVEERRFFLLOOWW ((CCOONNTTIINNUUEE))
An internal table for _f_s_c_k___f_f_s containing  allocated  inodes
with  a  link  count  of  zero  cannot allocate more memory.
Increase the virtual memory for _f_s_c_k___f_f_s.

Possible responses to the CONTINUE prompt are:

YES  continue with the program.  This error  condition  will
     not  allow a complete check of the file system.  A sec-
     ond run of _f_s_c_k___f_f_s should be  made  to  re-check  this
     file  system.   If  another allocated inode with a zero
     link count is found, this error condition is  repeated.

NO   terminate the program.


_B BBAADD II==_I
Inode _I contains block number _B with a number lower than the
number of the first data block in the file system or greater
than  the number of the last block in the file system.  This
error condition may invoke the EEXXCCEESSSSIIVVEE BBAADD BBLLKKSS error con-
dition  in  Phase  1 (see next paragraph) if inode _I has too
many block numbers outside  the  file  system  range.   This
error  condition will always invoke the BBAADD//DDUUPP error condi-
tion in Phase 2 and Phase 4.


EEXXCCEESSSSIIVVEE BBAADD BBLLKKSS II==_I ((CCOONNTTIINNUUEE))
There is more than a tolerable number (usually 10) of blocks
with  a number lower than the number of the first data block
in the file system or greater than the number of last  block
in the file system associated with inode _I.











SMM:3-20                  The UNIX File System Check Program


Possible responses to the CONTINUE prompt are:

YES  ignore  the  rest  of the blocks in this inode and con-
     tinue checking with the next inode in the file  system.
     This error condition will not allow a complete check of
     the file system.  A second run of  _f_s_c_k___f_f_s  should  be
     made to re-check this file system.

NO   terminate the program.


BBAADD SSTTAATTEE DDDDDD TTOO BBLLKKEERRRR
An internal error has scrambled _f_s_c_k___f_f_s's state map to have
the impossible value _D_D_D.  _F_s_c_k___f_f_s exits immediately.   See
a guru.


_B DDUUPP II==_I
Inode  _I  contains block number _B that is already claimed by
another inode.  This error condition may invoke  the  EEXXCCEESS--
SSIIVVEE  DDUUPP BBLLKKSS error condition in Phase 1 if inode _I has too
many block numbers claimed by other inodes.  This error con-
dition  will  always  invoke  Phase 1b and the BBAADD//DDUUPP error
condition in Phase 2 and Phase 4.


EEXXCCEESSSSIIVVEE DDUUPP BBLLKKSS II==_I ((CCOONNTTIINNUUEE))
There is more than a tolerable number (usually 10) of blocks
claimed by other inodes.

Possible responses to the CONTINUE prompt are:

YES  ignore  the  rest  of the blocks in this inode and con-
     tinue checking with the next inode in the file  system.
     This error condition will not allow a complete check of
     the file system.  A second run of  _f_s_c_k___f_f_s  should  be
     made to re-check this file system.

NO   terminate the program.


DDUUPP TTAABBLLEE OOVVEERRFFLLOOWW ((CCOONNTTIINNUUEE))
An  internal  table  in  _f_s_c_k___f_f_s containing duplicate block
numbers cannot allocate any more space.  Increase the amount
of virtual memory available to _f_s_c_k___f_f_s.

Possible responses to the CONTINUE prompt are:

YES  continue  with  the program.  This error condition will
     not allow a complete check of the file system.  A  sec-
     ond  run  of  _f_s_c_k___f_f_s  should be made to re-check this
     file system.  If another duplicate block is found, this
     error condition will repeat.










The UNIX File System Check Program                  SMM:3-21


NO   terminate the program.


PPAARRTTIIAALLLLYY AALLLLOOCCAATTEEDD IINNOODDEE II==_I ((CCLLEEAARR))
Inode _I is neither allocated nor unallocated.

Possible responses to the CLEAR prompt are:

YES  de-allocate inode _I by zeroing its contents.

NO   ignore this error condition.


IINNCCOORRRREECCTT BBLLOOCCKK CCOOUUNNTT II==_I ((_X sshhoouulldd bbee _Y)) ((CCOORRRREECCTT))
The  block  count  for  inode _I is _X blocks, but should be _Y
blocks.  When preen'ing the count is corrected.

Possible responses to the CORRECT prompt are:

YES  replace the block count of inode _I with _Y.

NO   ignore this error condition.

44..44..  PPhhaassee 11BB:: RReessccaann ffoorr MMoorree DDuuppss

     When a duplicate block is found in the file system, the
file  system  is rescanned to find the inode that previously
claimed that block.  This section lists the error  condition
when the duplicate block is found.


_B DDUUPP II==_I
Inode  _I  contains block number _B that is already claimed by
another inode.  This error condition will always invoke  the
BBAADD//DDUUPP error condition in Phase 2.  You can determine which
inodes have overlapping blocks by examining this error  con-
dition and the DUP error condition in Phase 1.

44..55..  PPhhaassee 22 -- CChheecckk PPaatthhnnaammeess

     This  phase  concerns  itself  with  removing directory
entries pointing to error conditioned inodes  from  Phase  1
and Phase 1b.  This section lists error conditions resulting
from root inode mode and status, directory inode pointers in
range,  and  directory  entries  pointing to bad inodes, and
directory integrity checks.  All errors in  this  phase  are
fatal  if  the  file  system  is  being preen'ed, except for
directories not being a multiple  of  the  blocks  size  and
extraneous hard links.


RROOOOTT IINNOODDEE UUNNAALLLLOOCCAATTEEDD ((AALLLLOOCCAATTEE))
The root inode (usually inode number 2) has no allocate mode
bits.  This should never happen.









SMM:3-22                  The UNIX File System Check Program


Possible responses to the ALLOCATE prompt are:

YES  allocate inode 2 as the  root  inode.   The  files  and
     directories usually found in the root will be recovered
     in Phase 3 and put into _l_o_s_t_+_f_o_u_n_d.  If the attempt  to
     allocate  the  root  fails, _f_s_c_k___f_f_s will exit with the
     message:
     CCAANNNNOOTT AALLLLOOCCAATTEE RROOOOTT IINNOODDEE.

NO   _f_s_c_k___f_f_s will exit.


RROOOOTT IINNOODDEE NNOOTT DDIIRREECCTTOORRYY ((RREEAALLLLOOCCAATTEE))
The root inode (usually inode number  2)  is  not  directory
inode type.

Possible responses to the REALLOCATE prompt are:

YES  clear the existing contents of the root inode and real-
     locate it.  The files and directories usually found  in
     the  root  will  be  recovered  in Phase 3 and put into
     _l_o_s_t_+_f_o_u_n_d.  If the attempt to allocate the root fails,
     _f_s_c_k___f_f_s will exit with the message:
     CCAANNNNOOTT AALLLLOOCCAATTEE RROOOOTT IINNOODDEE.

NO   _f_s_c_k___f_f_s will then prompt with FFIIXX

Possible responses to the FIX prompt are:

YES  replace  the  root  inode's type to be a directory.  If
     the root inode's data blocks are not directory  blocks,
     many error conditions will be produced.

NO   terminate the program.


DDUUPPSS//BBAADD IINN RROOOOTT IINNOODDEE ((RREEAALLLLOOCCAATTEE))
Phase  1  or  Phase  1b  have  found duplicate blocks or bad
blocks in the root inode (usually inode number  2)  for  the
file system.

Possible responses to the REALLOCATE prompt are:

YES  clear the existing contents of the root inode and real-
     locate it.  The files and directories usually found  in
     the  root  will  be  recovered  in Phase 3 and put into
     _l_o_s_t_+_f_o_u_n_d.  If the attempt to allocate the root fails,
     _f_s_c_k___f_f_s will exit with the message:
     CCAANNNNOOTT AALLLLOOCCAATTEE RROOOOTT IINNOODDEE.

NO   _f_s_c_k___f_f_s will then prompt with CCOONNTTIINNUUEE.

Possible responses to the CONTINUE prompt are:










The UNIX File System Check Program                  SMM:3-23


YES  ignore  the  DDUUPPSS//BBAADD error condition in the root inode
     and attempt to continue to run the file  system  check.
     If  the root inode is not correct, then this may result
     in many other error conditions.

NO   terminate the program.


NNAAMMEE TTOOOO LLOONNGG _F
An excessively long path name has been found.  This  usually
indicates  loops  in  the  file system name space.  This can
occur if the super user has made circular links to  directo-
ries.  The offending links must be removed (by a guru).


II OOUUTT OOFF RRAANNGGEE II==_I NNAAMMEE==_F ((RREEMMOOVVEE))
A  directory  entry  _F has an inode number _I that is greater
than the end of the inode list.

Possible responses to the REMOVE prompt are:

YES  the directory entry _F is removed.

NO   ignore this error condition.


UUNNAALLLLOOCCAATTEEDD  II==_I  OOWWNNEERR==_O  MMOODDEE==_M  SSIIZZEE==_S   MMTTIIMMEE==_T   _t_y_p_e==_F
((RREEMMOOVVEE))
A  directory  or file entry _F points to an unallocated inode
_I.  The owner _O, mode _M, size _S, modify time _T, and  name  _F
are printed.

Possible responses to the REMOVE prompt are:

YES  the directory entry _F is removed.

NO   ignore this error condition.


DDUUPP//BBAADD II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T _t_y_p_e==_F ((RREEMMOOVVEE))
Phase  1  or  Phase  1b  have  found duplicate blocks or bad
blocks associated with directory or file entry _F,  inode  _I.
The  owner  _O,  mode _M, size _S, modify time _T, and directory
name _F are printed.

Possible responses to the REMOVE prompt are:

YES  the directory entry _F is removed.

NO   ignore this error condition.


ZZEERROO LLEENNGGTTHH DDIIRREECCTTOORRYY  II==_I  OOWWNNEERR==_O  MMOODDEE==_M  SSIIZZEE==_S  MMTTIIMMEE==_T
DDIIRR==_F ((RREEMMOOVVEE))









SMM:3-24                  The UNIX File System Check Program


A directory entry _F has a size _S that is zero.  The owner _O,
mode _M, size _S, modify time _T,  and  directory  name  _F  are
printed.

Possible responses to the REMOVE prompt are:

YES  the  directory  entry  _F  is  removed; this will always
     invoke the BAD/DUP error condition in Phase 4.

NO   ignore this error condition.


DDIIRREECCTTOORRYY TTOOOO SSHHOORRTT II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T  DDIIRR==_F
((FFIIXX))
A  directory  _F has been found whose size _S is less than the
minimum size directory.  The owner _O, mode _M, size _S, modify
time _T, and directory name _F are printed.

Possible responses to the FIX prompt are:

YES  increase  the  size  of  the  directory  to the minimum
     directory size.

NO   ignore this directory.


DDIIRREECCTTOORRYY _F LLEENNGGTTHH _S NNOOTT MMUULLTTIIPPLLEE OOFF _B ((AADDJJUUSSTT))
A directory _F has been found with size _S that is not a  mul-
tiple of the directory blocksize _B.

Possible responses to the ADJUST prompt are:

YES  the length is rounded up to the appropriate block size.
     This error can occur on 4.2BSD file systems.  Thus when
     preen'ing the file system only a warning is printed and
     the directory is adjusted.

NO   ignore the error condition.


DDIIRREECCTTOORRYY CCOORRRRUUPPTTEEDD II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T  DDIIRR==_F
((SSAALLVVAAGGEE))
A  directory  with  an  inconsistent internal state has been
found.

Possible responses to the FIX prompt are:

YES  throw away all entries up to the next directory  bound-
     ary  (usually  512-byte) boundary.  This drastic action
     can throw away up to 42 entries, and  should  be  taken
     only after other recovery efforts have failed.

NO   skip up to the next directory boundary and resume read-
     ing, but do not modify the directory.









The UNIX File System Check Program                  SMM:3-25


BBAADD IINNOODDEE NNUUMMBBEERR FFOORR ``..'' II==_I OOWWNNEERR==_O MMOODDEE==_M  SSIIZZEE==_S  MMTTIIMMEE==_T
DDIIRR==_F ((FFIIXX))
A directory _I has been found whose inode number for `.' does
does not equal _I.

Possible responses to the FIX prompt are:

YES  change the inode number for `.' to be equal to _I.

NO   leave the inode number for `.' unchanged.


MMIISSSSIINNGG ``..'' II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T DDIIRR==_F ((FFIIXX))
A directory _I has been found whose first  entry  is  unallo-
cated.

Possible responses to the FIX prompt are:

YES  build an entry for `.' with inode number equal to _I.

NO   leave the directory unchanged.


MMIISSSSIINNGG ``..'' II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T DDIIRR==_F
CCAANNNNOOTT FFIIXX,, FFIIRRSSTT EENNTTRRYY IINN DDIIRREECCTTOORRYY CCOONNTTAAIINNSS _F
A  directory  _I  has  been  found  whose  first  entry is _F.
_F_s_c_k___f_f_s cannot  resolve  this  problem.   The  file  system
should be mounted and the offending entry _F moved elsewhere.
The file system should then be unmounted and _f_s_c_k___f_f_s should
be run again.


MMIISSSSIINNGG ``..'' II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T DDIIRR==_F
CCAANNNNOOTT FFIIXX,, IINNSSUUFFFFIICCIIEENNTT SSPPAACCEE TTOO AADDDD ``..''
A  directory  _I has been found whose first entry is not `.'.
_F_s_c_k___f_f_s cannot resolve this problem as it should never hap-
pen.  See a guru.


EEXXTTRRAA  ``..''  EENNTTRRYY  II==_I  OOWWNNEERR==_O  MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T DDIIRR==_F
((FFIIXX))
A directory _I has been found that has more  than  one  entry
for `.'.

Possible responses to the FIX prompt are:

YES  remove the extra entry for `.'.

NO   leave the directory unchanged.


BBAADD  IINNOODDEE NNUUMMBBEERR FFOORR ``....'' II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T
DDIIRR==_F ((FFIIXX))
A directory _I has been found whose  inode  number  for  `..'









SMM:3-26                  The UNIX File System Check Program


does does not equal the parent of _I.

Possible responses to the FIX prompt are:

YES  change  the  inode  number  for `..' to be equal to the
     parent of  _I  (``....''  in  the  root  inode  points  to
     itself).

NO   leave the inode number for `..' unchanged.


MMIISSSSIINNGG ``....'' II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T DDIIRR==_F ((FFIIXX))
A  directory  _I has been found whose second entry is unallo-
cated.

Possible responses to the FIX prompt are:

YES  build an entry for `..' with inode number equal to  the
     parent  of  _I  (``....''  in  the  root  inode  points to
     itself).

NO   leave the directory unchanged.


MMIISSSSIINNGG ``....'' II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T DDIIRR==_F
CCAANNNNOOTT FFIIXX,, SSEECCOONNDD EENNTTRRYY IINN DDIIRREECCTTOORRYY CCOONNTTAAIINNSS _F
A directory _I has  been  found  whose  second  entry  is  _F.
_F_s_c_k___f_f_s  cannot  resolve  this  problem.   The  file system
should be mounted and the offending entry _F moved elsewhere.
The file system should then be unmounted and _f_s_c_k___f_f_s should
be run again.


MMIISSSSIINNGG ``....'' II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T DDIIRR==_F
CCAANNNNOOTT FFIIXX,, IINNSSUUFFFFIICCIIEENNTT SSPPAACCEE TTOO AADDDD ``....''
A directory _I has been found whose second entry is not `..'.
_F_s_c_k___f_f_s  cannot  resolve  this  problem.   The  file system
should be mounted and the  second  entry  in  the  directory
moved  elsewhere.   The file system should then be unmounted
and _f_s_c_k___f_f_s should be run again.


EEXXTTRRAA ``....'' EENNTTRRYY II==_I OOWWNNEERR==_O  MMOODDEE==_M  SSIIZZEE==_S  MMTTIIMMEE==_T  DDIIRR==_F
((FFIIXX))
A  directory  _I  has been found that has more than one entry
for `..'.

Possible responses to the FIX prompt are:

YES  remove the extra entry for `..'.

NO   leave the directory unchanged.











The UNIX File System Check Program                  SMM:3-27


_N IISS AANN EEXXTTRRAANNEEOOUUSS HHAARRDD LLIINNKK TTOO AA DDIIRREECCTTOORRYY _D ((RREEMMOOVVEE))
_F_s_c_k___f_f_s has found a hard link, _N, to a directory, _D.   When
preen'ing the extraneous links are ignored.

Possible responses to the REMOVE prompt are:

YES  delete the extraneous entry, _N.

NO   ignore the error condition.


BBAADD IINNOODDEE _S TTOO DDEESSCCEENNDD
An  internal  error  has  caused an impossible state _S to be
passed to the routine that descends the file  system  direc-
tory structure.  _F_s_c_k___f_f_s exits.  See a guru.


BBAADD RREETTUURRNN SSTTAATTEE _S FFRROOMM DDEESSCCEENNDD
An  internal  error  has  caused an impossible state _S to be
returned from the routine  that  descends  the  file  system
directory structure.  _F_s_c_k___f_f_s exits.  See a guru.


BBAADD SSTTAATTEE _S FFOORR RROOOOTT IINNOODDEE
An  internal  error  has  caused an impossible state _S to be
assigned to the root inode.  _F_s_c_k___f_f_s exits.  See a guru.

44..66..  PPhhaassee 33 -- CChheecckk CCoonnnneeccttiivviittyy

     This phase concerns itself with the  directory  connec-
tivity seen in Phase 2.  This section lists error conditions
resulting from unreferenced directories, and missing or full
_l_o_s_t_+_f_o_u_n_d directories.


UUNNRREEFF DDIIRR II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T ((RREECCOONNNNEECCTT))
The directory inode _I was not connected to a directory entry
when the file system was traversed.  The owner  _O,  mode  _M,
size  _S, and modify time _T of directory inode _I are printed.
When preen'ing, the directory is reconnected if its size  is
non-zero, otherwise it is cleared.

Possible responses to the RECONNECT prompt are:

YES  reconnect  directory  inode _I to the file system in the
     directory for lost files  (usually  _l_o_s_t_+_f_o_u_n_d).   This
     may invoke the _l_o_s_t_+_f_o_u_n_d error condition in Phase 3 if
     there are problems  connecting  directory  inode  _I  to
     _l_o_s_t_+_f_o_u_n_d.   This  may also invoke the CONNECTED error
     condition in Phase 3 if the link was successful.

NO   ignore this error condition.  This will  always  invoke
     the UNREF error condition in Phase 4.










SMM:3-28                  The UNIX File System Check Program


NNOO lloosstt++ffoouunndd DDIIRREECCTTOORRYY ((CCRREEAATTEE))
There  is  no  _l_o_s_t_+_f_o_u_n_d directory in the root directory of
the file system; When preen'ing _f_s_c_k___f_f_s tries to  create  a
_l_o_s_t_+_f_o_u_n_d directory.

Possible responses to the CREATE prompt are:

YES  create  a  _l_o_s_t_+_f_o_u_n_d directory in the root of the file
     system.  This may raise the message:
     NNOO SSPPAACCEE LLEEFFTT IINN // ((EEXXPPAANNDD))
     See below for the  possible  responses.   Inability  to
     create a _l_o_s_t_+_f_o_u_n_d directory generates the message:
     SSOORRRRYY.. CCAANNNNOOTT CCRREEAATTEE lloosstt++ffoouunndd DDIIRREECCTTOORRYY
     and  aborts the attempt to linkup the lost inode.  This
     will always invoke the UNREF error condition  in  Phase
     4.

NO   abort  the attempt to linkup the lost inode.  This will
     always invoke the UNREF error condition in Phase 4.


lloosstt++ffoouunndd IISS NNOOTT AA DDIIRREECCTTOORRYY ((RREEAALLLLOOCCAATTEE))
The entry for _l_o_s_t_+_f_o_u_n_d is not a directory.

Possible responses to the REALLOCATE prompt are:

YES  allocate a directory inode, and  change  _l_o_s_t_+_f_o_u_n_d  to
     reference  it.   The  previous  inode  reference by the
     _l_o_s_t_+_f_o_u_n_d name is not cleared.  Thus it will either be
     reclaimed  as  an UNREF'ed inode or have its link count
     ADJUST'ed later in this Phase.  Inability to  create  a
     _l_o_s_t_+_f_o_u_n_d directory generates the message:
     SSOORRRRYY.. CCAANNNNOOTT CCRREEAATTEE lloosstt++ffoouunndd DDIIRREECCTTOORRYY
     and  aborts the attempt to linkup the lost inode.  This
     will always invoke the UNREF error condition  in  Phase
     4.

NO   abort  the attempt to linkup the lost inode.  This will
     always invoke the UNREF error condition in Phase 4.


NNOO SSPPAACCEE LLEEFFTT IINN //lloosstt++ffoouunndd ((EEXXPPAANNDD))
There is no space to add another  entry  to  the  _l_o_s_t_+_f_o_u_n_d
directory  in  the  root directory of the file system.  When
preen'ing the _l_o_s_t_+_f_o_u_n_d directory is expanded.

Possible responses to the EXPAND prompt are:

YES  the _l_o_s_t_+_f_o_u_n_d directory is expanded to make  room  for
     the  new  entry.   If  the  attempted  expansion  fails
     _f_s_c_k___f_f_s prints the message:
     SSOORRRRYY.. NNOO SSPPAACCEE IINN lloosstt++ffoouunndd DDIIRREECCTTOORRYY
     and aborts the attempt to linkup the lost inode.   This
     will  always  invoke the UNREF error condition in Phase









The UNIX File System Check Program                  SMM:3-29


     4.  Clean out unnecessary entries in _l_o_s_t_+_f_o_u_n_d.   This
     error is fatal if the file system is being preen'ed.

NO   abort  the attempt to linkup the lost inode.  This will
     always invoke the UNREF error condition in Phase 4.


DDIIRR II==_I_1 CCOONNNNEECCTTEEDD.. PPAARREENNTT WWAASS II==_I_2
This is an advisory message indicating a directory inode  _I_1
was successfully connected to the _l_o_s_t_+_f_o_u_n_d directory.  The
parent inode _I_2 of the directory inode _I_1 is replaced by the
inode number of the _l_o_s_t_+_f_o_u_n_d directory.


DDIIRREECCTTOORRYY _F LLEENNGGTTHH _S NNOOTT MMUULLTTIIPPLLEE OOFF _B ((AADDJJUUSSTT))
A  directory _F has been found with size _S that is not a mul-
tiple of the directory blocksize  _B  (this  can  reoccur  in
Phase 3 if it is not adjusted in Phase 2).

Possible responses to the ADJUST prompt are:

YES  the length is rounded up to the appropriate block size.
     This error can occur on 4.2BSD file systems.  Thus when
     preen'ing the file system only a warning is printed and
     the directory is adjusted.

NO   ignore the error condition.


BBAADD IINNOODDEE _S TTOO DDEESSCCEENNDD
An internal error has caused an impossible  state  _S  to  be
passed  to  the routine that descends the file system direc-
tory structure.  _F_s_c_k___f_f_s exits.  See a guru.

44..77..  PPhhaassee 44 -- CChheecckk RReeffeerreennccee CCoouunnttss

     This phase concerns itself with the link count informa-
tion  seen in Phase 2 and Phase 3.  This section lists error
conditions resulting from  unreferenced  files,  missing  or
full  _l_o_s_t_+_f_o_u_n_d directory, incorrect link counts for files,
directories, symbolic links, or special files,  unreferenced
files, symbolic links, and directories, and bad or duplicate
blocks in  files,  symbolic  links,  and  directories.   All
errors  in  this phase are correctable if the file system is
being preen'ed except running out of space in the _l_o_s_t_+_f_o_u_n_d
directory.


UUNNRREEFF FFIILLEE II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T ((RREECCOONNNNEECCTT))
Inode _I was not connected to a directory entry when the file
system was traversed.  The owner _O, mode _M, size _S, and mod-
ify  time _T of inode _I are printed.  When preen'ing the file
is cleared if either its size or its  link  count  is  zero,
otherwise it is reconnected.









SMM:3-30                  The UNIX File System Check Program


Possible responses to the RECONNECT prompt are:

YES  reconnect  inode  _I to the file system in the directory
     for lost files (usually _l_o_s_t_+_f_o_u_n_d).  This  may  invoke
     the  _l_o_s_t_+_f_o_u_n_d error condition in Phase 4 if there are
     problems connecting inode _I to _l_o_s_t_+_f_o_u_n_d.

NO   ignore this error condition.  This will  always  invoke
     the CLEAR error condition in Phase 4.


((CCLLEEAARR))
The inode mentioned in the immediately previous error condi-
tion can not be reconnected.  This cannot occur if the  file
system  is  being preen'ed, since lack of space to reconnect
files is a fatal error.

Possible responses to the CLEAR prompt are:

YES  de-allocate the inode mentioned in the immediately pre-
     vious error condition by zeroing its contents.

NO   ignore this error condition.


NNOO lloosstt++ffoouunndd DDIIRREECCTTOORRYY ((CCRREEAATTEE))
There  is  no  _l_o_s_t_+_f_o_u_n_d directory in the root directory of
the file system; When preen'ing _f_s_c_k___f_f_s tries to  create  a
_l_o_s_t_+_f_o_u_n_d directory.

Possible responses to the CREATE prompt are:

YES  create  a  _l_o_s_t_+_f_o_u_n_d directory in the root of the file
     system.  This may raise the message:
     NNOO SSPPAACCEE LLEEFFTT IINN // ((EEXXPPAANNDD))
     See below for the  possible  responses.   Inability  to
     create a _l_o_s_t_+_f_o_u_n_d directory generates the message:
     SSOORRRRYY.. CCAANNNNOOTT CCRREEAATTEE lloosstt++ffoouunndd DDIIRREECCTTOORRYY
     and  aborts the attempt to linkup the lost inode.  This
     will always invoke the UNREF error condition  in  Phase
     4.

NO   abort  the attempt to linkup the lost inode.  This will
     always invoke the UNREF error condition in Phase 4.


lloosstt++ffoouunndd IISS NNOOTT AA DDIIRREECCTTOORRYY ((RREEAALLLLOOCCAATTEE))
The entry for _l_o_s_t_+_f_o_u_n_d is not a directory.

Possible responses to the REALLOCATE prompt are:

YES  allocate a directory inode, and  change  _l_o_s_t_+_f_o_u_n_d  to
     reference  it.   The  previous  inode  reference by the
     _l_o_s_t_+_f_o_u_n_d name is not cleared.  Thus it will either be









The UNIX File System Check Program                  SMM:3-31


     reclaimed  as  an UNREF'ed inode or have its link count
     ADJUST'ed later in this Phase.  Inability to  create  a
     _l_o_s_t_+_f_o_u_n_d directory generates the message:
     SSOORRRRYY.. CCAANNNNOOTT CCRREEAATTEE lloosstt++ffoouunndd DDIIRREECCTTOORRYY
     and  aborts the attempt to linkup the lost inode.  This
     will always invoke the UNREF error condition  in  Phase
     4.

NO   abort  the attempt to linkup the lost inode.  This will
     always invoke the UNREF error condition in Phase 4.


NNOO SSPPAACCEE LLEEFFTT IINN //lloosstt++ffoouunndd ((EEXXPPAANNDD))
There is no space to add another  entry  to  the  _l_o_s_t_+_f_o_u_n_d
directory  in  the  root directory of the file system.  When
preen'ing the _l_o_s_t_+_f_o_u_n_d directory is expanded.

Possible responses to the EXPAND prompt are:

YES  the _l_o_s_t_+_f_o_u_n_d directory is expanded to make  room  for
     the  new  entry.   If  the  attempted  expansion  fails
     _f_s_c_k___f_f_s prints the message:
     SSOORRRRYY.. NNOO SSPPAACCEE IINN lloosstt++ffoouunndd DDIIRREECCTTOORRYY
     and aborts the attempt to linkup the lost inode.   This
     will  always  invoke the UNREF error condition in Phase
     4.  Clean out unnecessary entries in _l_o_s_t_+_f_o_u_n_d.   This
     error is fatal if the file system is being preen'ed.

NO   abort  the attempt to linkup the lost inode.  This will
     always invoke the UNREF error condition in Phase 4.


LLIINNKK CCOOUUNNTT _t_y_p_e II==_I OOWWNNEERR==_O MMOODDEE==_M  SSIIZZEE==_S  MMTTIIMMEE==_T  CCOOUUNNTT==_X
SSHHOOUULLDD BBEE _Y ((AADDJJUUSSTT))
The link count for inode _I, is _X but should be _Y.  The owner
_O, mode _M, size _S, and modify  time  _T  are  printed.   When
preen'ing  the  link  count is adjusted unless the number of
references is increasing,  a  condition  that  should  never
occur  unless  precipitated by a hardware failure.  When the
number  of  references  is  increasing  under  preen   mode,
_f_s_c_k___f_f_s exits with the message:
LLIINNKK CCOOUUNNTT IINNCCRREEAASSIINNGG

Possible responses to the ADJUST prompt are:

YES  replace the link count of file inode _I with _Y.

NO   ignore this error condition.


UUNNRREEFF _t_y_p_e II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T ((CCLLEEAARR))
Inode  _I,  was  not  connected to a directory entry when the
file system was traversed.  The owner _O, mode _M, size _S, and
modify  time _T of inode _I are printed.  When preen'ing, this









SMM:3-32                  The UNIX File System Check Program


is a file that was not connected because its  size  or  link
count was zero, hence it is cleared.

Possible responses to the CLEAR prompt are:

YES  de-allocate inode _I by zeroing its contents.

NO   ignore this error condition.


BBAADD//DDUUPP _t_y_p_e II==_I OOWWNNEERR==_O MMOODDEE==_M SSIIZZEE==_S MMTTIIMMEE==_T ((CCLLEEAARR))
Phase  1  or  Phase  1b  have  found duplicate blocks or bad
blocks associated with inode _I.  The owner _O, mode  _M,  size
_S,  and  modify  time  _T of inode _I are printed.  This error
cannot arise when the file system is being preen'ed,  as  it
would have caused a fatal error earlier.

Possible responses to the CLEAR prompt are:

YES  de-allocate inode _I by zeroing its contents.

NO   ignore this error condition.

44..88..  PPhhaassee 55 -- CChheecckk CCyyll ggrroouuppss

     This  phase  concerns  itself  with  the free-block and
used-inode  maps.   This  section  lists  error   conditions
resulting from allocated blocks in the free-block maps, free
blocks missing from free-block maps,  and  the  total  free-
block  count  incorrect.   It  also  lists  error conditions
resulting from free inodes in the used-inode maps, allocated
inodes  missing  from  used-inode  maps, and the total used-
inode count incorrect.


CCGG _C:: BBAADD MMAAGGIICC NNUUMMBBEERR
The magic number of cylinder group _C is wrong.  This usually
indicates  that the cylinder group maps have been destroyed.
When running manually the cylinder group is marked as  need-
ing  to  be  reconstructed.  This error is fatal if the file
system is being preen'ed.


BBLLKK((SS)) MMIISSSSIINNGG IINN BBIITT MMAAPPSS ((SSAALLVVAAGGEE))
A cylinder group block map  is  missing  some  free  blocks.
During preen'ing the maps are reconstructed.

Possible responses to the SALVAGE prompt are:

YES  reconstruct the free block map.

NO   ignore this error condition.











The UNIX File System Check Program                  SMM:3-33


SSUUMMMMAARRYY IINNFFOORRMMAATTIIOONN BBAADD ((SSAALLVVAAGGEE))
The  summary  information  was  found to be incorrect.  When
preen'ing, the summary information is recomputed.

Possible responses to the SALVAGE prompt are:

YES  reconstruct the summary information.

NO   ignore this error condition.


FFRREEEE BBLLKK CCOOUUNNTT((SS)) WWRROONNGG IINN SSUUPPEERRBBLLOOCCKK ((SSAALLVVAAGGEE))
The superblock free block information was found to be incor-
rect.  When preen'ing, the superblock free block information
is recomputed.

Possible responses to the SALVAGE prompt are:

YES  reconstruct the superblock free block information.

NO   ignore this error condition.

44..99..  CClleeaannuupp

     Once a file system has  been  checked,  a  few  cleanup
functions  are  performed.  This section lists advisory mes-
sages about the file system and modify status  of  the  file
system.


_V ffiilleess,, _W uusseedd,, _X ffrreeee ((_Y ffrraaggss,, _Z bblloocckkss))
This  is an advisory message indicating that the file system
checked contained _V files  using  _W  fragment  sized  blocks
leaving  _X  fragment  sized  blocks free in the file system.
The numbers in parenthesis breaks the free count down into _Y
free fragments and _Z free full sized blocks.


********** RREEBBOOOOTT UUNNIIXX **********
This  is  an  advisory message indicating that the root file
system has been  modified  by  _f_s_c_k___f_f_s_.   If  UNIX  is  not
rebooted  immediately,  the  work  done  by  _f_s_c_k___f_f_s may be
undone by the in-core copies of  tables  UNIX  keeps.   When
preen'ing,  _f_s_c_k___f_f_s  will exit with a code of 4.  The stan-
dard auto-reboot script distributed with  4.3BSD  interprets
an exit code of 4 by issuing a reboot system call.


********** FFIILLEE SSYYSSTTEEMM WWAASS MMOODDIIFFIIEEDD **********
This is an advisory message indicating that the current file
system was modified by _f_s_c_k___f_f_s_.  If  this  file  system  is
mounted  or is the current root file system, _f_s_c_k___f_f_s should
be halted and UNIX rebooted.  If UNIX is not rebooted  imme-
diately,  the work done by _f_s_c_k___f_f_s may be undone by the in-









SMM:3-34                  The UNIX File System Check Program


core copies of tables UNIX keeps.



























































