ubuntu:apt-get install smartmontools
CentOS:yum install smartmontools
smartctl -A /dev/sda
1.使用SMART检测硬盘
查看是否启用SMART功能:
实例:
smartctl -i /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda ES
Device Model: ST3250620NS
Serial Number: 9QE859MZ
LU WWN Device Id: 5 000c50 00d96586b
Firmware Version: 3BKS
User Capacity: 249,998,918,144 bytes [249 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 7
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Mon Oct 19 14:58:31 2015 CDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
smartctl -H /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED