IBM General Parallel File System for AIX: Administration and Programming Reference
Name
mmfsck - Checks and repairs a GPFS file system.
Synopsis
mmfsck Device [-n | -y]
[-c] [-o] [-t
Directory] [-v | -V]
The file system must be unmounted before you can run mmfsck with
any option other than -o.
Description
If neither -n nor -y is specified, mmfsck runs
interactively prompting you for permission to repair each consistency error as
reported.
- Note:
- It is suggested that in all but the most severely damaged file systems, you
should run interactively (the default).
The occurrence of input/output errors, or the appearance of a message
telling you to run the mmfsck command, may indicate file system
inconsistencies. Should either situation occur, use the mmfsck
command to check file system consistency and interactively repair the file
system.
mmfsck checks for these inconsistencies:
- Blocks marked allocated that do not belong to any file. The
corrective action is to mark the block free in the allocation map.
- Files for which an inode is allocated and no directory entry exists
(orphaned files). The corrective action is to create directory entries
for these files in a lost+found subdirectory at the root of this file
system. The index number of the inode is assigned as the name.
If you do not allow mmfsck to reattach an orphaned file, it asks for
permission to destroy the file.
- Directory entries pointing to an inode that is not allocated. The
corrective action is to remove the directory entry.
- Ill-formed directory entries. A directory file contains the inode
number and the generation number of the file to which it refers. When
the generation number in the directory does not match the generation number
stored in the file's inode, the corrective action is to remove the
directory entry.
- Incorrect link counts on files and directories. The corrective
action is to update them with accurate counts.
- Cycles in the directory structure. The corrective action is to
break any detected cycles. If the cycle was a disconnected cycle, the
new top level directory is moved to the lost+found directory.
If you are repairing a file system due to node failure and the file system
has quotas enabled, it is suggested that you run mmcheckquota to recreate the quota files.
If you are running on-line mmfsck to free
allocated blocks that do not belong to any files, plan to make file system
repairs when system demand is low. This is I/O intensive activity and
it can affect system performance.
If the file system is inconsistent, the mmfsck command displays
information about the inconsistencies and (depending on the option entered)
may prompt you for permission to repair them. mmfsck tries to
avoid actions that may result in loss of data. In some cases, however,
it may recommend the destruction of a damaged file.
If there are no file system inconsistencies to detect, mmfsck
reports this information for the file system:
- Number of files
- Used blocks
- Free blocks
All corrective actions, with the exception of recovering lost disk blocks
(blocks that are marked as allocated but do not belong to any file), require
that the file system be unmounted on all nodes. If mmfsck is
run on a mounted file system, lost blocks are recovered but any other
inconsistencies are only reported, not repaired.
If a bad disk is detected, mmfsck stops the disk and writes an
entry to the error log. The operator must manually start and resume the
disk when the problem is fixed.
Parameters
- Device
- The device name of the file system to be checked and repaired. File
system names need not be fully qualified. fs0 is as acceptable
as /dev/fs0.
This must be the first parameter.
- Note:
- The file system must be unmounted on all nodes before mmfsck can
repair file system inconsistencies.
Options
- -c
- When the file system log has been lost and the file system is replicated,
this option specifies that mmfsck attempt corrective action by
comparing the replicas of metadata and data. If this error condition
occurs, it is indicated by an error log entry.
- -n
- Specifies a no response to all prompts from
mmfsck. -n reports inconsistencies but it does not
change the file system. To save this information, redirect it to an
output file when you enter the mmfsck command.
- -y
- Specifies a yes response to all prompts from
mmfsck. Use this option only on severely damaged file
systems. It allows mmfsck to take any action necessary for
repairs.
- -o
- Specifies that the file system can be mounted during the operation of the
mmfsck command. On-line mode does not perform a full file
system consistency check, but blocks marked as allocated that do not belong to
a file are recovered.
- -t Directory
- Specifies the directory to be used for temporary storage during
mmfsck processing. The default directory is
/tmp. The minimum space required is equal to 8 bytes x the
maximum number of inodes in the file system.
- -v
- Specifies the output should be verbose.
- -V
- Specifies the output should be verbose and contain information for
debugging purposes.
Exit status
- 0
- Successful completion.
- 2
- The command was interrupted before it completed checks or repairs.
- 4
- The command changed the file system and it must now be restarted.
- 8
- The file system contains unrepaired damage.
Security
You must have root authority to run the mmfsck command.
In an SP environment:
- Verify the authentication method set for SP security services:
- If your authentication method is set to compatibility, Kerberos
authentication is required. Issue the k4init command.
- If your authentication method is set to DCE, dce_login
authentication is required.
- If your authentication method is set to NONE/std, there must be an entry
in the /etc/sysctl.mmcmd.acl file on every node in
the nodeset for the root user at every other node in the nodeset.
For further information, see the latest IBM Parallel System
Support Programs for AIX: Administration Guide, IBM Parallel
System Support Programs for AIX: Command and Technical Reference,
and RS/6000: Planning Volume 2, Control Workstation and Software
Environment manuals at www.rs6000.ibm.com/resource/aix_resource/sp_books/pssp.
Search for information on sysctl.
- You may issue the mmfsck command from any node running GPFS or
the CWS.
- If you are executing the mmfsck command from the CWS on a
multi-partitioned system, the SP_NAME environment variable must be
properly set. It is suggested that you use a separate window for each
partition and set the environment variable accordingly. For further
information, see the IBM Parallel
System Support Programs for AIX: Administration Guide and
search for understanding system partitioning.
In an HACMP environment:
- When using rcp and rsh for remote communication, a
properly configured /.rhosts file must exist in the root
user's home directory on each node in the GPFS cluster. If you
have designated the use of a different remote communication program on either
the mmcrcluster or the mmchcluster command, you must insure:
- Proper authorization is granted to all nodes in the GPFS cluster.
- The nodes in the GPFS cluster can communicate without the use of a
password.
- You may issue the mmfsck command from any node in the GPFS
cluster.
Examples
- To run mmfsck on the fs1 file system, receive a report,
but not fix inconsistencies, enter:
mmfsck fs1 -n
The system displays information similar to:
Checking "fs1"
Checking inodes
Checking directories and files
Checking log files
Processing inodes
7680 inodes
907 allocated
0 repairable
0 repaired
0 damaged
0 deallocated
0 orphaned
0 attached
823296 subblocks
38211 allocated
0 unreferenced
0 deletable
0 deallocated
File system is clean
mmfsck found no inconsistencies in this file system.
- To run mmfsck on the /dev/fs2 file system, receive a report, and
fix inconsistencies, enter:
mmfsck /dev/fs2 -y
The system displays information similar to:
Checking "/dev/fs2"
Checking inodes
block allocation map is modified.
429 allocated subblocks (actual)
1805 allocated subblocks (on disk)
Flush to disk? yes
Checking directory
Checking log files
Processing inodes
Freeing deallocated inodes
2555 inodes
65 allocated
0 repairable
0 repaired
0 damaged
0 deallocated
0 orphaned
0 attached
46080 subblocks
461 allocated
4736 unreferenced
0 deletable
0 deallocated
55 directory files
0 deletable
0 deleted
file system has been repaired
See also
mmcheckquota Command
mmcrfs Command
mmdelfs Command
mmdf Command
mmlsfs Command
Location
/usr/lpp/mmfs/bin
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]