Cannot repair XFS file system because xfs_repair is killed by oom-killer

Solution Verified - Updated -

Issue

After observed the message which indicates metadata corruption, tried to run xfs_repair to the XFS filesystem.

 kernel: XFS (dm-1): Metadata corruption detected at xfs_inode_buf_verify+xxxx/xxxx [xfs], xfs_inode block xxxxxxxxxxxx
 kernel: XFS (dm-1): Unmount and run xfs_repair

However, when executing xfs_repair, xfs_repair cannot normally terminate because oom-killer kills it due to huge usage of the memory for the repair.

 kernel: Out of memory: Kill process 38396 (xfs_repair) score 880 or sacrifice child
 kernel: Killed process 38396 (xfs_repair) total-vm:90359352kB, anon-rss:61674516kB, file-rss:752kB, shmem-rss:0kB

Environment

  • Red Hat Enterprise Linux 6 onwards
  • xfs_repair

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content