Extracting information out of your hard disk

In this article I am going to show you the way to get some information out of your hard disk.Sometimes it really necessary to know information about that to measure about the system health.

The tool I am going to use for this purpose is called “hdparm”. If it is not come with your distribution then get it from here . Right.

Say you have SATA drive at your disposal and you want to know the internal matrix of the drive ;then you can do like below:

bhaskar@bhaskar-laptop_08:19:54_Tue Aug 17:~> sudo /sbin/hdparm -i /dev/sda


Model=ST9160821AS, FwRev=3.BHE, SerialNo=5MA8QHLW
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=312581808
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes:  pio0 pio1 pio2 pio3 pio4
DMA modes:  mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=yes: unknown setting WriteCache=enabled
Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

* signifies the current active mode

OR less verbose way like this:

bhaskar@bhaskar-laptop_08:32:40_Tue Aug 17:~> sudo /sbin/hdparm /dev/sda

multcount     = 16 (on)
IO_support    =  1 (32-bit)
readonly      =  0 (off)
readahead     = 256 (on)
geometry      = 19457/255/63, sectors = 312581808, start = 0

Now need to know the speed of your hard drive for caching buffer..so do this:

bhaskar@bhaskar-laptop_08:34:34_Tue Aug 17:~> sudo /sbin/hdparm -T /dev/sda

Timing cached reads:   1902 MB in  2.00 seconds = 951.03 MB/sec

Ok.. you can get the information about disk buffer read timing like this:

bhaskar@bhaskar-laptop_08:35:43_Tue Aug 17:~> sudo /sbin/hdparm -t /dev/sda

Timing buffered disk reads:  128 MB in  3.02 seconds =  42.45 MB/sec

So this software can take plethora of option to set/get feature related to SATA/IDE  drive .Kindly read the manual page before applying anything on the hard drive otherwise you might run into a catastrophe .So use it with a caution.

Hope this will help.



About unixbhaskar
GNU/Linux Consultant

One Response to Extracting information out of your hard disk

  1. Pingback: Best place/price for hard drive data recovery? | hard drive recovery

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: