]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/doc/smm/03.fsck/0.t
Remove $FreeBSD$: two-line nroff pattern
[FreeBSD/FreeBSD.git] / share / doc / smm / 03.fsck / 0.t
1 .\" Copyright (c) 1986, 1993
2 .\"  The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"     @(#)0.t 8.1 (Berkeley) 6/8/93
28 .\"
29 .if n .ND
30 .TL
31 Fsck_ffs \- The UNIX\(dg File System Check Program
32 .EH 'SMM:3-%''The \s-2UNIX\s+2 File System Check Program'
33 .OH 'The \s-2UNIX\s+2 File System Check Program''SMM:3-%'
34 .AU
35 Marshall Kirk McKusick
36 .AI
37 Computer Systems Research Group
38 Computer Science Division
39 Department of Electrical Engineering and Computer Science
40 University of California, Berkeley
41 Berkeley, CA  94720
42 .AU
43 T. J. Kowalski
44 .AI
45 Bell Laboratories
46 Murray Hill, New Jersey 07974
47 .AB
48 .FS
49 \(dgUNIX is a trademark of Bell Laboratories.
50 .FE
51 .FS
52 This work was done under grants from
53 the National Science Foundation under grant MCS80-05144,
54 and the Defense Advance Research Projects Agency (DoD) under
55 Arpa Order No. 4031 monitored by Naval Electronic System Command under
56 Contract No. N00039-82-C-0235.
57 .FE
58 This document reflects the use of
59 .I fsck_ffs
60 with the 4.2BSD and 4.3BSD file system organization.  This
61 is a revision of the
62 original paper written by
63 T. J. Kowalski.
64 .PP
65 File System Check Program (\fIfsck_ffs\fR)
66 is an interactive file system check and repair program.
67 .I Fsck_ffs
68 uses the redundant structural information in the
69 UNIX file system to perform several consistency checks.
70 If an inconsistency is detected, it is reported
71 to the operator, who may elect to fix or ignore
72 each inconsistency.
73 These inconsistencies result from the permanent interruption
74 of the file system updates, which are performed every
75 time a file is modified.
76 Unless there has been a hardware failure,
77 .I fsck_ffs
78 is able to repair corrupted file systems
79 using procedures based upon the order in which UNIX honors
80 these file system update requests.
81 .PP
82 The purpose of this document is to describe the normal updating
83 of the file system,
84 to discuss the possible causes of file system corruption,
85 and to present the corrective actions implemented
86 by
87 .I fsck_ffs.
88 Both the program and the interaction between the
89 program and the operator are described.
90 .sp 2
91 .LP
92 Revised October 7, 1996
93 .AE
94 .LP
95 .bp
96 .ce
97 .B "TABLE OF CONTENTS"
98 .LP
99 .sp 1
100 .nf
101 .B "1.  Introduction"
102 .LP
103 .sp .5v
104 .nf
105 .B "2.  Overview of the file system
106 2.1.    Superblock
107 2.2.    Summary Information
108 2.3.    Cylinder groups
109 2.4.    Fragments
110 2.5.    Updates to the file system
111 .LP
112 .sp .5v
113 .nf
114 .B "3.  Fixing corrupted file systems
115 3.1.    Detecting and correcting corruption
116 3.2.    Super block checking
117 3.3.    Free block checking
118 3.4.    Checking the inode state
119 3.5.    Inode links
120 3.6.    Inode data size
121 3.7.    Checking the data associated with an inode
122 3.8.    File system connectivity
123 .LP
124 .sp .5v
125 .nf
126 .B Acknowledgements
127 .LP
128 .sp .5v
129 .nf
130 .B References
131 .LP
132 .sp .5v
133 .nf
134 .B "4.  Appendix A
135 4.1.     Conventions
136 4.2.     Initialization
137 4.3.     Phase 1 - Check Blocks and Sizes
138 4.4.     Phase 1b - Rescan for more Dups
139 4.5.     Phase 2 - Check Pathnames
140 4.6.     Phase 3 - Check Connectivity
141 4.7.     Phase 4 - Check Reference Counts
142 4.8.     Phase 5 - Check Cyl groups
143 4.9.     Cleanup
144 .ds RH Introduction
145 .bp