IBM Books

IBM General Parallel File System for AIX: Administration and Programming Reference

mmfsck Command

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:

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.

Results

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:

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:

In an HACMP environment:

  1. 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:
    1. Proper authorization is granted to all nodes in the GPFS cluster.
    2. The nodes in the GPFS cluster can communicate without the use of a password.
  2. You may issue the mmfsck command from any node in the GPFS cluster.

Examples

  1. 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.
  2. 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 ]