centos7下smartctl安装配置

安装

yum install smartmontools

使用

1、smartctl -i <device> :显示设备的身份信息,检查硬盘是否打开了SMART支持。
看到有:
    SMART support is: Enabled 
说明硬盘支持SMART。
如果为Disabled,使用:
smartctl --smart=on --offlineauto=on --saveauto=on <device>
启用SMART。
2、smartctl -H <device> :查看硬盘的健康状况。(df -h 查看硬盘 如:/dev/sda )

    === START OF READ SMART DATA SECTION ===

    SMART overall-health self-assessment test result: PASSED 

PASSED表示硬盘健康状态良好,如果为Failure那就要立刻更换硬盘。
3、smartctl -A <device> :显示设备SMART厂商属性和值。
4、smartctl -l error <device> :显示硬盘历史错误信息。
5、smartctl --test=TEST <device> :硬盘自测。

TEST可取值:offline, short, long, conveyance, select,M-N, pending,N, afterselect,[on|off], scttempint,N[,p]

此时可以用smartctl -X中断后台测试。
6、smartctl -l selftest <device> :显示硬盘测试信息。
7、smartctl -a <device> :显示硬盘SMART的全部信息
8、smartctl --all /dev/sda 显示硬盘SMART的全部信息

文章来源:https://www.cnaaa.net,转载请注明出处:https://www.cnaaa.net/archives/7960

(0)
郭靖的头像郭靖
上一篇 2023年4月12日 下午6:20
下一篇 2023年4月13日 下午5:34

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

在线咨询: QQ交谈

邮件:712342017@qq.com

工作时间:周一至周五,8:30-17:30,节假日休息

关注微信