硬盘管理命令smartctl

背景:同事在换硬盘到主机后,检查是否把硬盘放在正确的位置,用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
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值