User Tools

Site Tools


doc:appunti:linux:sa:smartmontools

Available Software for Linux

ide-smart

This is a simple program to report normalized SMART attributes ant their failure threshold. It has limited support for running different SMART tests, no knowledge of the meaning of the SMART attributes (vendor and model specific), no display of past (recorded) failures, no display of raw values for attributes (like Power On Hours). It supports only IDE devices, not SCSI.

smartsuite

It is composed by a control program and a daemon. The daemon call periodically the control program against each SMART capable disk and writes results to syslog. It supports IDE and SCSI devices, but it is limited to ATA-3 and SCSI-3. It has no facility for printing the SMART self-test logs, and doesn't print timestamp information in the most usable way.

smartmontools

It is the follw-up of smartsuire. It supports ATA/ATAPI-5 standard, it knows many make and model of drives, so SMART attributes can be displayed and raw values correctly displayed. Download it from http://unc.dl.sourceforge.net/sourceforge/smartmontools/smartmontools-5.23.tar.gz. The Debian Unstable package for version 5.1.18 is at http://packages.debian.org/unstable/utils/smartmontools.html. The Debian Stable version may be at http://honk.physik.uni-konstanz.de/~agx/linux-i386/debian/smartmontools/.

The choice: smartmontools

Activating SMART monitoring

smartctl -S on /dev/hda

Enables or disables SMART autosave of device vendor-specific Attributes. Note that this feature is preserved across disk power cycles. To see current status? Bruce Allen says that this is reported by the -c switch, but it is unverified at least on my drives.

SMART online test

smartctl -s on /dev/hda

It turns on the “online” testing. In principle the SMART feature settings are preserved over power-cycling, but it doesn´t hurt to be sure. Online testing has no effect on the performance of the device. To see the current status, run the program with the “-i” switch and look for SMART support is: Enabled.

SMART automatic offline test

smartctl -o on /dev/hda

Scans the drive every four hours for disk defects. This command can be given during normal system operation. Note that the SMART automatic offline test command is listed as “Obsolete” in every version of the ATA and ATA/ATAPI Specifications. This type of test can, in principle, degrade the device performance. Normally, the disk will suspend offline testing while disk accesses are taking place, and then automatically resume it when the disk would otherwise be idle. Any errors detected in offline testing are reflected in the values of the SMART Attributes; some types of errors may also appear in the SMART error log. These are visible with the ´-A´ and ´-l error´ options respectively.

Some SMART attribute values are updated only during off-line data collection activities; the rest are updated during normal operation of the device or during both normal operation and off-line testing. The Attribute value table produced by the ´-A´ option indicates this in the UPDATED column. Attributes of the first type are labeled “Offline” and Attributes of the second type are labeled “Always”.

Performing SMART tests on demand

Immediate offline test

smartctl -t offline /dev/hda

This command can be given during normal system operation. Any errors detected in offline testing are reflected in the values of the SMART Attributes; some types of errors may also appear in the SMART error log. These are visible with the ´-A´ and ´-l error´ options respectively.

Immediate short/extended self-test

smartctl -t {short|long} /dev/hda

SMART Short Self Test (usually under ten minutes). This command can be given during normal system operation. This is a test in a different category than the immediate or automatic offline tests. The “Self” tests check the electrical and mechanical performance as well as the read performance of the disk. Their results are reported in the Self Test Error Log, readable with the ´-l selftest´ option.

SMART Extended Self Test (tens of minutes). This is a longer and more thorough version of the Short Self Test described above. Note that this command can be given during normal system operation.

Captive testing

Self-test (short or long) can be performed in “captive” mode, using the “-C” switch. This has no effect with ´-t offline´ or if the ´-t´ option is not used. WARNING: Tests run in captive mode may busy out the drive for the length of the test. Only run captive tests on drives without any mounted partitions!

BIOS settings and HDD S.M.A.R.T. capability

Some BIOSs have the capability to check the SMART status of a disk at bootup - the equivalent of smartctl -H. If they detect failing status then they won't allow the system to boot. If you disable SMART in the BIOS, it has no effect on smartmontools, it just disables this boot-time checking.

doc/appunti/linux/sa/smartmontools.txt · Last modified: 2005/06/30 22:13 by 127.0.0.1