|
|
The generic format of the
fsck(ADM)
command follows:
fsck [-F fstyp] [-V] [-m] [special . . . ]
fsck [-F fstyp] [-V] [-o specific_options] [special . . . ]
fsck [-F fstyp] [-V] [-PLbyw] [special . . .]
The -F option specifies the fstyp on which the command must act. If fstyp is not specified it is determined from /etc/default/filesys by matching an entry in that file with the special specified. If this fails, heuristics similiar to those used by fstyp(ADM) are used to determine the filesystem type.
The -V option causes the command to echo the completed command line. The echoed line will include additional information derived from /etc/default/filesys. This option can be used to verify and validate the command line. It does not cause the command to execute.
The -m option performs a sanity check only. This option is usually used before mounting filesystems because it lets the administrator know whether the file system needs to be checked.
The -o option specifies fstyp-specific options if any. specific_options are options specified in a comma-separated list of keywords and/or keyword-attribute pairs for interpretation by the fstyp-specific module of the command.
A fast fsck(ADM) is becoming increasingly desirable because of the growing need for online transaction processing and for quick filesystem recovery. Implementing a parallel fsck causes concern about maximizing the speed and efficiency of the command while avoiding collision and synchronization problems. An example of a bad collision would be the simultaneous checking of several filesystems that lie on the same disk.
Parallelism is implemented via the -P option. The gain in speed from fsck -P depends on the number and size of the filesystems and disks being checked, as well as on the distribution of these different filesystems and filesystem types on the available disks.
The -P option automatically audits and interactively repairs inconsistent conditions for all filesystems in /etc/default/filesys in parallel. It uses the ``fsckpass'' field of /etc/default/filesys to create a list of filesystems that need checking on separate disks. This field indicates on which spindle a filesystem resides. The filesystems are then scheduled for checking such that each disk has one filesystem being checked on that disk at a given time. A check on one filesystem does not depend on a check of another filesystem executing on another disk to complete.
``-'' in the filesystem's ``fsckpass'' field indicates that it is not checked. All other pass numbers are at the system administrator's discretion. The ``fsckpass'' field is initially filled in at installation time by an architecture-dependent routine, setvfspass. The system administrator can tune the algorithm that setvfspass employs by altering the ``fsckpass'' if necessar y.
After all the files in /etc/default/filesys have been checked, the parent fsck process spawns single-threaded fscks interactively on each individual filesystem that could not be fixed through the standard procedures.
The -P option supports these suboptions:
See also: