When nodes fail with the file system mounted, file system journaling allows fast recovery. However, if a storage device loses power or is physically disconnected, file system corruption may occur. (Journaling cannot be used to recover from storage subsystem failures.) When that type of corruption occurs, the GFS file system can be recovered by using the gfs_fsck command.
The gfs_fsck command must only be run on a file system that is unmounted from all nodes.
Note | |
---|---|
On nodes running Red Hat GFS 6.0 for Red Hat Enterprise Linux 3 Update 5 and later, the gfs_fsck command has changed from previous releases of Red Hat GFS in the following ways:
Refer to the gfs_fsck man page, gfs_fsck(8), for additional information about other command options. |
gfs_fsck -y BlockDevice |
The -y flag causes all questions to be answered with yes. With the -y specified, the gfs_fsck does not prompt you for an answer before making changes.
Specifies the block device where the GFS file system resides.
In this example, the GFS file system residing on block device /dev/pool/pool0 is repaired. All queries to repair are automatically answered with yes.
gfs_fsck -y /dev/pool/pool0 |