Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fsck(1m) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

crash(1m)

mkfs(1m)

fs(4)

fstab(4)

crash(8)



     fsck(1m)                   DG/UX 4.30                    fsck(1m)



     NAME
          fsck - DG/UX file system consistency check and interactive
          repair

     SYNOPSIS
          /etc/fsck [ -y ] [ -n ] [ -p ] [ -q ] [ -x ] [ -D ] [ -f ] [
          -s ] [ -S ] [ -t scratch_file ] [ special ... ]

     DESCRIPTION
          Fsck checks file systems and corrects inconsistencies.
          Special is the pathname of a special file referring to a
          device containing a file system; the default is the standard
          set of special files listed in /etc/checklist.  If no
          /etc/checklist exists, /etc/fstab is used.

          If you wish to check several file systems at once, omit
          special and specify the -p option.  The /etc/fstab file
          contains a pass number and a mounting status for each file
          system.  When using this file, fsck checks only those file
          systems that have a non-zero pass number and a "rw" or "ro"
          mounting status.  The order of file system checking is based
          on pass number, starting at 1.

          To save time, have fsck check file systems on disks run by
          different controllers on the same pass.  To do this, make
          the pass number for each of these file systems the same in
          /etc/fstab.

        Invoking the Fsck Program
          There are two ways that fsck is invoked:

          Startup script      This is the most common way of invoking
                              fsck.  When you are in multi-user mode
                              bringing up the system with the  init
                              command, you can automatically  execute
                              fsck from within your startup script.

          Command line        From the command line, you type: fsck
                              [options] [filesystem_names].

     OPTIONS
          All options are represented by single-character flags;
          options must begin with a hyphen (-).  All options except
          for -t are boolean flags, and may thus be combined:  fsck
          -pxD, for example.

          The following options are interpreted by fsck:

          -p   Detect all possible inconsistencies, but correct only
               those inconsistencies that may be expected to occur
               from an abnormal system halt.  For each corrected
               inconsistency, one or more lines will be printed



     Licensed material--property of copyright holder(s)         Page 1





     fsck(1m)                   DG/UX 4.30                    fsck(1m)



               identifying the file system and the nature of the
               correction.  Any other inconsistencies will cause the
               check of that file system to fail.  The following 15
               inconsistencies (and only those listed) will be
               corrected for the specified file systems:

               1.   An inode has an incorrect count of the blocks it
                    uses.  The count is corrected.

               2.   An inode is partially truncated.  This can occur
                    if the system is abnormally halted while a file is
                    being truncated, leaving it claiming more data
                    blocks than its size in bytes would require.  The
                    extra blocks are freed.

               3.   A directory has an incorrect child count.  The
                    count is corrected.

               4.   A directory entry exists for an inode which is
                    unallocated.  The directory entry is removed.

               5.   A directory entry's filename length is incorrect.
                    The length is corrected.

               6.   An inode is unreferenced (has no directory entries
                    anywhere in the file system).  The inode is
                    reconnected in the /lost+found directory.

               7.   No /lost+found directory exists, but an inode
                    needs to be reconnected there.  The directory is
                    created.

               8.   The root directory needs to be expanded in order
                    to make room for a directory entry for lost+found.
                    The directory is expanded.

               9.   The /lost+found directory needs to be expanded in
                    order to make room for a directory entry for an
                    inode being reconnected there.  The directory is
                    expanded.

               10.  An inode's link count is incorrect.  The count is
                    corrected.

               11.  The root control point directory's resource
                    accounting (blocks, inodes) is incorrect.  The
                    counts are corrected.

               12.  A disk allocation region (DAR) has an incorrect
                    free-block bitmap.  The bitmap is corrected.

               13.  A DAR has an incorrect free-inode list.  The list



     Licensed material--property of copyright holder(s)         Page 2





     fsck(1m)                   DG/UX 4.30                    fsck(1m)



                    is corrected.

               14.  A DAR has incorrect summary counts of used blocks,
                    inodes or directories.  The counts are corrected.

               15.  The summary counts in the superblock are
                    incorrect.  The counts are corrected.

          -q   Repair the inconsistencies listed under the -p option
               automatically, without asking for user approval.
               Unlike -p, however, more serious inconsistencies will
               not cause fsck to fail;  the user must still answer the
               resulting queries.

          -y   Audit and interactively repair all file system
               inconsistencies assuming a "yes" response to all
               questions asked by fsck.  This option should be used
               with great caution, since it could lead to irreversible
               changes to the filesystem.

          -n   Audit and interactively repair all file system
               inconsistencies, assuming a "no" response to all
               questions asked by fsck.  This option also means that
               all file systems will be opened with read-only intent.

          -x   File systems are examined before being checked.  If a
               file system is marked mountable in its superblock, then
               it is not checked.

          -s   Ignore the actual free-block bitmap and unconditionally
               reconstruct a new one.

          -S   Conditionally reconstruct the free-block bitmap. It is
               reconstructed if and only if the file system is
               consistent.  This option also forces a "no" response to
               all questions.

          -t   Use the specified scratch file for temporary storage if
               fsck cannot obtain enough memory.  The scratch filename
               must be the next argument after -t.

          -D   Directories are checked for bad blocks.

          -f   Fast check:  blocks and sizes are checked; the free
               block bitmap is reconstructed if necessary.

          The following options are mutually exclusive, and use of
          more than one per invocation is not allowed:  -y, -n, -p,
          -q, -S.

        Checking
          Fsck checks for the following inconsistencies:  Checking



     Licensed material--property of copyright holder(s)         Page 3





     fsck(1m)                   DG/UX 4.30                    fsck(1m)



          proceeds without any input from the operator if no errors
          are discovered.  When a fatal inconsistency is discovered,
          no further checking is done on that file system; fsck either
          exits or proceeds to the next specified file system.  When
          an inconsistency is discovered with the -p option, and that
          error is one of those listed under -p, the inconsistency if
          fixed without operator approval.  Any other discoveries of
          inconsistencies require the operator to make a decision.
          The fsck program prompts with its recommended action.  If
          you answer yes, then fsck takes the recommended action.  In
          no case will any damaging action be taken without approval.
          Note, however, that advance approval or disapproval may be
          given by invoking fsck with the -y and -n options,
          respectively.

          The fsck program checks for the following inconsistencies.
          Note that the term "Bad format" refers to system blocks that
          do not have the required self-identification information.

          *    Unreadable or inconsistent superblocks.

          *    Bad format in superblocks.

          *    Invalid contents in superblock's reserved area.

          *    Bad value for superblock's file system size.

          *    Bad value for superblock's DAR size.

          *    Bad value for superblock's inode/DAR density.

          *    Bad value for superblock's default data element size.

          *    Bad value for superblock's default index element size.

          *    Bad value for superblock's default directory data
               element size.

          *    Bad value for superblock's default directory index
               element size.

          *    Bad value for superblock's default first allocation
               threshold.

          *    Bad value for superblock's default second allocation
               threshold.

          *    Bad format in inode table block.

          *    Invalid contents in inode's reserved area.

          *    Files of unknown type.



     Licensed material--property of copyright holder(s)         Page 4





     fsck(1m)                   DG/UX 4.30                    fsck(1m)



          *    Files with bad fragment size.

          *    Files which are partially truncated.

          *    Files claiming impossible blocks.

          *    Files claiming system-area blocks.

          *    Bad Index-block format.

          *    Files with incorrect block counts.

          *    Files claiming already-claimed blocks.

          *    Unallocated root inode.

          *    Bad file type for root.

          *    Incorrect resource limit information in root.

          *    Incorrect parent directory in root.

          *    Directories with "holes" (unallocated blocks before
               end-of-file).

          *    Bad format in directory blocks.

          *    Directories with invalid information in reserved areas.

          *    Directories with empty blocks at end.

          *    Directories with incorrect child counts.

          *    Extra directory entries named "." or "..".

          *    Directory entries with invalid characters in filenames:
               "/" or non-ASCII characters.

          *    Directory entries whose pathnames are too lengthy.

          *    Directory entries that are out of order.

          *    Directory entries with incorrect entry lengths.

          *    Directory entries with incorrect filename lengths.

          *    Extraneous hard links to directories (including cycles
               in file system name space).

          *    Extraneous hard links to symbolic link files.

          *    Directory entries to invalid inodes.



     Licensed material--property of copyright holder(s)         Page 5





     fsck(1m)                   DG/UX 4.30                    fsck(1m)



          *    Directory entries to unallocated inodes.

          *    Files with incorrect space parent.

          *    Unconnected files or directories.

          *    Bad or missing lost+found directories.

          *    Bad lost+found directory entries.

          *    Root or lost+found directories needing expansion.

          *    Files with incorrect link counts.

          *    Incorrect resource allocation counts in control point
               directories.

          *    Bad format in DAR blocks.

          *    Invalid contents in reserved area of DAR blocks.

          *    Incorrect free-block bitmaps in DARs.

          *    Incorrect or incomplete free-inode lists in DARs.

          *    Incorrect DAR summary counts: blocks used, inodes used,
               directories used.

          *    Incorrect superblock summary counts.

          Orphaned files and directories (allocated but unreferenced)
          are, with the operator's concurrence, reconnected by placing
          them in the lost+found directory.  The name assigned is the
          (decimal) inode number preceded by the # character.

          Checking the character-special device (/dev/rdsk/*) is
          almost always faster then checking the block-special device
          (/dev/dsk/*).

     FILES
          /etc/fstab     Default list of file systems to check

     SEE ALSO
          crash(1m), mkfs(1m), fs(4), fstab(4), crash(8)
          Installing and Managing the DG/UX System

     NOTES
          Fsck works sequentially from the pass numbers listed in
          /etc/fstab, that is, it begins at 1 and then runs all other
          passes in order.  There is no way to start an fsck -p at
          pass n, where n is an arbitrary number.




     Licensed material--property of copyright holder(s)         Page 6



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026