dmesg 报 I/O error,判断磁盘是不是要坏了

先分清介质错误还是链路异常:dmesg 带 -T 看时间戳,确认报错落在哪个块设备。

再用 smartctl 读健康状态,PASSED 只说明盘没被判死,还要看重分配、待定、不可纠正三个扇区计数。

待定扇区不为 0 就说明已有读不出数据的块,盘该换了。

虚拟机的 I/O error 常出在宿主机存储层,先往上层查。

dmesg -T | grep -iE 'i/o error|medium error'
smartctl -a /dev/sda
smartctl -a /dev/nvme0n1
# 重点关注 Current_Pending_Sector / Offline_Uncorrectable / Reallocated_Sector_Ct
THE END
喜欢就支持一下吧
点赞9 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容