icon Top 9 categories map      RocketAware > man pages >


Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.

The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Search all pages


By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Integer, Floating point, Matrix, Statistics, Boolean, ...

Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...


RocketLink!--> Man page versions: OpenBSD NetBSD

FSCK_EXT2FS(8)          OpenBSD System Manager's Manual         FSCK_EXT2FS(8)

     fsck_ext2fs - Second Extended File System consistency check and interac-
     tive repair

     fsck_ext2fs [-b block#] [-c level] [-d] [-f] [-m mode] [-p] [-y] [-n]
                 filesystem ...

     Fsck_ext2fs performs interactive filesystem consistency checks and repair
     for each of the filesystems specified on the command line. It is normally
     invoked from fsck(8).

     The kernel takes care that only a restricted class of innocuous filesys-
     tem inconsistencies can happen unless hardware or software failures in-
     tervene.  These are limited to the following:

     Unreferenced inodes
     Link counts in inodes too large
     Missing blocks in the free map
     Blocks in the free map also in files
     Counts in the super-block wrong

     These are the only inconsistencies that fsck_ext2fs in ``preen'' mode
     (with the -p option) will correct; if it encounters other inconsisten-
     cies, it exits with an abnormal return status.  For each corrected incon-
     sistency one or more lines will be printed identifying the filesystem on
     which the correction will take place, and the nature of the correction.
     After successfully correcting a filesystem, fsck_ext2fs will print the
     number of files on that filesystem and the number of used and free

     If sent a QUIT signal, fsck_ext2fs will finish the filesystem checks,
     then exit with an abnormal return status.

     Without the -p option, fsck_ext2fs audits and interactively repairs in-
     consistent conditions for filesystems.  If the filesystem is inconsistent
     the operator is prompted for concurrence before each correction is at-
     tempted.  It should be noted that some of the corrective actions which
     are not correctable under the -p option will result in some loss of data.
     The amount and severity of data lost may be determined from the diagnos-
     tic output.  The default action for each consistency correction is to
     wait for the operator to respond yes or no. If the operator does not have
     write permission on the filesystem fsck_ext2fs will default to a -n ac-

     The following flags are interpreted by fsck_ext2fs.

     -b      Use the block specified immediately after the flag as the super
             block for the filesystem.  Block 8193 is usually an alternate su-
             per block.

     -d      Print debugging output.

     -f      Force checking of file systems.  Normally, if a file system is
             cleanly unmounted, the kernel will set a ``clean flag'' in the
             file system superblock, and fsck_ext2fs will not check the file
             system.  This option forces fsck_ext2fs to check the file system,
             regardless of the state of the clean flag.

     -m      Use the mode specified in octal immediately after the flag as the
             permission bits to use when creating the lost+found directory
             rather than the default 1777.  In particular, systems that do not
             wish to have lost files accessible by all users on the system
             should use a more restrictive set of permissions such as 700.

     -n      Assume a no response to all questions asked by fsck_ext2fs except
             for `CONTINUE?', which is assumed to be affirmative; do not open
             the filesystem for writing.

     -p      Specify ``preen'' mode, described above.

     -y      Assume a yes response to all questions asked by fsck_ext2fs; this
             should be used with great caution as this is a free license to
             continue after essentially unlimited trouble has been encoun-

     Inconsistencies checked are as follows:
     1.   Blocks claimed by more than one inode or the free map.
     2.   Blocks claimed by an inode outside the range of the filesystem.
     3.   Incorrect link counts.
     4.   Size checks:
          Directory size not a multiple of filesystem block size.
          Partially truncated file.
     5.   Bad inode format.
     6.   Blocks not accounted for anywhere.
     7.   Directory checks:
          File pointing to unallocated inode.
          Inode number out of range.
          Dot or dot-dot not the first two entries of a directory or having
          the wrong inode number.
     8.   Super Block checks:
          More blocks for inodes than there are in the filesystem.
          Bad free block map format.
          Total free block and/or free inode count incorrect.

     Orphaned files and directories (allocated but unreferenced) are, with the
     operator's concurrence, reconnected by placing them in the lost+found di-
     rectory.  The name assigned is the inode number.  If the lost+found di-
     rectory does not exist, it is created.  If there is insufficient space
     its size is increased.

     Because of inconsistencies between the block device and the buffer cache,
     the raw device should always be used.

     The diagnostics produced by fsck_ext2fs are fully enumerated and ex-
     plained in Appendix A of Fsck - The UNIX File System Check Program.

     fstab(5),  fs(5),  fsdb(8),  newfs(8),  reboot(8),  fsck(8)

OpenBSD 2.3                      June 13, 1997                               2

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.

(Corrections, notes, and links courtesy of RocketAware.com)

[Detailed Topics]
OpenBSD sources for fsck_ext2fs(8)

[Overview Topics]

Up to: File System Operations - Operations for entire file-systems (quotas, configuration, consistency, mount, unmount, et al)

RocketLink!--> Man page versions: OpenBSD NetBSD

Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > fsck_ext2fs.8/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments