How a hard drive works

Who I am
Lluís Enric Mayans
Author and references

How hard disk works

To understand how a hard drive works it is less complex than you think, let me explain it to you. You can think of a hard drive as one or more platters, generally of glass, aluminum or even a mixture of ceramic and glass, positioned parallel to each other, and coated with a ferromagnetic material (such as cobalt) on which data are stored and read, in the form of bit (i.e. 0 and 1), and that thanks to the use of magnetic heads that skim the surface of the disk and change its polarity, store information in it.

Nowadays, the main interface used for connecting hard drives and computers is the SATA (Serial Advanced Technology Attachment, i.e. advanced serial link technology), which uses only two cables for data transfer, one for theinput (the entrance) and the other for theoutput (the exit).

In terms of size, there are hard drives from 2,5 inches e 3,5 inches. The former are mainly used in laptops (which however now, as already mentioned, almost always use SSDs and no longer mechanical disks) as they are smaller; the 3,5 ”ones, on the other hand, are larger and are mainly used on desktop PCs (fixed).

Physical characteristics

Mechanical hard drives (HDDs) are distinguished by several factors, such as the data access time, depending on the rotation speed of the plates (which is normally indicated by the acronym RPM, from English Revolution per Minute, or rotations per minute), the storage capacity and maximum data transfer rate. Let me explain what they represent.

  • Access time - as anticipated, the access time depends on how fast the magnetic heads are able to pick up a data. But what does the speed of rotation have to do with it? Well, the faster the disk spins, the sooner the head will be able to read the data inside the platter, as it will require a complete rotation of the disk each time to reach the data. On the market there are HDDs with different rotation speeds: mediament, and for home use 5.400 o 7.200 rpm may be more than enough, but you can find discs with a rotation speed even equal to 15.000 rpm. The disk access time for reading a single data is equal to a few milliseconds.
  • Storage capacity - you will have already guessed what this voice represents, and you are certainly right; the amount of bytes (one byte consists of 8 bits) that can be saved on a hard disk depends on the storage capacity. Normally we consider the size of HDDs in the order of magnitude of Gigabyte, but it is also possible to find models with capacities of a few Terabytes on stores such as Amazon.
  • Transfer speed - transfer speed, on the other hand, refers to the amount of information that the disc is capable of reading or writing in a millisecond, and is influenced by the speed of rotation of the disc and by the storage density, i.e. by how much data can be physically stored in a certain area of ​​the disc.

Do you already feel your head smoking? I know, that's a lot of information, but by carefully rereading what I've written, maybe a couple of times, I'm sure it won't be a problem for you to understand the concepts I have outlined.

Logical organization

Now let's move on to the logical structure of a disk, namely the file system, which is nothing more than the mode used by the operating system to organize files within the mass memory. Thanks to it, the operating system is able to physically read and write data on the disk, assigning them to the files on the computer. You know the formatting? Well, it is the procedure by which you "zero" a disk (or a logical portion of it, called partition) and configure a file system on it.

You should know that there are different types of file systems, with different characteristics and performances, and they vary according to the operating system on which they are used; among the most long-lived and used ones I point out the FAT32, compatible with practically every device and operating system, but now obsolete and full of limitations (it does not allow you to save files larger than 4GB each and is subject to excessive fragmentation which slows down its performance in the long term); NTFS (New Technology File System) instead it is the default file system of modern Windows systems and, although it is subject to fragmentation, it guarantees performances clearly superior to FAT32 and has no stringent limits on the size of the files. It is supported by many operating systems and devices, however in some cases, such as on Macs, it is necessary to use special drivers to enable write support.

EXFAT it is an evolution of FAT32 without stringent limits on file size and without excessive fragmentation problems: it is less supported than FAT32, but with more transversal read and write compatibility than NTFS; APFS e HFS + are the file systems used by macOS (excellent, but poorly compatible with Windows, unless you install external drivers), while EXT2, EXT3 ed EXT4 are the file systems used by Linux, which are also quite limited in terms of compatibility in other environments but with excellent performance.

Now, to help you better understand the organization of a hard drive, I will explain what are the elements that make up the logical structure of a hard drive, get ready!

  • Track - treats each plate inside the disc as a set of concentric rings. Each ring is considered a trace.
  • Sector - the disc is further divided into “segments”, generally of variable size ranging from 32 B to 4 KB, which together with the tracks represent the sectors of a track or vice versa.
  • cluster - a cluster is the set of adjacent sectors, therefore present on the same track and contiguous.
  • Cylinder - is the set of all the traces, with the same distance from the center, of each plate.

These elements allow the disk to read data thanks to a so-called coordinate system CHS, or Cylinder-Head-Sector (cylinder, head and sector).

If you are interested in buying an internal HDD, I have written a guide to help you in your choice or, if you want to do it first, I leave you below some hard drives among the best in value for money.

See offer on Amazon See offer on Amazon See offer on Amazon

How external hard drive works

Basically, a external hard disk it is almost identical to an internal one: on a physical and logical level they are practically the same thing, however there are some substantial differences that make the two systems suitable for different circumstances.

