当前位置:首页>Linux>Linux启动报错XFS (dm-0) Internal error XFS_WANT_CORRUPTED_GOTO at line 1662 of file解决方法

Linux启动报错XFS (dm-0) Internal error XFS_WANT_CORRUPTED_GOTO at line 1662 of file解决方法

  • 2026-10-11 06:24:01
Linux启动报错XFS (dm-0) Internal error XFS_WANT_CORRUPTED_GOTO at line 1662 of file解决方法
一、问题描述
昨天早上一客户来电说他们机房突然断电了,有台CentOS 7.6 Linux服务器还没来得急关机,UPS就没电了,然后电工解决断电问题后,那台Linux服务器开机启动报错,进不了系统。让我去现场帮忙解决下。
二、问题分析
异常断电导致文件系统出错了。
三、解决方法
方法一:
一般启用LVM的系统分区,/dev/mapper下软链接都指向/dev/dm-0,所以这个错误会直接进入一个只有内核的急救模式。
1、确认报错的dm-0是否是系统分区
ls -l /dev/mapper
2、修复XFS文件系统
常规修复
xfs_repair /dev/mapper/centos-root

如果报错:xfs_repair: cannot open /dev/dm-0: Device or resource busy,则先卸载系统分区,再执行修复。

umount /dev/mapper/centos-root

如果执行常规修复出现以下提示,添加-L参数强制修复

xfs_repair -L /dev/mapper/centos-root或者xfs_repair -v -L /dev/dm-0
3、重启系统
reboot
方法二:
如果内核急救模式失败,可以尝试进入单用户模式。
1、进入单用户模式
服务器前面板开机按钮长按强制关机,等30秒再开机,在grub菜单时,按“e”键进入编辑模式,找到linux16或linux开头的行,在rhgb quiet后面添加rd.break,然后按Ctrl + X启动到单用户模式。
2、确认报错的dm-0是否是系统分区
ls -l /dev/mapper
3、卸载分区
因为dm-0是系统分区,所以要先卸载。
umount /sysroot
4、修复XFS文件系统
xfs_repair /dev/mapper/dm-0#如果报以下错提示无法修复,则添加-L参数忽略不正确的元数据Phase 1 - find and verify superblock...Phase 2 - using internal log        - zero log...ERROR: The filesystem has valuable metadata changes in a log which needs tobe replayed.  Mount the filesystem to replay the log, and unmount it beforere-running xfs_repair.  If you are unable to mount the filesystem, then usethe -L option to destroy the log and attempt a repair.Note that destroying the log may cause corruption -- please attempt a mountof the filesystem before doing this.xfs_repair -L /dev/mapper/dm-0
5、重启系统
reboot

最新文章

随机文章