Drive related information

From Notes_Wiki

Home > CentOS > CentOS 6.x > Information tools > 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 and non-SMART related information

To list all SMART and non-SMART related information of drive we can use

smartctl --xall <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. This can also be used to see if hard-disk supports password security and if some hard-disk password is set or not.


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.


Home > CentOS > CentOS 6.x > Information tools > Drive related information