Centos 7 LVM xfs文件系统修复

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


如果是LVM管理分区的

1. ls -l /dev/mapper

2.xfs_repair /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重启系统)

猜你喜欢

转载自blog.csdn.net/qq_35161159/article/details/86471859