Cannot repair XFS file system because xfs_repair is killed by oom-killer
Issue
- After observed the message which indicates metadata corruption, tried to run
xfs_repairtool 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 becauseoom-killerkills 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.