Centos 7 LVM xfs文件系统修复

时间:2024-04-14 13:10:22

情况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"

Centos 7 LVM xfs文件系统修复

 

 

Centos 7 LVM xfs文件系统修复

 

 

如果是LVM管理分区的

1. ls -l /dev/mapper

2.xfs_repair /dev/mapper/centos-root  【若无效,请执行mount /dev/mapper/centos-root】

3.xfs_repair -L /dev/mapper/centos-root

4.重启: 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

 

1. ls -l /dev/mapper

2. mkdir /mnt

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

4. umount /mnt

5. xfs_repair /dev/mapper/centos-root # 或 xfs_repair /dev/dm-0

6. init 6 (reboot重启系统)


原文链接:https://blog.****.net/qq_35161159/article/details/86471859

参考:https://blog.****.net/runming56/article/details/81016404