1 | .TH mmfsck 02/16/06 |
---|
2 | mmfsck Command |
---|
3 | .SH "Name" |
---|
4 | .PP |
---|
5 | \fBmmfsck\fR - Checks and repairs a GPFS file system. |
---|
6 | .SH "Synopsis" |
---|
7 | .PP |
---|
8 | \fBmmfsck\fR \fIDevice\fR [\fB-n\fR | |
---|
9 | \fB-y\fR] [\fB-c\fR | \fB-o\fR] [\fB-t\fR |
---|
10 | \fIDirectory\fR] [\fB-v\fR | \fB-V\fR] |
---|
11 | [\fB-N\fR |
---|
12 | {\fINode\fR[,\fINode\fR...] | |
---|
13 | \fINodeFile\fR | \fINodeClass\fR}] |
---|
14 | .PP |
---|
15 | The file system must be unmounted before you can run the \fBmmfsck\fR |
---|
16 | command with any option other than \fB-o\fR. |
---|
17 | .PP |
---|
18 | \fBDescription\fR |
---|
19 | .PP |
---|
20 | The \fBmmfsck\fR command in offline mode is intended to be used only in |
---|
21 | situations where there have been disk or communications failures that have |
---|
22 | caused \fBMMFS_FSSTRUCT\fR error log entries to be issued, or where it is |
---|
23 | known that disks have been forcibly removed or otherwise permanently |
---|
24 | unavailable for use in the file system, and other unexpected symptoms are seen |
---|
25 | by users. In general it is unnecessary to run \fBmmfsck\fR in |
---|
26 | offline mode unless under the direction of the IBM Support Center. |
---|
27 | .PP |
---|
28 | If neither the \fB-n\fR nor \fB-y\fR flag is specified, the |
---|
29 | \fBmmfsck\fR command runs interactively prompting you for permission to |
---|
30 | repair each consistency error as reported. It is suggested that in all |
---|
31 | but the most severely damaged file systems, you run the \fBmmfsck\fR |
---|
32 | command interactively (the default). |
---|
33 | .PP |
---|
34 | The occurrence of I/O errors, or the appearance of a message telling you to |
---|
35 | run the \fBmmfsck\fR command, may indicate file system |
---|
36 | inconsistencies. If either situation occurs, use the \fBmmfsck\fR |
---|
37 | command to check file system consistency and interactively repair the file |
---|
38 | system. |
---|
39 | .PP |
---|
40 | The \fBmmfsck\fR command checks for these inconsistencies: |
---|
41 | .RS +3 |
---|
42 | .HP 3 |
---|
43 | \(bu Blocks marked allocated that do not belong to any file. The |
---|
44 | corrective action is to mark the block free in the allocation map. |
---|
45 | .HP 3 |
---|
46 | \(bu |
---|
47 | Files for which an inode is allocated and no directory entry exists (orphaned |
---|
48 | files). The corrective action is to create directory entries for these |
---|
49 | files in a \fBlost+found\fR subdirectory at the root of this file |
---|
50 | system. The index number of the inode is assigned as the name. |
---|
51 | If you do not allow the \fBmmfsck\fR command to reattach an orphaned file, |
---|
52 | it asks for permission to delete the file. |
---|
53 | .HP 3 |
---|
54 | \(bu Directory entries pointing to an inode that is not allocated. The |
---|
55 | corrective action is to remove the directory entry. |
---|
56 | .HP 3 |
---|
57 | \(bu Incorrectly formed directory entries. A directory file contains the |
---|
58 | inode number and the generation number of the file to which it refers. |
---|
59 | When the generation number in the directory does not match the generation |
---|
60 | number stored in the file's inode, the corrective action is to remove the |
---|
61 | directory entry. |
---|
62 | .HP 3 |
---|
63 | \(bu Incorrect link counts on files and directories. The corrective |
---|
64 | action is to update them with accurate counts. |
---|
65 | .HP 3 |
---|
66 | \(bu Cycles in the directory structure. The corrective action is to |
---|
67 | break any detected cycles. If the cycle was a disconnected cycle, the |
---|
68 | new top level directory is moved to the \fBlost+found\fR directory. |
---|
69 | .HP 3 |
---|
70 | \(bu Invalid policy files. The corrective action is to delete the |
---|
71 | file. |
---|
72 | .HP 3 |
---|
73 | \(bu The \fBmmfsck\fR command checks that each fileset has a root |
---|
74 | directory, that each linked fileset has exactly one valid junction pointing to |
---|
75 | it, and that no junctions point to unlinked filesets. In addition, the |
---|
76 | metadata file of the filesets are checked for consistency with respect to the |
---|
77 | inode of the file system. |
---|
78 | .RE |
---|
79 | .PP |
---|
80 | If you are repairing a file system due to node failure and the file system |
---|
81 | has quotas enabled, it is suggested that you run the \fBmmcheckquota\fR command to recreate the quota |
---|
82 | files. |
---|
83 | .PP |
---|
84 | Indications leading you to the conclusion that you should run the |
---|
85 | \fBmmfsck\fR command include: |
---|
86 | .RS +3 |
---|
87 | .HP 3 |
---|
88 | 1. |
---|
89 | An \fBMMFS_FSSTRUCT\fR along with an \fBMMFS_SYSTEM_UNMOUNT\fR error log |
---|
90 | entry on any node indicating some critical piece of the file system is |
---|
91 | inconsistent. |
---|
92 | .HP 3 |
---|
93 | 2. Disk media failures |
---|
94 | .HP 3 |
---|
95 | 3. Partial disk failure |
---|
96 | .HP 3 |
---|
97 | 4. \fBEVALIDATE=214\fR, Invalid checksum or other consistency check |
---|
98 | failure on a disk data structure, reported in error logs or returned to an |
---|
99 | application. |
---|
100 | .RE |
---|
101 | .PP |
---|
102 | For further information on recovery actions and how to contact the IBM |
---|
103 | Support Center, see the |
---|
104 | \fIGeneral Parallel File |
---|
105 | System: Problem Determination Guide\fR. |
---|
106 | .PP |
---|
107 | If you are running the online \fBmmfsck\fR command to free allocated |
---|
108 | blocks that do not belong to any files, plan to make file system repairs when |
---|
109 | system demand is low. This is an I/O intensive activity and it can |
---|
110 | affect system performance. |
---|
111 | .PP |
---|
112 | \fBResults\fR |
---|
113 | .PP |
---|
114 | If the file system is inconsistent, the \fBmmfsck\fR command displays |
---|
115 | information about the inconsistencies and (depending on the option entered) |
---|
116 | may prompt you for permission to repair them. The \fBmmfsck\fR |
---|
117 | command tries to avoid actions that may result in loss of data. In some |
---|
118 | cases, however, it may indicate the destruction of a damaged file. |
---|
119 | .PP |
---|
120 | If there are no file system inconsistencies to detect, the \fBmmfsck\fR |
---|
121 | command reports this information for the file system: |
---|
122 | .RS +3 |
---|
123 | .HP 3 |
---|
124 | \(bu Number of files |
---|
125 | .HP 3 |
---|
126 | \(bu Used blocks |
---|
127 | .HP 3 |
---|
128 | \(bu Free blocks |
---|
129 | .RE |
---|
130 | .PP |
---|
131 | All corrective actions, with the exception of recovering lost disk blocks |
---|
132 | (blocks that are marked as allocated but do not belong to any file), require |
---|
133 | that the file system be unmounted on all nodes. If the \fBmmfsck\fR |
---|
134 | command is run on a mounted file system, lost blocks are recovered but any |
---|
135 | other inconsistencies are only reported, not repaired. |
---|
136 | .PP |
---|
137 | If a bad disk is detected, the \fBmmfsck\fR command stops the disk and |
---|
138 | writes an entry to the error log. The operator must manually start and |
---|
139 | resume the disk when the problem is fixed. |
---|
140 | .PP |
---|
141 | The file system must be unmounted on all nodes before the \fBmmfsck\fR |
---|
142 | command can repair file system inconsistencies. |
---|
143 | .SH "Parameters" |
---|
144 | .PP |
---|
145 | .RS +3 |
---|
146 | \fB\fIDevice\fR |
---|
147 | \fR |
---|
148 | .RE |
---|
149 | .RS +9 |
---|
150 | The device name of the file system to be checked and repaired. File |
---|
151 | system names need not be fully-qualified. \fBfs0\fR is as acceptable |
---|
152 | as \fB/dev/fs0\fR. |
---|
153 | .PP |
---|
154 | This must be the first parameter. |
---|
155 | .RE |
---|
156 | .PP |
---|
157 | .RS +3 |
---|
158 | \fB-N {\fINode\fR[,\fINode\fR...] | |
---|
159 | \fINodeFile\fR | \fINodeClass\fR} |
---|
160 | \fR |
---|
161 | .RE |
---|
162 | .RS +9 |
---|
163 | Specify the nodes to participate in the check and repair of the file |
---|
164 | system. This command supports all defined node classes. The |
---|
165 | default is \fBall\fR (all nodes in the GPFS cluster will participate in the |
---|
166 | check and repair of the file system). |
---|
167 | .PP |
---|
168 | For information on how to specify node names, see \fISpecifying nodes as input to GPFS commands\fR |
---|
169 | in \fIGPFS: Administration and Programming Reference\fR. |
---|
170 | .RE |
---|
171 | .SH "Options" |
---|
172 | .PP |
---|
173 | .RS +3 |
---|
174 | \fB-c |
---|
175 | \fR |
---|
176 | .RE |
---|
177 | .RS +9 |
---|
178 | When the file system log has been lost and the file system is |
---|
179 | replicated, this option specifies that the \fBmmfsck\fR command attempt |
---|
180 | corrective action by comparing the replicas of metadata and data. If |
---|
181 | this error condition occurs, it is indicated by an error log entry. The |
---|
182 | \fB-c\fR and \fB-o\fR flags are mutually exclusive. |
---|
183 | .RE |
---|
184 | .PP |
---|
185 | .RS +3 |
---|
186 | \fB-n |
---|
187 | \fR |
---|
188 | .RE |
---|
189 | .RS +9 |
---|
190 | Specifies a \fBno\fR response to all prompts from the \fBmmfsck\fR |
---|
191 | command. The option reports inconsistencies but it does not change the |
---|
192 | file system. To save this information, redirect it to an output file |
---|
193 | when you issue the \fBmmfsck\fR command. |
---|
194 | .RE |
---|
195 | .PP |
---|
196 | .RS +3 |
---|
197 | \fB-o |
---|
198 | \fR |
---|
199 | .RE |
---|
200 | .RS +9 |
---|
201 | Specifies that the file system can be mounted during the operation |
---|
202 | of the \fBmmfsck\fR command. Online mode does not perform a full |
---|
203 | file system consistency check, but blocks marked as allocated that do not |
---|
204 | belong to a file are recovered. The \fB-c\fR and \fB-o\fR flags |
---|
205 | are mutually exclusive. |
---|
206 | .RE |
---|
207 | .PP |
---|
208 | .RS +3 |
---|
209 | \fB-y |
---|
210 | \fR |
---|
211 | .RE |
---|
212 | .RS +9 |
---|
213 | Specifies a \fByes\fR response to all prompts from the \fBmmfsck\fR |
---|
214 | command. Use this option only on severely damaged file systems. |
---|
215 | It allows the \fBmmfsck\fR command to take any action necessary for |
---|
216 | repairs. |
---|
217 | .RE |
---|
218 | .PP |
---|
219 | .RS +3 |
---|
220 | \fB-t \fIDirectory\fR |
---|
221 | \fR |
---|
222 | .RE |
---|
223 | .RS +9 |
---|
224 | Specifies the directory to be used for temporary storage during |
---|
225 | \fBmmfsck\fR command processing. The default directory is |
---|
226 | \fB/tmp\fR. The minimum space required (in byes) is equal to the |
---|
227 | maximum number of inodes in the file system multiplied by 8. |
---|
228 | .RE |
---|
229 | .PP |
---|
230 | .RS +3 |
---|
231 | \fB-v |
---|
232 | \fR |
---|
233 | .RE |
---|
234 | .RS +9 |
---|
235 | Specifies the output is verbose. |
---|
236 | .RE |
---|
237 | .PP |
---|
238 | .RS +3 |
---|
239 | \fB-V |
---|
240 | \fR |
---|
241 | .RE |
---|
242 | .RS +9 |
---|
243 | Specifies the output is verbose and contain information for debugging |
---|
244 | purposes. |
---|
245 | .RE |
---|
246 | .SH "Exit status" |
---|
247 | .PP |
---|
248 | .PP |
---|
249 | .RS +3 |
---|
250 | \fB0 |
---|
251 | \fR |
---|
252 | .RE |
---|
253 | .RS +9 |
---|
254 | Successful completion. |
---|
255 | .RE |
---|
256 | .PP |
---|
257 | .RS +3 |
---|
258 | \fB2 |
---|
259 | \fR |
---|
260 | .RE |
---|
261 | .RS +9 |
---|
262 | The command was interrupted before it completed checks or repairs. |
---|
263 | .RE |
---|
264 | .PP |
---|
265 | .RS +3 |
---|
266 | \fB4 |
---|
267 | \fR |
---|
268 | .RE |
---|
269 | .RS +9 |
---|
270 | The command changed the file system and it must now be restarted. |
---|
271 | .RE |
---|
272 | .PP |
---|
273 | .RS +3 |
---|
274 | \fB8 |
---|
275 | \fR |
---|
276 | .RE |
---|
277 | .RS +9 |
---|
278 | The file system contains damage that has not been repaired. |
---|
279 | .RE |
---|
280 | .SH "Security" |
---|
281 | .PP |
---|
282 | You must have root authority to run the \fBmmfsck\fR command. |
---|
283 | .PP |
---|
284 | You may issue the \fBmmfsck\fR command from any node in the GPFS |
---|
285 | cluster. |
---|
286 | .PP |
---|
287 | When using the \fBrcp\fR and \fBrsh\fR commands for remote |
---|
288 | communication, a properly configured \fB.rhosts\fR file must exist |
---|
289 | in the root user's home directory on each node in the GPFS |
---|
290 | cluster. If you have designated the use of a different remote |
---|
291 | communication program on either the |
---|
292 | \fBmmcrcluster\fR |
---|
293 | or the |
---|
294 | \fBmmchcluster\fR command, you must |
---|
295 | ensure: |
---|
296 | .RS +3 |
---|
297 | .HP 3 |
---|
298 | 1. Proper authorization is granted to all nodes in the GPFS cluster. |
---|
299 | .HP 3 |
---|
300 | 2. The nodes in the GPFS cluster can communicate without the use of a |
---|
301 | password, and without any extraneous messages. |
---|
302 | .RE |
---|
303 | .SH "Examples" |
---|
304 | .RS +3 |
---|
305 | .HP 3 |
---|
306 | 1. To run the \fBmmfsck\fR command on the \fBfs1\fR file system, |
---|
307 | receive a report, but not fix inconsistencies, issue this command: |
---|
308 | .sp |
---|
309 | .nf |
---|
310 | mmfsck fs1 -n |
---|
311 | .fi |
---|
312 | .sp |
---|
313 | The system displays information similar to: |
---|
314 | .sp |
---|
315 | .nf |
---|
316 | Checking "fs1" |
---|
317 | Checking inodes |
---|
318 | Checking inode map file |
---|
319 | Checking directories and files |
---|
320 | Checking log files |
---|
321 | Checking extended attributes file |
---|
322 | Checking allocation summary file |
---|
323 | Checking policy file |
---|
324 | Validated policy 'for stripe group fs1': parsed 3 Placement |
---|
325 | Rules, 0 Migrate/Delete/Exclude Rules |
---|
326 | Checking filesets metadata |
---|
327 | Checking file reference counts |
---|
328 | Checking file system replication status |
---|
329 | 1212416 inodes |
---|
330 | 87560 allocated |
---|
331 | 0 repairable |
---|
332 | 0 repaired |
---|
333 | 0 damaged |
---|
334 | 0 deallocated |
---|
335 | 0 orphaned |
---|
336 | 0 attached |
---|
337 | 7211746 subblocks |
---|
338 | 227650 allocated |
---|
339 | 0 unreferenced |
---|
340 | 0 deletable |
---|
341 | 0 deallocated |
---|
342 | 44504 addresses |
---|
343 | 0 suspended |
---|
344 | File system is clean. |
---|
345 | .fi |
---|
346 | .sp |
---|
347 | \fBmmfsck\fR found no inconsistencies in this file system. |
---|
348 | .HP 3 |
---|
349 | 2. To run the \fBmmfsck\fR command on the \fB/dev/fs2\fR file system, |
---|
350 | receive a report, and fix inconsistencies, issue this command: |
---|
351 | .sp |
---|
352 | .nf |
---|
353 | mmfsck /dev/fs2 -y\ |
---|
354 | .fi |
---|
355 | .sp |
---|
356 | The system displays information similar to: |
---|
357 | .sp |
---|
358 | .nf |
---|
359 | Checking "/dev/fs2" |
---|
360 | Checking inodes |
---|
361 | Checking inode map file |
---|
362 | Checking directories and files |
---|
363 | Checking log files |
---|
364 | Checking extended attributes file |
---|
365 | Checking file reference counts |
---|
366 | File inode 6912 is not referenced by any directory. |
---|
367 | Reattach inode to lost+found? yes |
---|
368 | Checking file system replication status |
---|
369 | 33792 inodes |
---|
370 | 46 allocated |
---|
371 | 0 repairable |
---|
372 | 0 repaired |
---|
373 | 0 damaged |
---|
374 | 0 deallocated |
---|
375 | 1 orphaned |
---|
376 | 1 attached |
---|
377 | 3332520 subblocks |
---|
378 | 19762 allocated |
---|
379 | 0 unreferenced |
---|
380 | 0 deletable |
---|
381 | 0 deallocated |
---|
382 | 728 addresses |
---|
383 | 0 suspended |
---|
384 | File system is clean. |
---|
385 | .fi |
---|
386 | .sp |
---|
387 | .RE |
---|
388 | .SH "See also" |
---|
389 | .PP |
---|
390 | mmcheckquota Command |
---|
391 | .PP |
---|
392 | mmcrfs Command |
---|
393 | .PP |
---|
394 | mmdelfs Command |
---|
395 | .PP |
---|
396 | mmdf Command |
---|
397 | .PP |
---|
398 | mmlsfs Command |
---|
399 | .SH "Location" |
---|
400 | .PP |
---|
401 | \fB/usr/lpp/mmfs/bin\fR |
---|
402 | .PP |
---|