Aug 182009
 

The S.M.A.R.T. status is not a perfect measure of your hdd health but it can sometimes provide pre-failure notification. Here is how to check the S.M.A.R.T. status on Ubuntu:

Install the smartmontools using:

sudo aptitude install smartmontools

To display all the S.M.A.R.T. information for an IDE drive, run

sudo smartctl -a /dev/hda

To display all the S.M.A.R.T. information for an SATA drive, run

sudo smartctl -a -d ata /dev/sda

if the hard disc drive has S.M.A.R.T. switched off, then enable it using -s on:

sudo smartctl -s on -a -d ata /dev/sdb

help on the output:
http://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes

value category meaning
Value value of the parameter at the moment
Worst the worst value yet
Thresh the threshold value
Type threshold reached → danger of drive failure Pre-fail /
or information about temperature & aging of the hdd Old age
Updated type of updating of parameter: (always) / self test (Offline data collection)


Raw_Read_Error_Rate etc.: big values are good, small are bad. So when getting a VALUE that is below THRESH this is a sign of danger! Also have a look at Reallocated_Sector_Count. When this value sinks, the probability of failure significantly rises!

more on certain categories in the output of smartmontools can be found on http://www.rocketcat.info/blog/2006/05/smart-monitoring-on-mac-os-x.html:

I am running smartctl daily on 150.000 (windows) clients. It really is a great tool if you have a script set up to periodically check your discs and report any errors or warnings.

The raw values (last column) of "Reallocated Sector Count" and "Current Pending Sectors" are most interesting if it comes to defective sectors. If the drive cannot read a sector, it will flag this sector as "pending". The sector can get off the pending list if a later attempt to read the data succeds, however this is very unlikely. A pending sector will be reallocated when data is written to it --> Current Pending goes down by 1 and Reallocated Sector Count is increased. Reallocation means, that any access to this sector is satisfied by accessing another sector from a spare area. The drives firmware keeps a map of those reallocations. If your drive starts showing defective sectors or has a high number of reallocated sectors disc access is slowed down, because the head must travel between the normal data area and the spare area for reallocations.

You should try to get your data off the drive as soon as possible.
Writing zeros (or anything) to the entire drive should force any pending sector to be reallocated. Though I can tell from experience that most drives that start reallocating sectors will shortly go down in a death spiral of pending and reallocations. When the spare area is exhausted the attribute "Reallocated Sector Count" will fail causing most SMART monitoring tools to ring the alarm bell. But beware, modern drives can compensate up to 2500 bad sectors.
On the other hand some drives live happily for years with some hundred reallocated sectors.

On a side note: The "Value" column should be read as: Higher=Better, it is scaled from 1 to 100 or 1 to 253, that varies from vendor to vendor. The Thresh column indicates the lower limit. If Value falls below this number, the attribute is failing. Though only attributes marked as pre_fail will force the overall status to fail. E.g. the power_on attribute may fall below its threshold when the drive reaches its calculated end of life, though this will not stop the drive from operating properly for the next 3 years.

You may also want to issue a SMART self test command to the drive:
smartctl -t short [drive]

On my 733-Quicksilver at home, smartctl fails to operate on a hard drive connected to a PCI based IDE controller.
  
At Sunday, May 21, 2006 10:34:00 AM , kai said...

Yep - i agree, it is a great utility... I've now got smartd running on my laptop, and next up I need to set up mail so that I can receive email notifications, as I rarely get into console.app to see what's going on unless there's something wrong...
I was unable to get smartd to be launching via launchd/launchctl as it immediately forks after launching and kills it's parent process, and launchd really doesn't like that.
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

Related Posts:

 Leave a Reply

(required)

(required)


nine + = 15

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>