HDD: structure and operation
In short: A hard drive (HDD) stores data magnetically on rapidly rotating platters. A movable read/write head hovers just above the surface, magnetizes tiny areas (bits) and reads them back later.
In more detail: The platters are made of glass or aluminum with a magnetic layer. Each tiny area is magnetized in one of two directions, giving 0 and 1. The mechanics make the HDD slower than an SSD but cheaper for large quantities.
In Depth
Structure:
- Platters: 1 to 10 disks rotating at 5,400 or 7,200 rpm (server: 10,000+).
- Spindle motor: Spins the platters.
- Read/write heads: One per platter side, on an arm (actuator arm). It floats on an air cushion about 3 – 10 nm above the surface and does not touch it.
- Voice-coil actuator: Moves the heads quickly to the right track.
- Controller board and cache (buffer 64 – 512 MB).
Data organization:
- Tracks: concentric circles.
- Sectors: Sections of a track, classically 512 bytes, today 4096 bytes (Advanced Format).
- Cylinder: The same track on all platters.
- Zones (zone bit recording): Outside there are more sectors per track, so outer areas are faster.
Storing and reading:
- Writing: The head creates a small magnetic field. Depending on current direction the area below is magnetized north/south.
- Reading: While passing, magnetic transitions change the resistance in the read head (GMR/TMR effect), the signal is decoded to bits.
- Recording method: Today mainly perpendicular recording (PMR), magnetic regions stand perpendicular in the layer. Newer methods: SMR (overlapping tracks), HAMR/MAMR (with laser/microwaves for higher density).
- Error correction (ECC) repairs read errors.
Access time: Positioning the head (seek time ~8 ms) + waiting for the sector to pass by (rotational latency ~4 ms at 7,200 rpm). This explains why accesses at many places (random) are very slow. Contiguous reading reaches ~150 – 250 MB/s.
Pros and cons:
- Cheap per GB, high capacity (up to 30 TB), good for archives and backups.
- Slow, audible, sensitive to shocks (head crash), more power-hungry than SSD.
- Defragmentation used to help against accesses at many places. Pointless on SSD.
- S.M.A.R.T. reports wear: reallocated sectors, operating hours.
See also: HDDs, Hard drives, NAND flash