How does HDD physically work?

How does HDD physically work?

I've used hard disk drives since I first started using computers. Before SSDs and cloud storage became prevalent, HDDs stored nearly all my digital data such as photos, music, videos, and documents. They hold many of my youthful memories—playing games with friends, writing reports, creating presentations, and programming applications.

However, I had never wondered about how they actually work until I began researching why SSDs are faster than HDDs. This motivated me to explore about storage devices further, how they work, and their advantages and disadvantages.

Firstly, In this article, we will explore how HDD physically works through the following questions:

  • What's its physical architecture?
  • How does it physically organize data?
  • How does it read and write data?

Physical Structure of an HDD

The hard disk drive has four key components: the platters (for storing data), the spindle (for spinning the platters), the read/write heads (for reading and writing data), and the actuator arm (for controlling the read/write heads).

HDD's main components

  • Disk (Platters):?The primary storage medium, circular disks coated with a magnetic material. Modern HDDs typically have multiple platters stacked vertically.
  • Spindle:?The spindle keeps the platters in position and rotates them as required. The revolutions-per-minute rating determines how fast data can be written and read (typically in 5,400 or 7,200 RPM).
  • Read/Write Heads:?Tiny electromagnetic devices that move above the disk platters and transform the platter's magnetic field into electric current and vice versa. They are located on a single actuator arm to synchronize the movement of all heads.
  • Actuator Arm:?Holds and positions the read/write heads over the desired location. Precision and speed are required to move quickly without causing damage to the platters.


Physical Data Organization

Data on an HDD is organized hierarchically, and stored magnetically on the surfaces of the platters. Each platter surface is organized into concentric circles called tracks, which are further divided into sectors. A group of tracks located at the same position on multiple platters is called a cylinder.

HDD's physical data organization

  • Tracks: Each platter surface is divided into concentric circles called tracks. Tracks serve as the primary division of data on the platter surface, organizing data in circular paths.
  • Cylinders: A cylinder is a set of tracks located at the same position on all platters within the HDD. Cylinders allow simultaneous read/write operations across multiple platters, improving performance.
  • Sectors: Tracks are subdivided into smaller segments called sectors. Sectors are the smallest physical storage units on the disk that the HDD can read or write. Each sector has a unique address defined by its cylinder number, head number (which platter surface), and sector number.
  • Clusters (Allocation Units): In filesystems, sectors are grouped into clusters or allocation units (from 1 to 64 sectors). Clusters are the smallest units of storage that the operating system's filesystem can allocate for a file.

Data Access

To read or write data, an HDD first positions its read/write heads at the desired storage location. It then uses magnetic technology to interact with the magnetic medium, either reading existing data or writing new data.

Locating

  • Command Reception: The HDD receives a read/write command from the computer, specifying the Logical Block Addressing (LBA) of the data.
  • LBA to CHS Translation: The HDD's controller translates the LBA into Cylinder Head Vector (CHS) coordinates to locate the physical position on the disk.
  • Seek Operation: The actuator arm moves the read/write head to the correct cylinder (track).
  • Rotational Latency: The drive waits for the platter to rotate until the desired sector is under the read/write head.

Writing / Reading

Sequential changes in the direction of magnetization represent binary data bit.

  • Writing: To write data, the write heads generate a small magnetic field that changes the polarization of magnetic domains on the disk. Each magnetic domain represents a bit of information (0 or 1).

  • Reading: The read head detects the magnetization direction of each domain as the disk spins. Modern read heads use technologies like magnetoresistance (MR) or giant magnetoresistance (GMR) to sense the absolute direction of magnetization.


Giant magnetoresistance (GMR) technology

Key Notes

  • The speed of the spindle motor impacts the rate of reading and writing data.
  • All read/write heads are moved in unison. The HDD controller optimizes data distribution to enable parallel data access across multiple platters
  • Binary data are converted to electric signals minored as magnetic domain polarity or magnetic field changes
  • The smallest unit of data that can be read or written is a sector (from 512 B to 4,096 B) identified by its cylinder number, platter surface number, and sector number.

Understanding the inner workings of HDDs sheds light on the technology that has been fundamental to data storage. From the mechanical precision of the actuator arm to the magnetic principles that store our data, HDDs are engineering marvels.

In the next article, we will dive deeper into HDD history and how magnetic storages work.

References:




要查看或添加评论,请登录

Hoan Tran Viet的更多文章

  • What exactly are VPN secure tunnels?

    What exactly are VPN secure tunnels?

    Most of us have used a VPN at least once—maybe to bypass website restrictions or securely access private company…

    2 条评论
  • MAC vs. IP Addresses: Why We Need Both?

    MAC vs. IP Addresses: Why We Need Both?

    I'm writing this article after drinking a couple of beers. It will not be formal and concise, but it is my spontaneous…

    1 条评论
  • How are Secret keys exchanged through insecure networks?

    How are Secret keys exchanged through insecure networks?

    In the previous post, we learned about the combination of symmetric keys (used for session data encryption) and…

    7 条评论
  • How Kubernetes authenticate internal access?

    How Kubernetes authenticate internal access?

    When you access the Kubernetes API server, you authenticate as a regular user. But what happens when Pods start making…

  • How are types of Cryptography combined in our daily activities?

    How are types of Cryptography combined in our daily activities?

    Nowadays, we spend much time on the Internet for reading news, watching videos, or surfing social networks. But have…

  • How Kafka achieves its design goals (Part II)

    How Kafka achieves its design goals (Part II)

    Following the previous article, we continue to explore key features of Kafka's design that help it achieve the target…

  • How Kafka achieves its design goals (Part I)

    How Kafka achieves its design goals (Part I)

    In recent years, almost of us have been using Kafka for many use cases such as message brokers, activity tracking, and…

    2 条评论
  • Analog recording history (Part III - Vinyl)

    Analog recording history (Part III - Vinyl)

    In the previous parts, we have explored phonograph cylinders which used cylinders as the medium to store audio signals.…

  • How the Edison Phonograph works

    How the Edison Phonograph works

    In the previous part, we explored the early history of analog sound recording. Edison's phonograph, invented by Thomas…

  • Analog audio recording history (Part I - Phonograph)

    Analog audio recording history (Part I - Phonograph)

    Cassette players preserve many memories of Vietnamese people from the 1970s to 1990s. At that time, my country was…

    2 条评论

社区洞察

其他会员也浏览了