我正在尝试解决多个数据库引擎崩溃以及从磁盘读取时日志提示损坏的问题,因此我在包含文件的 2TB NVMe 上运行 xfs_repair。
然而程序立即运行,这似乎不正确,这肯定需要一些时间才能运行?
# time xfs_repair /dev/nvme1n1
Phase 1 - find and verify superblock...
Phase 2 - using internal log
- zero log...
- scan filesystem freespace and inode maps...
- found root inode chunk
Phase 3 - for each AG...
- scan and clear agi unlinked lists...
- process known inodes and perform inode discovery...
- agno = 0
- agno = 1
- agno = 2
- agno = 3
- process newly discovered inodes...
Phase 4 - check for duplicate blocks...
- setting up duplicate extent list...
- check for inodes claiming duplicate blocks...
- agno = 0
- agno = 3
- agno = 2
- agno = 1
Phase 5 - rebuild AG headers and trees...
- reset superblock...
Phase 6 - check inode connectivity...
- resetting contents of realtime bitmap and summary inodes
- traversing filesystem ...
- traversal finished ...
- moving disconnected inodes to lost+found ...
Phase 7 - verify and correct link counts...
done
real 0m0.060s
user 0m0.033s
sys 0m0.025s
答案1
对于计算机来说,0.06 秒是相当长的时间……
xfs_repair 不会读取数据,它会对文件系统元数据进行完整性检查。数据库可能只有少量文件,也就是少量元数据 I/O。这有助于 NVMe 存储通常速度很快。是的,xfs_repair 在显示完成时即完成。
找到损坏问题的根源并不容易。寻求愿意与您一起查看块转储的数据库和文件系统支持的帮助。有时,谜团可能很长时间都无法解决,可能需要修复存储硬件、恢复或重建数据,然后就此打住。