自学内容网 自学内容网

Linux运维篇-Centos7出现Internal error XFS_WANT_CORRUPTED_GOTO at line ……错误

报错信息:

xfs(sda3):Internal error XFS_WANT_CORRUPTED_GOTO at line 1635 of file xf/xfs/libxfs/xfs_alloc.c. Caller xfs_free_extent+0xfc/0x130[xfs]
XFS(sda3):Internal error xfs_trans_cancel at line 984 of file ..........................................

故障原因:

打开操作系统发现i/o错误,对操作系统进行强制重启,进入单用户模式,并显示上面的报错信息。
在这里插入图片描述

故障定位

xfs文件系统损坏。需要对xfs文件系统进行修复。
开始的思路为挂镜像进入救援模式启动,想查看文件系统是否可读,进入救援模式后找不到文件系统,因此还是需要在单用户模式进行修复操作。

修复方法:

xfs_repair 修复对象

Options:
-f The device is a file
-L Force log zeroing. Do this as a last resort.
-l logdev Specifies the device where the external log resides.
-m maxmem Maximum amount of memory to be used in megabytes.
-n No modify mode, just checks the filesystem for damage.
-P Disables prefetching.
-r rtdev Specifies the device where the realtime section resides.
-v Verbose output.
-c subopts Change filesystem parameters - use xfs_admin.
-o subopts Override default behaviour, refer to man page.
-t interval Reporting interval in minutes.
-d Repair dangerously.
-V Reports version and exits.

这里最主要的就是确定需要修复的是哪个文件系统,从log或者报错中提取信息。
在这里插入图片描述
/run/initfamfs/rdsosreport.txt是启动过程文件,里面详细记录了启动过程中的所有信息,可以从文件中进行查找。
在这里屏幕有打印主要的错误信息,可以直接确定修复对象就是sda3。

修复过程

直接使用xfs_repair /dev/sda3进行修复。

在这里插入图片描述
如果出现上面的报错,则需要使用xfs_repair -L /dev/sda3进行强制修复。

修复完成直接reboot就好,我这里有惊无险,修复成功,没有丢任何数据。


原文地址:https://blog.csdn.net/qq_52494169/article/details/143019527

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!