Translated message

A translation of this page exists in English.

无法挂载或检查 XFS 文件系统

Solution In Progress - Updated -

Issue

  • XFS 文件系统挂起,运行 xfs_repair -nv /dev/sda1 时返回以下错误:
# xfs_repair -n /dev/sda1
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed. Mount the filesystem to replay the log, and unmount it before
re-running xfs_check. If you are unable to mount the filesystem, then use
the xfs_repair -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.

备注 :用于发布 xfs_check 工具的旧 xfsprogs 版本,但它非常慢,且不能为大型文件系统进行很好的扩展。因此,它已被弃用,取而代之的是 xfs_repair -n

  • 在以上场景中,文件系统也不会被挂载:
# mount /dev/sda1 /mountpoint/
mount: Structure needs cleaning
  • 最后的手段是运行 xfs_repair -L,这将清理事务日志中的条目,并最终允许文件系统被挂载。
kernel: XFS internal error XFS_WANT_CORRUPTED_GOTO at line 1572 of file fs/xfs/xfs_alloc.c.  Caller 0xffffffff88871969
kernel: 
kernel: Call Trace:
kernel:  [<ffffffff8886fe2f>] :xfs:xfs_free_ag_extent+0x19e/0x67e
kernel:  [<ffffffff88871969>] :xfs:xfs_free_extent+0xa9/0xc9
kernel:  [<ffffffff8887a755>] :xfs:xfs_bmap_finish+0xee/0x15f
kernel:  [<ffffffff88899927>] :xfs:xfs_itruncate_finish+0x185/0x2af
kernel:  [<ffffffff888b1001>] :xfs:xfs_inactive+0x1de/0x40f
kernel:  [<ffffffff888bb8c1>] :xfs:xfs_fs_clear_inode+0xa4/0xeb
kernel:  [<ffffffff80022eee>] clear_inode+0xd2/0x123
kernel:  [<ffffffff8002f3ec>] generic_delete_inode+0xde/0x143
kernel:  [<ffffffff8003c716>] do_unlinkat+0xd5/0x141
kernel:  [<ffffffff8005d229>] tracesys+0x71/0xe0
kernel:  [<ffffffff8005d28d>] tracesys+0xd5/0xe0
kernel: 
kernel: xfs_force_shutdown(sda1,0x8) called from line 4269 of file fs/xfs/xfs_bmap.c.  Return address = 0xffffffff8887a78a
kernel: Filesystem "sda1": Corruption of in-memory data detected.  Shutting down filesystem: sdm1
kernel: Please umount the filesystem, and rectify the problem(s)
kernel: nfsd: non-standard errno: 5

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • XFS 文件系统

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