不懂就问,这是硬盘坏了吗?

347 天前
 wednesdayco

linux ubuntu22.04 一直不关机

今天早上起来发现所有文件系统变成了只读

重启后报错提示 ACPI Error: Aborting method _sb.PC00.XHCI.RHUB.HS03._PLD due to pervious error(AE_NOT_FOUND)

/dev/nvme0n1p2 contains a file system with errors, check forced. /dev/nvme0n1p2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

1922 次点击
所在节点    程序员
17 条回复
dashupc
347 天前
是的,换吧
wednesdayco
347 天前
@dashupc 这还有救不- -特么的这硬盘才用 2 个月啊
wednesdayco
347 天前
@dashupc 被你骗了,fsck -y /dev/nvmexxxx 救回来了
goodryb
347 天前
read only 还好,一般先重启看看,要是掉盘了看不到了那才要考虑是不是完全坏掉了
Mooon
347 天前
一楼的回复真切得展示了论坛类小丑们的固有行为模式,即:

1 、只给结论,而且一律都是负面结论
2 、不会对上述结论给出任何可参考内容或解释(解释当然必要的,但他们的原因是无法 /无力解释,而非不愿解释)
3 、被反驳后或被期望给出进一步可参考内容后,他们会宣称自己每分钟赚很多钱,不想浪费时间

4 、然后下次继续上述循环
Mooon
347 天前
勘误:第二条括号内第一个短句应为:解释当然 [不是] 必要的
zhangxs1989
347 天前
没那么容易坏的
v2wtf
347 天前
@wednesdayco 小心为妙,短期内不要存重要数据。
chrawsl
347 天前
@wednesdayco smartctl -a /dev/xxx 看看 SMART 有没有报警
newborn
347 天前
固态的文件系统通常不会出错(不像机械盘异常掉电就很容易出错),出错大概率是底层硬件快不行了,建议先把重要数据备一份出来。
leaflxh
347 天前
网上搜了下,可能是硬盘的逻辑错误,我也看不懂,等个硬盘专家回答一下

平时还是得备份重要数据,比如密钥,配置文件,代码等等
---

https://superuser.com/questions/1671683/what-causes-a-filesystem-to-get-corrupted

What causes a filesystem to get corrupted?

I just went through the following: When rebooting my Ubuntu PC, I got a message that welcomed me to emergency mode. Following the instructions from another stackoverflow post, I ended up running fsck.ext4 on my root partition from a live USB. This proposed some fixes which I accepted, and since then things have been looking fine again.

However, I wonder what this whole ordeal means. I'm assuming it's not normal for things to just break, is it? Does this mean anything about my SSD drive possibly getting old and unstable? Is it something else that I can do anything about? Or is this just something that one has to go through from time to time? I haven't done anything to my system that I'm aware of that can trigger this. I install updates using apt dist-upgrade and I install new programs via apt or snap from time to time and that's about it.

---

there can be all kinds of causes, including random cosmic rays or the media producing an alpha particle, that happens to impact the value of a critical bit. generally speaking file system corruption is caused by power loss during a write operation, or in a case where there are cached writes that haven't yet been written to disk. FS checking tools like fsck attempt to reconcile inconsistencies between the file system metadata and the actual contents of the disk, and while far from perfect, can help you when FS metadata has become damaged. can't do much for cached or incomplete writes though.

---

https://en.wikipedia.org/wiki/Soft_error
Sekai
347 天前
我记得只读也有可能是进入了一种保护模式,总之马上备份是没错的
libook
347 天前
看看 SMART 信息吧,有没有异常指标,另外可以看看写入量是不是挺多了,固态硬盘的话通常固件会自动处理快掉的存储块,将数据移动到好的块,当可用块低到一定程度就会自动转为只读模式,避免数据丢失。

当然也可能是系统问题,比如内核 bug 导致的间歇性的数据错误。
也可能是硬件导致的问题,非 ECC 内存的话可能长时间运行会出现一些内存错误,从而导致其他错误,但一般来说只要不是持续高负载运行,这种事情发生概率比较低,而且通常重启系统可以解决。也有可能是主板上的控制器老化了。
wednesdayco
346 天前
@v2wtf 感谢提醒,我还是买一块备用吧
wednesdayco
346 天前
@chrawsl 跑完看起来没啥问题,结果是 PASSED
wednesdayco
346 天前
@newborn 工作用来当 vsc remote 用的机器,数据都在 git 上有所以倒也不用备份 hhhh 就是准备个备用盘,以免坏了没的用了
chrawsl
346 天前
@wednesdayco pass 就没事,自检通过的意思

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/940310

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX