29.01.2013 Views

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Checking <strong>and</strong> repairing a file system<br />

In general it is unnecessary to run mmfsck in offline mode unless under the direction of the IBM ®<br />

Support<br />

Center.<br />

The mmfsck comm<strong>and</strong> finds <strong>and</strong> repairs conditions that can cause problems in your file system. The<br />

mmfsck comm<strong>and</strong> operates in two modes: online <strong>and</strong> offline. The online mode operates on a mounted file<br />

system <strong>and</strong> is chosen by issuing the -o option. Conversely, the offline mode operates on an unmounted<br />

file system.<br />

The online mode checks <strong>and</strong> recovers unallocated blocks on a mounted file system. If a <strong>GPFS</strong> file<br />

operation fails due to an out of space condition, the cause may be disk blocks that have become<br />

unavailable after repeated node failures. The corrective action taken is to mark the block free in the<br />

allocation map. Any other inconsistencies found are only reported, not repaired.<br />

Notes:<br />

1. If you are running the online mmfsck comm<strong>and</strong> to free allocated blocks that do not belong to any files,<br />

plan to make file system repairs when system dem<strong>and</strong> is low. This is I/O intensive activity <strong>and</strong> it can<br />

affect system performance.<br />

2. If you are repairing a file system due to node failure <strong>and</strong> the file system has quotas enabled, it is<br />

suggested that you run the mmcheckquota comm<strong>and</strong> to recreate the quota files.<br />

To repair any other inconsistencies, you must run the offline mode of the mmfsck comm<strong>and</strong> on an<br />

unmounted file system. The offline mode checks for these file inconsistencies that might cause problems:<br />

v Blocks marked allocated that do not belong to any file. The corrective action is to mark the block free in<br />

the allocation map.<br />

v Files <strong>and</strong> directories for which an inode is allocated <strong>and</strong> no directory entry exists, known as orphaned<br />

files. The corrective action is to create directory entries for these files in a lost+found subdirectory in<br />

the root directory of the fileset to which the file or directory belongs. A fileset is a subtree of a file<br />

system namespace that in many respects behaves like an independent file system. The index number<br />

of the inode is assigned as the name. If you do not allow the mmfsck comm<strong>and</strong> to reattach an<br />

orphaned file, it asks for permission to delete the file.<br />

v Directory entries pointing to an inode that is not allocated. The corrective action is to remove the<br />

directory entry.<br />

v Incorrectly formed directory entries. A directory file contains the inode number <strong>and</strong> the generation<br />

number of the file to which it refers. When the generation number in the directory does not match the<br />

generation number stored in the file’s inode, the corrective action is to remove the directory entry.<br />

v Incorrect link counts on files <strong>and</strong> directories. The corrective action is to update them with accurate<br />

counts.<br />

v Invalid policy files. The corrective action is to delete the file.<br />

v Various problems related to filesets: missing or corrupted fileset metadata, inconsistencies in directory<br />

structure related to filesets, missing or corrupted fileset root directory, other problems in internal data<br />

structures.<br />

The mmfsck comm<strong>and</strong> performs other functions not listed here, as deemed necessary by <strong>GPFS</strong>.<br />

You cannot run the mmfsck comm<strong>and</strong> on a file system that has disks in a down state. You must first run<br />

the mmchdisk comm<strong>and</strong> to change the state of the disks to unrecovered or up. To display the status of<br />

the disks in the file system, issue the mmlsdisk comm<strong>and</strong>.<br />

For example, to check the file system fs1 without making any changes to the file system, enter:<br />

mmfsck fs1<br />

The system displays information similar to:<br />

16 <strong>GPFS</strong>: <strong>Administration</strong> <strong>and</strong> <strong>Programming</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!