Linux, Unix, BSD, and Cywgin-on-Windows users can use the excellent smartmontools package, which includes the smartctl and smartd commands, for monitoring and controlling PATA, SATA, and SCSI hard disks. smartmontools works on drives that have the Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T.) system built into them. With smartmontools, you can test drive health and set it up to monitor drives so early warnings of possible drive failures are issued.
Got S.M.A.R.T. drives? Consider adding smartmontools to test and monitor drive health as well as issue early warnings of possible failures.
S.M.A.R.T. is usually not enabled by default. There are two ways to turn it on: via the BIOS options in many PCs or with the smartctl command. But first, see if it’s supported:
# smartctl -i -d ata /dev/sda smartctl version 5.37 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF INFORMATION SECTION === Model Family: Western Digital Caviar SE (Serial ATA) family Device Model: WDC WD800JD-00MSA1 Serial Number: WD-WMAM9S474555 Firmware Version: 10.01E01 User Capacity: 80,026,361,856 bytes 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: Thu Feb 7 13:09:37 2008 PST SMART support is: Available - device has SMART capability. SMART support is: Disabled |
Leave off -d ata for PATA drives. This command enables S.M.A.R.T.:
# smartctl -s on -d ata /dev/sda |
Now, run a quick health check:
# smartctl -H -d ata /dev/sda smartctl version 5.37 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED |
This is good news. One more quick check — read the drive’s error log:
# smartctl -l error -d ata /dev/sda |
If there are no errors, or just a few old errors, it’s probably OK, assuming you are backing up regularly. If the drive fails the health test and shows many errors, the disk is doomed.
You can also run more extensive as well as set it up for continual monitoring. man smartctl and Monitoring Hard Disks with SMART tell all.