Drive related information

From Notes_Wiki
Revision as of 03:48, 13 November 2012 by Saurabh (talk | contribs) (Created page with "=Drive related information= ==hdparm== We can use '<tt>hdparm</tt>' tool to find information about disk drives. To see complete information about drive we can use <pre> hdpa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Drive related information

hdparm

We can use 'hdparm' tool to find information about disk drives. To see complete information about drive we can use

hdparm -I <drive_device>

This command gives lot of information about drive and what features are currently enabled.


Finding drive speed

To find drive speed we can use command

hdparm -tT <drive_device>

This returns to differed types of speed buffered read and cached read. We should run the command two/three times and take average of speeds returned to reduce the effect in measurement by other applications.


As per https://raid.wiki.kernel.org/index.php/Performance

To check out speed and performance of your RAID systems, do NOT use hdparm. It won't do real benchmarking of the arrays. Instead of hdparm, take a look at the tools described here: IOzone and Bonnie++.

A GUI program named Disk Utility (under System tools, executable name 'palimpsest') can also be used for benchmarking hard-disks to check their performance.


smartctl

We can use 'smartctl' to learn about SMART related information of drives.

Listing all SMART related information

To list all SMART related information of drive we can use

smartctl --all <device_name>

This returns various old age and failure threshold values of number of parameters. It also returns current values for different parameters and if SMART detected any error in the drive during previous few self-tests. It also lists device model number, capacity etc. information. One of the parameters 'Power_on_Hours' can be used to estimate how old / how much used is the given hard-disk.


Surface scan of hard-disks using Linux

To surface scan entire hard-disks using Linux we can use smartctl utilities. To start full surface scan use command:

smartctl -t long <device_name>


To check the results of surface scan after it is most likely finished, we can use:

smartctl -l selftest <device_name>

In the output if 'LBA_of_first_error' is some valid number than hard-disk has errors and should be repaired / replaced.