Hard disk drives (HDDs) have been the primary form of long-term data storage in computers for decades. But how exactly do they store all that data? Let’s take a closer look at the components and processes involved.
What is a Hard Disk Drive?
A hard disk drive (HDD) is a non-volatile data storage device that uses magnetic storage to store and retrieve digital data. It consists of one or more rapidly rotating disks or platters coated with magnetic material, and read/write heads that fly just above the surface of each platter. Data is written to the platter by magnetizing bits on the surface and read back by detecting the magnetization.
Main Components of an HDD
There are three main components that make up a hard disk drive:
Platters are the circular disks that provide the actual storage surface. They are made of non-magnetic material, usually aluminum alloy or glass, and are coated on both sides with a very thin layer of magnetic material. Common coatings include cobalt-alloy or cobalt-nickel-chromium-platinum.
The read/write heads are responsible for reading and writing data on the platters. There is one head for each platter surface. The heads float just above the surface of the platters on an air bearing generated by the platters’ rapid rotation. They contain an electromagnet that enables them to read and write data on the platter surface by magnetizing tiny regions of the magnetic coating.
The actuator arm holds the read/write heads and allows them to move across the surfaces of the platters. It receives instructions from the drive controller on where to position the heads to read or write data. The arm can swing the heads across the platters very quickly and accurately.
Data is stored by encoding it as a series of magnetic pulses representing 0s and 1s. This is done by polarizing tiny regions of the magnetic coating on the platter surface. These polarized regions are called bits.
There are a few different encoding schemes used in HDDs:
Modified Frequency Modulation (MFM)
MFM was one of the first encoding schemes used in HDDs. Each bit cell stores a single binary digit (1 or 0). Transition points indicate cell boundaries. A flux transition in the middle of a cell indicates a 1, while no transition indicates a 0.
Run Length Limited (RLL)
RLL encoding improves on MFM by allowing more data to be stored in the same space. It does this by only requiring transitions at minimum intervals, allowing more data to be squeezed in between transitions. Common RLL codes are RLL 2,7 and RLL 1,7.
Advanced Run Length Limited (ARLL)
ARLL is an extension of RLL that enables even higher data densities. For example, an ARLL scheme might only require one flux transition every 16 bit cells. This allows more 1s to be stored between transitions.
Tracks and Sectors
The platters are logically divided into concentric circles called tracks. Tracks are further divided radially into segments called sectors. Sectors are the smallest individually addressable unit of data storage on a drive.
A unique address identification number is assigned to each sector during low-level formatting of the drive. This provides an addressing scheme for locating sectors during read/write operations.
Cylinders are the vertical “stack” of tracks that align across all the platters in the drive. With multiple platters, the read/write heads are physically connected and move in unison. Therefore, each cylinder represents a collection of tracks located at the same radial position across the stack of platters. Reading from or writing to a cylinder involves positioning the heads at the same track location on every platter.
How Data is Written
When a host device needs to write data to the hard drive, here is the general process:
- The host sends a write command to the HDD controller specifying the logical block address (LBA) where data should be written.
- The LBA is translated to a physical location – a specific sector and track.
- The actuator arm positions the read/write heads over the correct track.
- As the platter rotates under the head, the write head magnetizes bits in the desired sector to represent the data.
- The flux transitions are encoded using the drive’s encoding scheme (MFM, RLL, etc).
- Once the sector passes under the head, the write is complete.
This process happens very quickly, allowing data to be written at fast speeds. The drive cache also helps by assembling data for sustained write operations.
How Data is Read
Reading data from an HDD involves a similar process:
- The host requests data by providing an LBA address.
- The controller translates the LBA to a physical location.
- The actuator arm positions the read head over the correct track.
- As the platter rotates, the read head detects flux transitions on the surface, decoding them into binary data.
- The binary data is assembled into the requested data block.
- The requested data is sent back to the host.
Again, this happens very quickly – HDDs can achieve sustained data transfer rates over 100 MB/s for sequential reads.
Before an HDD can store data, it must be prepared with a process called formatting:
This is done at the factory and writes servo patterns onto the platters that enable the actuator arm to properly position the heads. It divides each platter into tracks and sectors.
The operating system performs high-level formatting to write file system structures onto the drive so that it can organize data in files and folders. Common file systems are NTFS for Windows and HFS+ for macOS.
Increasing Areal Density
The main goal of HDD advancement has been to increase areal density – the amount of data that can be stored per square inch of platter space. Density has historically doubled every 2-3 years. Here are some of the technologies that have enabled these massive leaps in capacity:
Increased Track Density
More tracks per inch (TPI) means narrower, more densely packed tracks. Advanced servo control systems keep the heads precisely aligned over narrower tracks.
Increased Bit Density
Smaller bit cells in the magnetic coating allow more bits to be stored on each track. Higher coercivity magnetic coatings can maintain bit integrity with smaller bit sizes.
MR and GMR Heads
Magnetoresistive (MR) and giant magnetoresistive (GMR) read heads provide increased sensitivity to detect smaller magnetic bit regions, boosting linear density.
PRML and Advanced Coding
PRML (partial response maximum likelihood) read channels and advanced coding schemes like LDPC (low-density parity-check) improve the reliability of reading higher density bit patterns.
Storing magnetic bits perpendicular instead of longitudinally to the platter surface can support tighter packing and higher areal densities.
Shingled Magnetic Recording (SMR)
SMR partially overlaps tracks like shingles on a roof to squeeze more tracks onto each platter. However, it comes with some performance drawbacks.
Filling drives with helium instead of air reduces turbulence and allows thinner platters to be packed closer together.
HDD manufacturing happens in cleanrooms and involves precision assembly and testing. Here is a high-level overview of the manufacturing process:
The magnetic media that coats the platters is produced through sputtering. The disks are loaded into vacuum chambers and the magnetic material is sputtered onto each side.
The read/write heads are fabricated from thin films using semiconductor-like photolithographic processes. Extremely precise equipment deposits thin layers that form the head elements.
Head-Disk Assembly (HDA)
The HDA is where the platters, heads, and actuator assembly all come together. This happens in a cleanroom. Precise robotic arms load the components to ensure alignment.
Once assembled, the HDDs undergo extensive testing. This includes media defect scanning, read/write verifications, and track following checks. Failed drives are reworked or scrapped.
The drive’s controller is loaded with the firmware that handles all the drive’s functionality like head positioning, error checking, and data transfer protocols.
Further performance testing is done on the finished drives. Then they are mounted in enclosures, packaged, and shipped out.
In summary, HDDs use rotating platters coated with magnetic material to store data as magnetized bit patterns. Read/write heads fly over the platters on actuator arms to access data, with new data constantly being written to open sectors. Advances in areal density continue to drive HDD capacity higher year after year. The precisely engineered and manufactured components work together to enable reliable long-term data storage. While solid state drives are taking over many usage models, HDDs remain essential for high-capacity storage needs. Their fundamental working principles have stood the test of time and will continue evolving into the future.