1. 看硬盘和分区的详细信息
fdisk -l
# 或者
lsscsi
2. 方法1:查看Wear Levelling Count(颗粒平均擦写次数)
smartctl -a /dev/sda
# 字段的含义
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME
1 Raw_Read_Error_Rate 读取错误率
3 Spin_Up_Time 起转时间
4 Start_Stop_Count 启动停止次数
5 Reallocated_Sector_Ct 重新分配扇区计数
7 Seek_Error_Rate 寻道错误率
9 Power_On_Hours 通电时间
10 Spin_Retry_Count 起转重试次数
11 Calibration_Retry_Count 重新校准重试次数
12 Power_Cycle_Count 启动<->关闭循环次数
192 Power-Off_Retract_Count 断电磁头缩回计数
193 Load_Cycle_Count 磁头加载/卸载循环计数
194 Temperature_Celsius 温度
196 Reallocated_Event_Count 在分配扇区物理位置事件计数(与坏道无关)
197 Current_Pending_Sector 当前等待中扇区数(状态存疑/不稳定-等待后续判断)
198 Offline_Uncorrectable 无法修正的扇区总数
199 UDMA_CRC_Error_Count UltraDMA CRC错误计数
200 Multi_Zone_Error_Rate 写入错误率
3. 方法2:查看 Percentage Used Endurance Indicator
smartctl -l devstat /dev/sdb
linux 下面只有 smartmontools 这一个工具,而且只对像三丧和 intel 这样的大厂支持良好,其余的厂家文档不全或故意不公开接口,第三方工具就没办法了。
其中最后一个最重要和直观 “ Percentage Used Endurance Indicator ” ,单位是百分比,新的是 0%
我现在的寿命是1%, 持续观察一阵。