NVMe 硬盘
$ apt install nvme-cli smartmontools
$ nvme smart-log /dev/nvme0- critical_warning 应为 0。
- percentage_used 是磨损指标;数据中心级硬盘可承受大量写入,但仍需留意其变化趋势。
- media_errors 应始终为 0。
- available_spare 应保持在阈值以上。
机械硬盘
$ smartctl -a /dev/sda重点关注四项属性:Reallocated_Sector_Ct、Current_Pending_Sector、Offline_Uncorrectable(理想值均为 0),以及 UDMA_CRC_Error_Count(该值持续上升说明线缆或背板有问题)。
运行自检
$ smartctl -t long /dev/sda # hours on large drives
$ smartctl -l selftest /dev/sda # read the result later何时提交工单
以下任一情况都应提交工单:自检失败、严重警告(critical warning)值非零、重映射扇区或待映射扇区数量增加,或硬盘从阵列中掉线。请附上 smartctl 或 nvme smart-log 的输出:这样我们无需进一步诊断,即可在 2 小时内更换硬盘。



