硬盘管理命令smartctl
背景:同事在换硬盘到主机后,检查是否把硬盘放在正确的位置,用smartctl命令查看序列号;命令:smartctl -a /dev/sdagg0112:~ # smartctl -a /dev/sdasmartctl 5.39 2008-10-24 22:33 [x86_64-suse-linux-gnu] (openSUSE RPM)Copyright (C) 2002-8 by B
·
背景:同事在换硬盘到主机后,检查是否把硬盘放在正确的位置,用smartctl命令查看序列号;
命令:smartctl -a /dev/sda
gg0112:~ # smartctl -a /dev/sda
smartctl 5.39 2008-10-24 22:33 [x86_64-suse-linux-gnu] (openSUSE RPM)
Copyright (C) 2002-8 by Bruce Allen, http://smartmontools.sourceforge.net
Device: SEAGATE ST9146803SS Version: 0006 #硬件厂商
Serial number: 6SD2A3ZZ0000B127LJJM #硬盘序列号
Device type: disk
Transport protocol: SAS #接口类型
Local Time is: Fri Mar 4 16:58:30 2016 CST
Device supports SMART and is Enabled #是否支持smart管理,有的不支持
Temperature Warning Enabled
SMART Health Status: OK #健康状态ok
Current Drive Temperature: 21 C #当前温度
Drive Trip Temperature: 68 C #此温度是啥?有待考证
Elements in grown defect list: 0
Vendor (Seagate) cache information
Blocks sent to initiator = 1044970503
Blocks received from initiator = 2476401867
Blocks read from cache and sent to initiator = 106869375
Number of read and write commands whose size <= segment size = 364621421
Number of read and write commands whose size > segment size = 0
Vendor (Seagate/Hitachi) factory information
number of hours powered up = 37638.07
number of minutes until next internal SMART test = 54
Error counter log:
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 15099690 0 0 15099690 15099690 2734.048 0
write: 0 0 0 0 0 71719.613 0
verify: 10434 0 0 10434 10434 0.000 0
Non-medium error count: 0
[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']
No self-tests have been logged
Long (extended) Self Test duration: 3600 seconds [60.0 minutes]
以上是在gg0112节点上的使用情况;
用法:smartctl -a /dev/sda |grep Seri —直接查看硬盘序列号;
里面还可以查看硬盘生产厂家、接口类型、温度等参数;
不是所有系统默认安装了这个管理工具,可以查看一下:
gg0112:~ # rpm -qa |grep smart
smartmontools-5.38.0.20081027-2.14
若出现:Device does not support SMART,则说明硬盘不支持(这是在虚拟机里测试的,故不支持);
以后遇到新问题,再持续更新。
更多推荐
已为社区贡献1条内容
所有评论(0)