How long does it take to fsck.gfs2 or capture the metadata for a gfs or gfs2 file system on RHEL?

Solution Verified - Updated

Environment

  • Red Hat Cluster Suite 4+ and Red Hat GFS 6.1
  • Red Hat Enterprise Linux Server 5, 6, 7 (with the High Availability and Resilient Storage Add Ons)
  • Red Hat Global File System

Issue

  • How long does it take to fsck.gfs2 or capture the metadata for a gfs or gfs2 file system on RHEL?
  • How long will running a filesystem check (fsck) take on a gfs or gfs2 file system?
  • Is it safe to interrupt/cancel filesystem check on gfs or gfs2 filesystem?

Resolution

  • It is impossible to estimate how long an fsck on a gfs or gfs2 file system is going to take.
  • It is impossible to estimate how long it will take to capture the metadata for a gfs2 filesystem when running the command gfs2_edit savemeta.

If the fsck output indicated that it has not yet modified data on disk then it can be quit via ctrl-c. If the fsck has begun modifying data then it is recommended that it be allowed to finish regardless of how long it may take.

If there is a limited outage window to complete an fsck of a gfs or gfs2 filesystem then reverting back to a backup or SAN snapshot is a workable alternative. We recommend that fsck is ran to completion.

For more information on fsck.gfs2 and capturing metadata for gfs2 filesystem see the following article: How can I recover from a GFS2 withdrawal and fix any filesystem corruption that might exist in a Red Hat Enterprise Linux 5, 6, or 7 Resilient Storage cluster?

Root Cause

The time that a gfs or gfs2 file system check may take is a function of a number of interdependent factors listed below. Due to this complex set of factors, and their uniqueness from user to user, an estimate is impossible. A gfs2 filesystem checks with fsck can take hours or minutes.:

  • Resource group count
  • Resource group size
  • Number of inodes on disk
  • Size of file system
  • Number of journals
  • Nature and extent of damage
  • The type of hardware that gfs2 filesystem is stored on and the type of hardware that is connected to the storage.

Diagnostic Steps

Red Hat is constantly improving fsck's speed and type of damage that is fixed on the gfs2 and gfs filesystem. Ensure that the system performing the check has the latest version of gfs2-utils and gfs-utils installed that provides the fsck utility for gfs2 and gfs filesystems.

SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.