In terms of performance and size, the two don't differ particularly. In terms of connection, however, there are substantial differences. Instead of the SATA attack, external drives use theUSB: you can therefore connect to any computer or device equipped with this port and exchange files with it (as long as it uses a compatible file system). In some cases, in the case of external 3.5 "drives, it may also be necessary to connect to the power supply.

The data transfer speed on external disks is also affected by the version of the USB interface used: most computers and disks support the standard USB 3.2 which promises a data transfer speed of 5 Gigabit / s (625 MB per second), but when connected to devices that only support the old standard USB 2.0 they travel up to 480 Mbits / s (60 MB per second). For a complete overview of the USB standards currently available, I leave you to my guide dedicated to USB sticks.

There are also discs that support the interface Thunderbolt, which is now mainly used via type ports and connectors USB-C (those more flattened than the classic USB-A connectors and which can be inserted in both directions), while in the beginning he used ports and connectors in Mini DisplayPort (MDP). This interface is supported by some higher-end computers and guarantees data transfer rates up to 40 Gbit / s (5 GB / s).

If it is not clear to you exactly how a hard drive works, I invite you to re-read what I wrote in the previous chapter. I also leave you to my buying guide on external hard drives, if you need to buy one (below are some models, among the most interesting of the moment).

See offer on Amazon See offer on Amazon

How SSD hard drive works

Now, as announced, let's briefly move on to SSD. I begin by clarifying that the definition of "SSD hard disk" is in fact incorrect, since SSD indicates a completely different technology.

An SSD drive, or solid state drive, is a mass storage unit that differs from normal and older hard drives thanks to its higher speed and performance, but at the cost of lower capacity in relation to the price (even if these are rapidly decreasing) and a duration of “predetermined” life, as with maximum supported writing limits (although difficult to reach in standard use).

I begin by talking to you about the substantial difference that distinguishes the two technologies, namely the use of flash memory. In fact, in the HDD, magnetic heads are used for reading and writing data, while in the other case, thanks to this technology NAND flash, the data is stored inside memory cells made of semiconductor materials capable of retaining the electric charge inside even in the absence of power to the computer, just like RAM memories, with the only difference that the latter is a memory volatile, and consequently in the absence of power the cells are reset.

The data reading is carried out thanks to this principle, an internal disk controller takes care of checking the status of each cell, which if it contains an electric charge will represent a 1, in case there is no voltage present, instead, it will return one 0.

This technology is "harmful" for the disk, since at the cost of a better access speed, thanks to the constant reprogramming of the memory cells, the semiconductor material tends to wear out and lose its ability to save its charge and consequently effectively store data.

In summary: SSDs do have limits (now difficult to reach even with intensive use), but they offer so many advantages - in terms of performance, resistance and practicality - that they are rightly supplanting mechanical disks.

Internal SSDs (there are also portable ones, such as mechanical hard drives) can be connected via the classic SATA interface or via M.2 interface, much faster, which uses the connectors of the standard PCI Express Mini Card.

If you want more information about it and / or want to buy a new SSD disk, this guide I wrote about it could help you, or alternatively try to take a look at the products below.

See offer on Amazon See offer on Amazon

There are also hybrid drives, called sshd (Solid State Hybrid Drive), which combine a portion of flash memory with a mechanical disk to match the data access speed of a solid disk with the larger capacity of a hard disk. They are ideal for saving a few euros and keeping a part of the disk (the mechanical one) for data storage and taking advantage of the speed of the SSD part to install the operating system and applications.

How Network Hard Drive Works

There is another system for storing data, called NAS (Network Attached Storage), which allows you to set up a server inside the network on which to store files and make them accessible by users inside (or even outside) the network, thus also allowing remote backup.

It uses one or more internal hard disks on which files are stored over the network, allowing the various devices inside it to access them at any time. The main uses are the sharing of multimedia contents, to watch videos from the Smart TV or mobile phone, the creation of a server FTP (File Transfer Protocol) for remote file transfer, or for automatic data backup; in this case we speak of a system RAID (Redundant Array of Independent Disks), or Redundant set of independent disks. There are, in this regard, various RAID systems: let me illustrate some of them.

  • RAID 0 - in this case two hard disks are used to create a single logical disk, storing the data inside it. Should one of the two drives fail, the data would be made inaccessible.
  • RAID 1 - it uses a principle called mirroring, that is, it “mirrors” the data stored on one disk within another. For this system you need two hard disks, on which the same data will be stored in parallel, therefore, if one of the two disks should break and make the data inaccessible, there will be a copy of them inside the other.
  • RAID 5 - it is a mixture of the two previous systems, thanks to the use of a third parity disk, the stored data are safe in case of failure of one of the drivers. If two disks are broken, the data will be lost.

If you are interested in knowing how to configure your NAS system within your home network, I have written a guide about it that could be just for you, I highly recommend you check it out!

There are also some network hard drive sold individually and which, connected only to your router, allow you to share data on the network. Some routers also allow you to turn any USB hard drive into a network drive, simply by connecting them to their USB port and activating data sharing from the management panel. More info here.

How a hard drive works

Audio Video How a hard drive works
add a comment of How a hard drive works
Comment sent successfully! We will review it in the next few hours.