Thursday, March 6, 2014

Hard Disk Drive in depth



Firstly what's hard disk drive ?


A hard disk drive (HDD) is a nonvolatile storage device that stores data on a magnetic disk .


Nonvolatile means that data remains after computer is switched off . Data is written on the disk by magnetizing particles within a magnetic material in a pattern that represents the data. The hard disk is able to read back this data by detecting the magnetic patterns created during the write process .



Main Parts Hard disk at a glance :

 HDD have two main parts : PCB ( Printed Circuit Board ) and HDA ( Head and disk assembly ) .

 -->PCB :

any PCB have green mask , copper tracks , core i.e ( fiber glass ) , Components and solder to join components with skeleton PCB . 

in our case HDD : there are number of ICS as Buffer Ram , MCU ( Microcontroller Unit ) , Rom Chip and Motor Driver  also some components like Ceramic Capacitors , SMT Coils , Motor Contacts , Head Stack Contacts and Interface like P-ATA , S-ATA …etc. 

MCU : MCU usually consists of Central Processor Unit or CPU which makes all calculations and Read/Write channel - special unit which converts analog signals from heads into digital information during read process and encodes digital information into analog signals when drive needs to write. MCU also has IO ports to control everything on PCB and transmit data through interface.

Motor Driver  or (VCM Controller ) : This fellow is the most power consumption chip on PCB. It controls spindle motor rotation and heads movements. The core of VCM controller can stand working temperature of 100C/212F.


Rom chip : rom which  contains firmware of hard disk . When you apply power on a drive, MCU chip reads content of the flash chip into the memory and starts the code. Without such code drive wouldn't even spin up. Sometimes there is no flash chip on PCB that means content of the flash located inside MCU .  

buffer Ram : Size of the memory defines size of the cache of HDD. you can find such information in data sheet on this HDD . CPU eats some memory to store some firmware modules and as far as we know only Hitachi/IBM drives show real cache size in data sheets for the other drives you can just guess how big is the real cache size .


-->HAD :


HDA has 4 major components :

Spindle , Platter , Head and Actuator






Spindle :A spindle holds one or more platters, it is connected to a motor that spins the platters at a constant revolutions per minute (RPM) .



Platter : A platter is the disk that stores the magnetic patterns. It is made from a nonmagnetic material, usually glass or aluminum, and has a thin coating of magnetic material on both sides.

>> a platter can spin at a speed of 7,200 to 18,000 RPM. The cost of an HDD increases for a higher speed.



Head :The read-write head of an HDD reads data from and writes data to the platters. It detects (when reading) and modifies (when writing) the magnetization of the material immediately underneath it. Information is written to the platter as it rotates at high speed past the selected head.



>> There is one head for each magnetic platter surface on the spindle, these are mounted on a common actuator arm.



 Actuator :An actuator arm moves the heads in an arc across the spinning platters, allowing each head to access the entire data area,similar to the action of the pick-up arm of a record deck.



Another concept must be known is The performance of an HDD which is measured using the following parameters:


Capacity : The number of bytes an HDD can store. The current maximum capacity of an HDD is 4TB.

Data transfer rate : The amount of digital data that can be moved to or from the disk within a given time. It is dependant on the performance of the HDD assembly and the bandwidth of the data path.

• The average data transfer rate ranges between 50-300 MB per second.

Seek time : The time the HDD takes to locate a particular piece of data. The average seek time ranges from 3 to 9 milliseconds .






Some important concepts about Disk Storage system :

The surface of a disk is formatted into invisible concentric bands called tracks, on which data are stored magnetically. A typical 3.5" hard drive may contain thousands of tracks. Moving the read/write heads from one track to another is called seeking. The average seek time is one type of disk speed measurement. Another measurement is RPM (revolutions per minute), typically 7,200 . The outside track of a disk is track 0, and the track numbers increase as you move towards the center.
 


 

A cylinder refer s to all tracks accessible from a single position of the read/write heads .A file is initially stored on a disk using adjacent cylinders.This reduces the amount of movement by the read-write heads.



A sector is a 512-byte portion of a track, as shown in Figure 14-2. Physical sectors are magnetically (invisibly) marked on the disk by the manufacturer, using what is called a low-level format. Sector sizes never change, regardless of the installed operating system. A hard disk may have 63 or more sectors per track.



Physical disk geometry is a way of describing the disk 's structure to make it readable by the system BIOS .It consists of the number of cylinder s per disk,the number of read/write heads per cylinder, and the number of sectors per track.










Fragmentation Over time, as files become more spread out around a disk, they become fragmented.A fragmented file is one whose sectors are no longer located in contiguous areas of the disk. When this happens, the read -write heads have to skip across track s when reading the file's data.This slows down the reading and writing of files, and makes the data more susceptible to errors .



Translation to Logical Sector Numbers Hard disk controllers perform a process called translation,the conversion of physical disk geometry to a logical structure that is understood by the operating system.The controller is usually embedded in firmware,either on the drive itself
or on a separate controller card.After translation,the operating system can work with what are called logical sector numbers.Logical sector numbers are always  numbered sequentially, starting at zero .



 Partitions , volumes , Logical , Extended , Primary …. What are ?
On a typical microcomputer, a single physical hard drive is divided into one or more logical

units named partitions , or volumes . Each formatted partition is represented by a separate drive letter such as C, D, or E, and it can be formatted using one of several file systems .

A drive may contain two types of partitions: primary and extended. Two configurations are possible, depending on whether you want an extended partition:

• Up to three primary partitions and one extended partition.

• Up to four primary partitions and no extended partition.

An extended partition can be divided into an unlimited number of logical partitions.
Each logical partition appears as a separate drive letter. Primary partitions can be made bootable ,whereas logical partitions cannot. It is possible to format each system or logical partition with a different file system .in file system files stored in clusters where a cluster is the smallest unit of space used by a file; it consists of one or more adjacent disk sectors. A file system stores each file as a linked sequence of clusters . The size of a cluster depends on both the type of file system in use and the size of its disk partition.
 

Hint : Using assembly language, you can bypass the operating system completely when accessing data.This can be useful: you might have to store and retrieve data stored in an unconventional format, to recover lost data, or to perform diagnostics on disk hardware .


References : 

1-Assembly Language for Intel-based Computers by Kip Irvine
2- HDD from inside:
Main parts Artem Rubtsov , www.hddscan.com
3-
Hitachi Data Systems at www.hds.com .


Ahmed Hashad Security Researcher @ 701 Labs
Twitter , Facebook

1 comment:

  1. ..:: Ahmed Hashad ::..: Hard Disk Drive In Depth >>>>> Download Now

    >>>>> Download Full

    ..:: Ahmed Hashad ::..: Hard Disk Drive In Depth >>>>> Download LINK

    >>>>> Download Now

    ..:: Ahmed Hashad ::..: Hard Disk Drive In Depth >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete