ls:读取目录‘.’:输入/输出错误

ls:读取目录‘.’:输入/输出错误

计算机一直运行正常,直到今天早上我发现硬盘(用 RAID0 制成的两个 4TB 磁盘mdadm)出现输入/输出错误。

ls我进入目录时,我看到了:

ls: reading directory '.': Input/output error

进一步检查 dmseg 发现访问我的磁盘 md127 会导致一些警告和错误:

[5789751.027967] EXT4-fs warning (device md127): htree_dirblock_to_tree:994: inode #184288528: lblock 2: comm rg: error -5 reading directory block
[5789751.027970] EXT4-fs warning (device md127): htree_dirblock_to_tree:994: inode #184288528: lblock 2: comm rg: error -5 reading directory block
[5789751.027973] EXT4-fs warning (device md127): htree_dirblock_to_tree:994: inode #161822641: lblock 7: comm cp: error -5 reading directory block
[5789751.027975] EXT4-fs warning (device md127): htree_dirblock_to_tree:994: inode #184288528: lblock 2: comm rg: error -5 reading directory block
[5789751.027976] EXT4-fs warning (device md127): htree_dirblock_to_tree:994: inode #184288528: lblock 2: comm rg: error -5 reading directory block
[5789751.027979] EXT4-fs warning (device md127): htree_dirblock_to_tree:994: inode #184288528: lblock 2: comm rg: error -5 reading directory block
[5789751.027982] EXT4-fs warning (device md127): htree_dirblock_to_tree:994: inode #184288528: lblock 2: comm rg: error -5 reading directory block
[5789751.027986] EXT4-fs warning (device md127): htree_dirblock_to_tree:994: inode #184288528: lblock 2: comm rg: error -5 reading directory block
[5789751.027987] EXT4-fs warning (device md127): htree_dirblock_to_tree:994: inode #161822641: lblock 7: comm cp: error -5 reading directory block
[5789751.027989] EXT4-fs warning (device md127): htree_dirblock_to_tree:994: inode #184288528: lblock 2: comm rg: error -5 reading directory block

阅读这篇文章后,我发现了几篇关于如何解决这个问题的文章fsck(我使用的是 Ubuntu 18.04)。

我还发现有人同样的问题他们使用 RAID0 磁盘(但自从内核 4.0.0 以来已经过去了很长时间)。

从输出smartctlreads来看,我的磁盘似乎很健康PASSED。而且inode似乎可以正常工作,因为还有很多剩余(仅使用了 7% 的 inode)。

这种自发性故障可能是什么原因造成的?我想知道,因为我想知道如何预防它或在下次发生时做好准备。

目前,我仍在复制未损坏的文件,但我计划通过 来修复它fsck

相关内容