IBM Books

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

Checking and repairing a file system

The mmfsck command finds and repairs conditions that can cause problems in your file system. The mmfsck command operates in two modes: on-line and off-line. The on-line mode operates on a mounted file system and is chosen by issuing the -o option. Conversely, the off-line mode operates on an unmounted file system.

The on-line mode checks and recovers unallocated blocks on a mounted file system. If a GPFS file operation fails due to an out of space condition, the cause may be disk blocks that have become unavailable after repeated node failures. The corrective action taken is to mark the block free in the allocation map. Any other inconsistencies found are only reported, not repaired.

Notes:

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

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

To repair any other inconsistencies, you must run the off-line mode of the mmfsck command on an unmounted file system. The off-line mode checks for these file inconsistencies that might cause problems:

You cannot run mmfsck on a file system that has disks in a down state. You must first run mmchdisk to change the state of the disks to unrecovered or up. To display the status of the disks in the file system, issue the mmlsdisk command.

For example, to check the file system fs1 and save the report in a file called /tmp/fs1_status without making any changes to the file system, enter:

mmfsck fs1 -n > /tmp/fs1_status

The output written to the fs1_status file is:

Checking "/dev/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
 

See the mmchdisk Command, mmcheckquota Command, mmfsck Command, and mmlsdisk Command for complete usage information.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]