Linux Format

Smartmonto­ols

Version: 6.5 Web: www.smartmonto­ols.org

-

Linux has always been the perfect place for testing different sorts of hardware and this time we’ll take a closer look at hard drives. We’re all aware that drives tend to fail after prolonged use, but you can hardly predict a failure without any feedback from components. Hard disk monitoring firmware was introduced by IBM in 1992 for its IBM 9337 Disk Arrays for AS/400 servers, but it took significan­tly longer for the selfmonito­ring, analysis and reporting technology (S.M.A.R.T.) to reach the majority of consumer-grade hard drives. Of course, all modern storage devices, from flash drives and SSDs support S.M.A.R.T. now.

In Linux, you can retrieve that sort of informatio­n using Smartmonto­ols, a specialise­d toolset for inspecting ATA/ SATA and SCSI/SAS hard drives and solid-state drives. It consists of the smartctl utility and smartd daemon, which both play similar roles but in different manners. With smartctl you can perform certain actions on demand while smartd runs in the background and delivers live reports. To demonstrat­e what you can do, we’ll cover some practical use cases and conduct a test of a hard drive (eg /dev/ sdc). First, we make sure that S.M.A.R.T. is enabled on our drive: $ sudo smartctl -i /dev/sdc | grep SMART

In the rare case of disabled S.M.A.R.T., you can always bring it back with $ sudo smartctl -s on /dev/sdc . Next, you may want to actually test something. Smartctl offers some builtin tests named ‘short’, ‘long’, ‘conveyance’ and ‘select’. The syntax looks like this: $ sudo smartctl -t conveyance -C /dev/ sdc

This way the command runs in the foreground mode—remove -C to send it to the background. After playing with tests let’s now display the results so far ( $ sudo smartctl -a /dev/sdc ) and check the overall drive health ( $ sudo smartctl -H /dev/sdc ). If you’re dealing with an ageing device that can die at any moment, smartctl can detect its state before it is too late. In other words, you’ll have some precious hours to make a backup copy of your data.

“Smartctl can detect an ageing device’s state before it’s too late.”

 ??  ?? The only real place where S.M.A.R.T. capability is absent these days is in a virtual environmen­t.
The only real place where S.M.A.R.T. capability is absent these days is in a virtual environmen­t.

Newspapers in English

Newspapers from Australia