How does a hard disk or hard drive store data by means of field?

Hard disk drives (HDDs) are one of the most common forms of data storage used in computers today. They work by using magnetic fields to store and retrieve binary data on rotating platters inside the hard drive enclosure. But how exactly does this magnetic storage process work? In this article, we will explore the basic principles behind HDD data storage through magnetic fields.

How HDDs Store Data

At its core, an HDD uses magnetism to flip the polarity of tiny areas on the drive platters back and forth to represent binary 1s and 0s. Each platter contains billions of these small magnetic regions, called bits. The platters in the HDD are made of thin metal or glass and are coated on both sides with a super-thin layer of magnetic material, such as cobalt-based alloy.

Binary Value Magnetic Polarity
1 North Pole
0 South Pole

As the platter rotates at high speed, an electromagnet called the read/write head flies just above the surface and generates a magnetic field to align the polarity of each bit as needed to store data. The alignment of all these tiny magnetic regions in certain patterns translates to the binary 1s and 0s that make up all digital data.

For example, when writing a 1, the read/write head flips the bit beneath it to a north pole alignment. Writing a 0 flips the polarity to a south pole alignment. To read the binary data back later, the head senses the magnetic alignment of each bit as it passes under the head. North pole aligned bits generate a different electrical signal than south pole bits, allowing the HDD to translate the magnetic polarities back into 1s and 0s.

Magnetic Recording Density

Early HDDs could only store a few megabytes of data due to limitations in how densely they could align the magnetic bits. But over decades of HDD evolution, the magnetic recording density, measured in bits per square inch on the platters, has increased exponentially.

Modern HDDs achieve incredible magnetic recording densities in the range of 100 billion to 1 trillion bits per square inch. They do this by minimizing the size of the magnetic regions on the platter surfaces through advances like:

– Using smaller read/write heads to flip smaller bit areas
– Magnetically recording in more tracks across each platter
– Stacking multiple thin platters very close together in the HDD enclosure
– Developing new magnetic platter coatings with smaller magnetic grain sizes

Higher recording densities allow HDD manufacturers to continually increase storage capacity over time without increasing the physical size of the hard drive itself.

Magnetoresistive Sensors

Another key advancement in HDD technology was the development of magnetoresistive (MR) sensor heads in the 1990s. Earlier read/write heads relied on electromagnetic induction to sense the magnetic fields from the bits passing under the head. However, these traditional heads eventually reached the physical limits of their resolution and could not read denser bit alignments.

MR sensor heads take advantage of a quantum mechanical effect called giant magnetoresistance. Certain layered magnetic materials change their electrical resistance when exposed to external magnetic fields. By fabricating the sensor portion of the read head out of layers of these magnetoresistive materials, the head gains much finer resolution to detect the magnetic polarity of closely spaced bits.

The first generation of MR heads – anisotropic magnetoresistive (AMR) sensors – could resolve 2-3 times higher bit densities. Later generations like giant magnetoresistive (GMR) and tunneling magnetoresistive (TMR) sensors pushed HDD capacities 10-20 times higher. Modern HDDs now rely entirely on TMR sensors to support the incredible recording densities mentioned earlier.

Perpendicular Recording

Another recent shift that enabled greater HDD storage densities was the move to perpendicular magnetic recording (PMR). Earlier longitudinal recording aligned the north and south magnetic poles in the horizontal plane along the platter surface. However, this method reached its practical limit once bits became too small to hold their magnetic alignment reliably.

PMR techniques align the magnetic poles perpendicularly in the vertical direction, pointing up or down from the platter surface. This allows for stronger magnetic integrity at ultrasmall bit sizes and greatly increased recording densities. All modern HDDs now utilize PMR technology to maximize capacity.

Data Encoding Schemes

While HDDs physically store data as magnetic polarities, the binary 1s and 0s must still be encoded into patterns that the head can accurately write and retrieve. Early HDDs used simple encoding schemes like non-return-to-zero (NRZ) and modified frequency modulation (MFM). But more advanced schemes emerged later to boost density.

