我的数据库磁盘有问题,它是 xfs 文件系统。我尝试修复
[root@scan /]# xfs_repair /dev/md127
xfs_repair: cannot open /dev/md127: Device or resource busy
[root@scan /]# ls /data
ls: cannot access /data: Input/output error
和 dmesg
[35749034.608871] XFS (md127): Metadata corruption detected at xfs_inode_buf_verify+0x142/0x150 [xfs], xfs_inode block 0x410 xfs_inode_buf_verify
[35749034.610913] XFS (md127): Unmount and run xfs_repair
[35749034.611909] XFS (md127): First 128 bytes of corrupted metadata buffer:
[35749034.612903] 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[35749034.613902] 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[35749034.614885] 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[35749034.615569] 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[35749034.616161] 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[35749034.616747] 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[35749034.617320] 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[35749034.617888] 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[35749034.618482] XFS (md127): metadata I/O error in "xfs_trans_read_buf_map" at daddr 0x410 len 16 error 117
[35749034.620782] XFS (md127): xfs_do_force_shutdown(0x1) called from line 325 of file fs/xfs/xfs_trans_buf.c. Return address = 00000000bbf8b06c
[35749034.620785] XFS (md127): I/O Error Detected. Shutting down filesystem
[35749034.622724] XFS (md127): Please unmount the filesystem and rectify the problem(s)
[35749034.624653] XFS (md127): xfs_imap_to_bp: xfs_trans_read_buf() returned error -117.
答案1
似乎有些进程仍在使用/data
文件系统。您需要停止所有使用 /data 的进程,然后尝试修复。
- 检查
lsof | grep /data
输出并可能使用保存的文件停止/终止进程/data
。 - 使用 卸载文件系统
umount /data
。 - 然后使用修复/数据
xfs_repair
。