原因:

拷贝文件时,vsphere虚拟机卡死,无法连接。

经检查控制台也无法登录。重启虚拟机然后报下图

665a2b77ed435c8b53b5921fcbb34cee.png

然后执行journalctl显示如下

705b838ebf5da78f7ac04bae87499aaa.png

系统messages日志

91b2b8907d7ff20d8d6e694767f1acc8.png

原因查找中。。。

解决方案

重启后图1的位置输入如下两条命令

1 xfs_repair -L /dev/centos/root

2

3 init 6

然后进入虚拟机bios,关闭软盘

2b9a6e6c4876ec8bf041f7b4eacb9d37.png

解决方法参考:

情况1:

[sda] Assuming drive cache: write through

Internal error xfs XFS_WANT_CORRUPTED_GOTO at line 1662 of file fs/xfs/libxfs/xfs_alloc.c Caller xfs_free_extent+0x130 [xfs]

Internal error xfs_trans_cancel at line 990 of file fs/xfs/xfs_trans.c.Caller xlog_recover_process_efi +0x16b/0x190 [xfs]

Corruption of in-memory data detected. Shutting down filesystem

Please umount the filesystem and rectify the problem(s)

Failed to recover EFIs

Generating "/run/initramfs/rdsosreport.txt"

6631717577074729786.png

1242993497254559790.png

如果是LVM管理分区的

ls -l /dev/mapper

xfs_repair /dev/mapper/cl_muban-root

若提示

5717526435133165717.png

xfs_repair -L /dev/mapper/cl_muban-root

最后重启

init 6

情况2:

[sda] Assuming drive cache: write through

Metadata corruption detected at xfs_agi_read_verify+0x5e/0x110 [xfs], xfs_agi block 0x2

Unmount and run xfs_repair

First 64 bytes of corrupted metadata buffer:

XFS (dm-0):metadata I/O error: block 0x2 ("xfs_trans_read_buf_map") error 117 numblks 1

6608211117982412867.png

6597848220891154185.png

6631496575237644547.png

6608252899424258356.png

修复步骤:

ls -l /dev/mapper

mkdir /mnt

mount /dev/mapper/cl_muban-root /mnt   # 这里也可以操作 提示中的 dm-0 (即 /dev/dm-0,其实/dev/mapper/cl_muban-root是链接到 /dev/dm-0  )

umount /mnt

xfs_repair /dev/mapper/cl_muban-root   # 或 xfs_repair  /dev/dm-0

init 6 (reboot重启系统)

xfs_repair使用方法:

xfs_repair -h

xfs_repair: invalid option -- 'h'

Usage: xfs_repair [options] device

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.

708cbb02a8a9c2dfa950bd7d3fc62e49.gif

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