How do external hard drives store data?

An external hard drive is a portable storage device located outside of a computer that stores digital data. It connects to a computer, usually through a USB cable or wireless connection (https://www.techopedia.com/definition/2940/external-hard-drive). External hard drives allow you to back up files and data from your computer, providing an additional way to store important information securely.

External hard drives contain most of the same components as an internal hard drive. The main components include disk platters that store data, read/write heads that read and write data, a spindle motor that rotates the disk platters, and a firmware chip that controls the input and output of data. The hard drive is encased in a durable outer casing and connects to the computer through the interface and cable.

When connected to a computer, the computer’s operating system interacts with the hard drive’s built-in firmware to store, retrieve, and manage data. External hard drives draw power over the cable interface to run the components inside. Data is written in binary code onto the spinning disk platters and is later read by the read/write heads.

Disk Platters

Hard drives contain disk platters that store data magnetically. These platters are made of non-magnetic materials like aluminum, glass, or ceramic and are then coated with a thin magnetic layer[1]. Common platter sizes range from 1.8 inches for smaller drives up to 3.5 inches for desktop hard drives. Platters in modern hard drives typically spin at speeds between 5,400 and 15,000 rpm[2].

As the platters spin, the read/write heads can access data from anywhere on the drive. Having multiple platters increases storage capacity and enables simultaneous lookups in different locations. The high-speed spinning allows quick access to data across the drive’s surfaces.

Hard drive platters are precision-engineered with remarkably flat and defect-free surfaces. This enables the read/write heads to float just nanometers above the platter surface during operation. Any contamination or physical damage to a platter can render stored data unreadable.

[1] https://en.wikipedia.org/wiki/Hard_disk_drive_platter

[2] https://webuyuseditequipment.net/are-hard-drive-platters-worth-anything/

Read/Write Heads

The read/write heads are the small parts inside a hard drive that read and write data to the disk platters. They float just above the disk surface on an air cushion to prevent damage to the platter surface. The read/write heads contain tiny electromagnets that are used to detect and modify the magnetization of the material on the disk platter to read or write data (1).

The read/write heads are attached to the end of an actuator arm, allowing them to move in unison across the surface of the disk platters. There is typically one read/write head for each platter surface. As the platters spin, the read/write heads can access data from any location on the drive by moving across the radius of the platters (2). Extremely small movements of the actuator arm allow the heads to be positioned precisely over the desired track.

The electromagnets in the read/write heads detect and modify the magnetic fields of the disk surface to read or write binary data. During a read operation, the magnetic fields of the platter induce current in the read/write head, which is decoded into binary data. To write data, current is sent to the electromagnet on the head, modifying the magnetic field and encoding binary data onto the platter (1).

The distance between the heads and platters is tiny, often less than the width of a human hair. This allows the heads to rapidly and accurately read and write data on the high-speed spinning disks inside the hard drive enclosure.

(1) https://en.wikipedia.org/wiki/Disk_read-and-write_head

(2) https://www.techopedia.com/definition/9112/readwrite-head

Spindle Motor

A spindle motor is responsible for spinning the disk platters at a consistent high speed inside the hard drive enclosure. The spindle motor typically spins at speeds between 5,400 RPM to 15,000 RPM depending on the performance class of the hard drive.

Faster spindle speeds allow data to be accessed more quickly from the platters, but also generate more heat and consume more power. Server-grade hard drives often use 10,000 RPM or 15,000 RPM motors, while consumer hard drives typically use 5,400 RPM to 7,200 RPM motors as a tradeoff for noise, heat, and energy efficiency.

The spindle motor contains electromagnets that are switched on and off at specific intervals by the motor drive circuitry. This creates a rotating electromagnetic field that causes the central spindle to spin continuously at high speeds. Ball bearings help reduce friction so the platters can spin smoothly and consistently. Maintaining a precise spin rate is critical for accurate and reliable data access.

Some key engineering challenges for the spindle motor include achieving the desired spin rate performance, minimizing vibration and runout, handling thermal dissipation from high speeds, and optimizing bearing life and reliability. Overall, the spindle motor plays a central role in enabling hard drives to deliver fast data access speeds.

(Sources: https://hddsurgery.com/blog/hdd-spindle-motor, https://superuser.com/questions/1578639/can-hdd-low-speed-spindle-motor-be-replaced-with-high-speed-one)

Actuator Arm

The actuator arm holds the read/write heads and moves them across the platters so they can access different tracks of data. The arm is made of aluminum or magnesium alloy and attaches on one end to a pivot point known as the actuator axis. On the other end, the arms holds the read/write head assembly.

When the hard drive needs to access a particular piece of data, the actuator arm swings the heads to the correct track location. Motors rapidly and precisely position the arm so the heads are aligned with the target track. The arm can swing very quickly to enable fast data access – on the order of just a few milliseconds. High precision is critical as tracks on modern hard drives can be extremely narrow, with thousands of tracks per inch.

Some actuator arms contain a secondary microactuator that provides finer control over head positioning. This allows the arm to make tiny adjustments and keep the heads centered on tracks for optimal performance.

Firmware

Hard drive firmware refers to the low-level software that handles input/output operations and controls the basic functioning of the drive. The firmware provides the interface between the drive’s physical components and the computer’s operating system. It is typically stored on reserved areas of the hard drive’s platters. Some key responsibilities of hard drive firmware include:

  • Initializing drive components like the read/write heads, spindle motor, and actuator arm.
  • Managing the motion of the disk head assembly to locate and access requested data.
  • Controlling the spindle motor’s rotational speed.
  • Implementing error detection and recovery procedures.
  • Interpreting logical block addresses and mapping them to physical locations.
  • Optimizing drive performance through caching, prefetching, and queue reordering.

Hard drive firmware plays a crucial role in enabling the operating system to interact with the storage device seamlessly. Periodic firmware updates help improve drive functionality, compatibility, speed, and reliability over time.

Interface

The interface of an external hard drive determines how it connects to a computer and what speeds it can operate at. Most external hard drives today use a USB, Thunderbolt, or FireWire interface. Examples include:

  • USB – Most external hard drives connect via USB, with the USB 3.0 and 3.1 standards offering maximum speeds of 5Gbps and 10Gbps respectively (still much slower than internal drives).[SOURCE_1] USB is standard on all computers and operating systems.
  • Thunderbolt – External Thunderbolt drives can achieve blazing fast speeds up to 40Gbps but have traditionally been expensive options aimed at professionals. Thunderbolt ports must be present on the computer.[SOURCE_1]
  • FireWire – Once common on Mac external drives, FireWire offers speeds up to 400-800Mbps. FireWire ports are rare on modern PCs and Macs. [SOURCE_2]

While the drive technology inside the enclosure determines the maximum drive performance, the interface ultimately limits how fast data can be transferred to and from the external drive.[SOURCE_3] For example, a SATA III drive capable of 6Gbps will still be limited to 5Gbps when connected via USB 3.0.

Data Encoding

Data is stored on a hard disk drive by encoding binary data into patterns of magnetized spots on the disk platters. The disk heads read these magnetic patterns to decode the binary data. There are a few main encoding schemes used over the years:

Frequency Modulation (FM) encoding was one of the earliest schemes, used in early HDDs in the 1950s. It stored data by modulating the frequency of magnetic flux changes on the disk surface. But it was inefficient in storing data density.

Modified Frequency Modulation (MFM) improved storage density by encoding data to transitions between magnetic flux states, rather than just the frequency. This allowed packing data more tightly.

Run Length Limited (RLL) encoding schemes placed constraints on how data was encoded to limit the length of flux transitions. This further improved storage density. Common RLL codes are RLL 2,7 and RLL 1,7.

Partial Response Maximum Likelihood (PRML) encoding is used in modern HDDs. It allows even higher densities by tolerating controlled inter-symbol interference between flux transitions. The data is decoded using maximum likelihood techniques.

Overall, these encoding schemes have enabled incredible increases in the data density stored on hard disks over the decades, from a few megabits per square inch to over 1 terabit per square inch today. The encoding and signal processing allows packing binary data very tightly using magnetic transitions on the platters.

Sources:

https://www.tomshardware.com/reviews/hard-drive-magnetic-storage-hdd,3005-5.html


https://cs.stanford.edu/people/nick/how-hard-drive-works/

File System

The file system is what organizes and tracks where data is stored on an external hard drive. There are a few main file system formats used for external drives:

FAT32 is an older file system that has some limitations but works with all operating systems. It can handle drives up to 2TB and files up to 4GB in size.1

NTFS is the modern Windows file system, supporting larger drives and file sizes. But it may not work on non-Windows devices.2

HFS+ is the Mac equivalent, optimized for macOS but with limited support elsewhere.1

exFAT aims for compatibility, supporting larger drives and working across Windows, macOS, and Linux. But it lacks some advanced features.3

The choice depends on the drive’s intended use and the systems it will connect to.

Conclusion

To summarize, external hard drives store data using a series of spinning disk platters coated with magnetic material. Read/write heads float above the platters to read or write data by magnetizing areas on the platters. A spindle motor spins the platters at high speeds, while an actuator arm moves the heads to the desired track and sector. Sophisticated firmware controls the components and interfaces with the computer. Data is encoded in binary patterns of magnetization. A file system organizes the data into files and folders.

In the future, we can expect continued advances in hard drive technologies like HAMR, HDMR, BPM, and MAMR to increase capacities. Alternative storage technologies like DNA storage, holographic memory, and memristors may one day replace hard drives, but hard drives will likely remain dominant for at least the next decade.