V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
wednesdayco
V2EX  ›  程序员

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

  •  
  •   wednesdayco · 2023-05-16 10:08:31 +08:00 · 2196 次点击
    这是一个创建于 590 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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.

    17 条回复    2023-05-18 00:19:34 +08:00
    dashupc
        1
    dashupc  
       2023-05-16 10:12:31 +08:00
    是的,换吧
    wednesdayco
        2
    wednesdayco  
    OP
       2023-05-16 10:14:58 +08:00
    @dashupc 这还有救不- -特么的这硬盘才用 2 个月啊
    wednesdayco
        3
    wednesdayco  
    OP
       2023-05-16 10:40:52 +08:00
    @dashupc 被你骗了,fsck -y /dev/nvmexxxx 救回来了
    goodryb
        4
    goodryb  
       2023-05-16 12:01:37 +08:00   ❤️ 1
    read only 还好,一般先重启看看,要是掉盘了看不到了那才要考虑是不是完全坏掉了
    Mooon
        5
    Mooon  
       2023-05-16 12:10:54 +08:00   ❤️ 13
    一楼的回复真切得展示了论坛类小丑们的固有行为模式,即:

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

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

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

    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
        12
    Sekai  
       2023-05-16 15:59:01 +08:00   ❤️ 1
    我记得只读也有可能是进入了一种保护模式,总之马上备份是没错的
    libook
        13
    libook  
       2023-05-16 16:20:03 +08:00   ❤️ 1
    看看 SMART 信息吧,有没有异常指标,另外可以看看写入量是不是挺多了,固态硬盘的话通常固件会自动处理快掉的存储块,将数据移动到好的块,当可用块低到一定程度就会自动转为只读模式,避免数据丢失。

    当然也可能是系统问题,比如内核 bug 导致的间歇性的数据错误。
    也可能是硬件导致的问题,非 ECC 内存的话可能长时间运行会出现一些内存错误,从而导致其他错误,但一般来说只要不是持续高负载运行,这种事情发生概率比较低,而且通常重启系统可以解决。也有可能是主板上的控制器老化了。
    wednesdayco
        14
    wednesdayco  
    OP
       2023-05-17 16:06:21 +08:00
    @v2wtf 感谢提醒,我还是买一块备用吧
    wednesdayco
        15
    wednesdayco  
    OP
       2023-05-17 16:13:15 +08:00
    @chrawsl 跑完看起来没啥问题,结果是 PASSED
    wednesdayco
        16
    wednesdayco  
    OP
       2023-05-17 16:16:59 +08:00
    @newborn 工作用来当 vsc remote 用的机器,数据都在 git 上有所以倒也不用备份 hhhh 就是准备个备用盘,以免坏了没的用了
    chrawsl
        17
    chrawsl  
       2023-05-18 00:19:34 +08:00
    @wednesdayco pass 就没事,自检通过的意思
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4849 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 03:59 · PVG 11:59 · LAX 19:59 · JFK 22:59
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.