用 smartctl -H 检查磁盘健康状态
smartctl -H 查询硬盘的 SMART 自检结果,一行输出 PASSED 或 FAILED。
运行 `sudo smartctl -H /dev/sda` 获取硬盘 SMART 健康判定,用 `sudo smartctl -a /dev/sda` 查看重映射扇区等完整属性。
01命令
命令
$ sudo smartctl -H /dev/sda02作用说明
-H 是最容易被遗忘的一行命令:它让硬盘自报健康状态,输出 "PASSED" 或 "FAILED",失败时还会提示用 -a 查看详情。要深入诊断,`smartctl -a`(或 `-x`)会显示 Reallocated_Sector_Ct(重映射扇区数)和 Current_Pending_Sector(当前待映射扇区数)等属性,这些是重要的早期预警指标。NVMe 硬盘使用 `smartctl -a /dev/nvme0` 通过 NVMe SMART/health 日志输出类似信息。
03风险
!注意: PASSED 并不保证磁盘健康——务必查看原始属性值;需要 root 权限运行。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- smartctl(8) - Control and Monitor Utility for SMART Disks依据: -H, --health: prints the SMART health status of the device; smartctl monitors SMART data and reports device health.
最后验证: 2026-09-17 · 分类: 系统与设置