source: gpfs_3.1_ker2.6.20/share/man/man8/mmfsck.8 @ 90

Last change on this file since 90 was 16, checked in by rock, 17 years ago
File size: 11.2 KB
Line 
1.TH mmfsck 02/16/06
2mmfsck 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
15The file system must be unmounted before you can run the \fBmmfsck\fR
16command with any option other than \fB-o\fR.
17.PP
18\fBDescription\fR
19.PP
20The \fBmmfsck\fR command in offline mode is intended to be used only in
21situations where there have been disk or communications failures that have
22caused \fBMMFS_FSSTRUCT\fR error log entries to be issued, or where it is
23known that disks have been forcibly removed or otherwise permanently
24unavailable for use in the file system, and other unexpected symptoms are seen
25by users. In general it is unnecessary to run \fBmmfsck\fR in
26offline mode unless under the direction of the IBM Support Center.
27.PP
28If neither the \fB-n\fR nor \fB-y\fR flag is specified, the
29\fBmmfsck\fR command runs interactively prompting you for permission to
30repair each consistency error as reported. It is suggested that in all
31but the most severely damaged file systems, you run the \fBmmfsck\fR
32command interactively (the default).
33.PP
34The occurrence of I/O errors, or the appearance of a message telling you to
35run the \fBmmfsck\fR command, may indicate file system
36inconsistencies. If either situation occurs, use the \fBmmfsck\fR
37command to check file system consistency and interactively repair the file
38system.
39.PP
40The \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
44corrective action is to mark the block free in the allocation map.
45.HP 3
46\(bu
47Files for which an inode is allocated and no directory entry exists (orphaned
48files). The corrective action is to create directory entries for these
49files in a \fBlost+found\fR subdirectory at the root of this file
50system. The index number of the inode is assigned as the name.
51If you do not allow the \fBmmfsck\fR command to reattach an orphaned file,
52it asks for permission to delete the file.
53.HP 3
54\(bu Directory entries pointing to an inode that is not allocated. The
55corrective action is to remove the directory entry.
56.HP 3
57\(bu Incorrectly formed directory entries. A directory file contains the
58inode number and the generation number of the file to which it refers.
59When the generation number in the directory does not match the generation
60number stored in the file's inode, the corrective action is to remove the
61directory entry.
62.HP 3
63\(bu Incorrect link counts on files and directories. The corrective
64action is to update them with accurate counts.
65.HP 3
66\(bu Cycles in the directory structure. The corrective action is to
67break any detected cycles. If the cycle was a disconnected cycle, the
68new 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
71file.
72.HP 3
73\(bu The \fBmmfsck\fR command checks that each fileset has a root
74directory, that each linked fileset has exactly one valid junction pointing to
75it, and that no junctions point to unlinked filesets. In addition, the
76metadata file of the filesets are checked for consistency with respect to the
77inode of the file system.
78.RE
79.PP
80If you are repairing a file system due to node failure and the file system
81has quotas enabled, it is suggested that you run the \fBmmcheckquota\fR command to recreate the quota
82files.
83.PP
84Indications leading you to the conclusion that you should run the
85\fBmmfsck\fR command include:
86.RS +3
87.HP 3
881.
89An \fBMMFS_FSSTRUCT\fR along with an \fBMMFS_SYSTEM_UNMOUNT\fR error log
90entry on any node indicating some critical piece of the file system is
91inconsistent.
92.HP 3
932. Disk media failures
94.HP 3
953. Partial disk failure
96.HP 3
974. \fBEVALIDATE=214\fR, Invalid checksum or other consistency check
98failure on a disk data structure, reported in error logs or returned to an
99application.
100.RE
101.PP
102For further information on recovery actions and how to contact the IBM
103Support Center, see the
104\fIGeneral Parallel File
105System: Problem Determination Guide\fR.
106.PP
107If you are running the online \fBmmfsck\fR command to free allocated
108blocks that do not belong to any files, plan to make file system repairs when
109system demand is low. This is an I/O intensive activity and it can
110affect system performance.
111.PP
112\fBResults\fR
113.PP
114If the file system is inconsistent, the \fBmmfsck\fR command displays
115information about the inconsistencies and (depending on the option entered)
116may prompt you for permission to repair them. The \fBmmfsck\fR
117command tries to avoid actions that may result in loss of data. In some
118cases, however, it may indicate the destruction of a damaged file.
119.PP
120If there are no file system inconsistencies to detect, the \fBmmfsck\fR
121command 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
131All 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
133that the file system be unmounted on all nodes. If the \fBmmfsck\fR
134command is run on a mounted file system, lost blocks are recovered but any
135other inconsistencies are only reported, not repaired.
136.PP
137If a bad disk is detected, the \fBmmfsck\fR command stops the disk and
138writes an entry to the error log. The operator must manually start and
139resume the disk when the problem is fixed.
140.PP
141The file system must be unmounted on all nodes before the \fBmmfsck\fR
142command can repair file system inconsistencies.
143.SH "Parameters"
144.PP
145.RS +3
146\fB\fIDevice\fR
147\fR
148.RE
149.RS +9
150The device name of the file system to be checked and repaired. File
151system names need not be fully-qualified. \fBfs0\fR is as acceptable
152as \fB/dev/fs0\fR.
153.PP
154This 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
163Specify the nodes to participate in the check and repair of the file
164system. This command supports all defined node classes. The
165default is \fBall\fR (all nodes in the GPFS cluster will participate in the
166check and repair of the file system).
167.PP
168For information on how to specify node names, see \fISpecifying nodes as input to GPFS commands\fR
169in \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
178When the file system log has been lost and the file system is
179replicated, this option specifies that the \fBmmfsck\fR command attempt
180corrective action by comparing the replicas of metadata and data. If
181this 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
190Specifies a \fBno\fR response to all prompts from the \fBmmfsck\fR
191command. The option reports inconsistencies but it does not change the
192file system. To save this information, redirect it to an output file
193when you issue the \fBmmfsck\fR command.
194.RE
195.PP
196.RS +3
197\fB-o
198\fR
199.RE
200.RS +9
201Specifies that the file system can be mounted during the operation
202of the \fBmmfsck\fR command. Online mode does not perform a full
203file system consistency check, but blocks marked as allocated that do not
204belong to a file are recovered. The \fB-c\fR and \fB-o\fR flags
205are mutually exclusive.
206.RE
207.PP
208.RS +3
209\fB-y
210\fR
211.RE
212.RS +9
213Specifies a \fByes\fR response to all prompts from the \fBmmfsck\fR
214command. Use this option only on severely damaged file systems.
215It allows the \fBmmfsck\fR command to take any action necessary for
216repairs.
217.RE
218.PP
219.RS +3
220\fB-t \fIDirectory\fR
221\fR
222.RE
223.RS +9
224Specifies 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
227maximum 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
235Specifies the output is verbose.
236.RE
237.PP
238.RS +3
239\fB-V
240\fR
241.RE
242.RS +9
243Specifies the output is verbose and contain information for debugging
244purposes.
245.RE
246.SH "Exit status"
247.PP
248.PP
249.RS +3
250\fB0
251\fR
252.RE
253.RS +9
254Successful completion.
255.RE
256.PP
257.RS +3
258\fB2
259\fR
260.RE
261.RS +9
262The 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
270The 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
278The file system contains damage that has not been repaired.
279.RE
280.SH "Security"
281.PP
282You must have root authority to run the \fBmmfsck\fR command.
283.PP
284You may issue the \fBmmfsck\fR command from any node in the GPFS
285cluster.
286.PP
287When using the \fBrcp\fR and \fBrsh\fR commands for remote
288communication, a properly configured \fB.rhosts\fR file must exist
289in the root user's home directory on each node in the GPFS
290cluster. If you have designated the use of a different remote
291communication program on either the
292\fBmmcrcluster\fR
293or the
294\fBmmchcluster\fR command, you must
295ensure:
296.RS +3
297.HP 3
2981. Proper authorization is granted to all nodes in the GPFS cluster.
299.HP 3
3002. The nodes in the GPFS cluster can communicate without the use of a
301password, and without any extraneous messages.
302.RE
303.SH "Examples"
304.RS +3
305.HP 3
3061. To run the \fBmmfsck\fR command on the \fBfs1\fR file system,
307receive a report, but not fix inconsistencies, issue this command:
308.sp
309.nf
310mmfsck fs1 -n
311.fi
312.sp
313The system displays information similar to:
314.sp
315.nf
316Checking "fs1"
317Checking inodes
318Checking inode map file
319Checking directories and files
320Checking log files
321Checking extended attributes file
322Checking allocation summary file
323Checking policy file
324Validated policy 'for stripe group fs1': parsed 3 Placement
325Rules, 0 Migrate/Delete/Exclude Rules
326Checking filesets metadata
327Checking file reference counts
328Checking 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
344File system is clean.
345.fi
346.sp
347\fBmmfsck\fR found no inconsistencies in this file system.
348.HP 3
3492. To run the \fBmmfsck\fR command on the \fB/dev/fs2\fR file system,
350receive a report, and fix inconsistencies, issue this command:
351.sp
352.nf
353mmfsck /dev/fs2 -y\
354.fi
355.sp
356The system displays information similar to:
357.sp
358.nf
359Checking "/dev/fs2"
360Checking inodes
361Checking inode map file
362Checking directories and files
363Checking log files
364Checking extended attributes file
365Checking file reference counts
366File inode 6912 is not referenced by any directory.
367Reattach inode to lost+found? yes
368Checking 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
384File system is clean.
385.fi
386.sp
387.RE
388.SH "See also"
389.PP
390mmcheckquota Command
391.PP
392mmcrfs Command
393.PP
394mmdelfs Command
395.PP
396mmdf Command
397.PP
398mmlsfs Command
399.SH "Location"
400.PP
401\fB/usr/lpp/mmfs/bin\fR
402.PP
Note: See TracBrowser for help on using the repository browser.