Run-length limited (RLL) encoding compresses data by limiting how many sequential 1s or 0s can occur, reducing the number of magnetic polarity transitions needed. Low disparity codes like RLL 2,7 helped minimize signal distortion at higher densities. Later schemes like advanced run-length limited (ARLL) and run-length limited variable (RLL(V)) pushed densities higher.

Modern HDDs increase density even further by using higher efficiency schemes like low-density parity-check (LDPC) encoding. The HDD controller uses these advanced encodings to translate between the raw user data and the low-level magnetic representations.

Shingled Magnetic Recording

A newer technique called shingled magnetic recording (SMR) layers magnetic tracks in an overlapping fashion, similar to shingled roofing tiles. This allows tracks to be narrower and squeezed closer together for higher bit densities. The downside is rewriting tracks requires overwriting adjacent tracks as well in sequence.

SMR comes in two main flavors: drive-managed SMR which is transparent to the host system, and host-managed SMR which requires the host system to write data sequentially within shingled bands. Overall, SMR enables HDDs to advance their capacities moving forward.

Two-Dimensional Recording

An emerging concept for next-gen HDDs is two-dimensional magnetic recording (TDMR). This technique uses materials with a special property -they generate a strong magnetization component perpendicular to their plane. This could allow bits to be stacked in columns vertically across the magnetic layer, multiplying density.

Early TDMR lab research has demonstrated densities up to 10 Tbpsi and beyond. If commercialized successfully, 2D recording could allow HDD capacities to scale up to 100 TB or more in the future. Other advanced technologies like bit-patterned media, microwave-assisted recording, and heat-assisted recording also hold promise for pushing HDD density limits going forward.

The Low-Level Format Process

When an HDD is manufactured, the platters contain no organized magnetic regions or data. So the first step is to perform a low-level format which initializes the magnetic platter surfaces into pristine condition. This process divides each platter into concentric tracks spaced microscopically close together, then sectors within each track, providing empty magnetic regions to store data.

The HDD’s internal formatter electronics handles the low-level formatting tasks, including:

  • Magnetically erasing any stray regions on the platters
  • Writing servo sector patterns used for seeking
  • Writing timing synchronization fields
  • Writing the sector ID fields

This prepares the magnetic platters with initial formatting so they are ready to store user data. Low-level formatting is performed at the factory and can also be done by HDD diagnostic tools to revive corrupted platters.

High-Level Formatting

After low-level formatting sets up the magnetic infrastructure, the HDD is still not quite ready for data storage. The operating system must still conduct high-level formatting to structure the hard drive into usable file storage space.

The OS formatting process includes:

  • Creating the partition table defining partitions on the disk
  • Creating an empty file system structure within each partition
  • Assigning drive letters to partitions

The partition table splits the HDD into separate logical divisions. Each partition can have its own file system like FAT32 or NTFS created within it. The file system organizes the raw space into files and folders, allocating space for vital structures like the file allocation table (FAT). Once high-level formatting is complete, the HDD is fully prepared for the OS and applications to read/write actual user files.

Reading and Writing Data

When the OS needs to save a file to disk, it sends the file data to the HDD controller, along with the logical block address where the data should be written. The controller then converts the logical address to the corresponding physical location on the platters and writes the binary file data as a stream of magnetic polarities.

To support random access, the platters spin continuously. When the head is positioned over the requested location, the write circuitry encodes the incoming data stream into magnetic polarity reversals which the head induces onto the platter surface as it passes under.

Reading data works similarly in reverse. The host system requests data from a logical block address. The controller determines the physical platter location then positions the head over the track as it rotates by. The MR sensor in the head detects the magnetic polarity changes, generating an electrical signal sent to the read circuitry. This decodes the pattern back into the original binary data, which is returned to the host.

Conclusion

In summary, hard disk drives are able to store vast amounts of data by encoding it as microscopic magnetic polarities on fast spinning platters. A read/write head uses electromagnetic principles to flip the north/south alignment of tiny magnetic regions representing individual bits. Advances in recording density, sensors, encoding, and other technologies have enabled HDD capacities to scale tremendously over time. And new innovations continue to push the limits, allowing HDDs to remain a viable, high-capacity storage technology moving forward.