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 tool to repair 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, while running xfs_repair, it wasn't able to finish 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 10
  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6 (with the Scalable File System Add-on)
  • Red Hat Enterprise Linux 5.6+ (with the Scalable File System Add-on)
  • XFS Filesystem

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