How Hard Drives Store Data: Inside the Mechanics and Architecture
This article explains the types, components, operation principles, data layout, read/write process, locality-based prefetching, fragmentation, capacity calculations, and RAID configurations of modern hard disk drives, providing a comprehensive technical overview for anyone interested in storage fundamentals.
Preface
Hard disk types include SCSI, IDE, and the currently popular SATA; each follows specific standards that evolve over time, such as SCSI‑1, SCSI‑2, SCSI‑3, and ATA upgrades. Data is stored magnetically on rotating platters, where magnetized bumps represent binary 1 and non‑magnetized depressions represent binary 0.
01 Hard Disk Components
A hard disk consists of platters, read/write heads, spindle, motor, head controller, data converter, interface, and cache.
Platters are mounted on a spindle; each surface has a head that hovers a few micrometers above the surface, moving radially to access data. The heads are controlled by a head controller and operate in a sealed environment to avoid dust.
High‑precision design, air flow, and micro‑distance enable fast, reliable read/write operations.
02 Hard Disk Working Principle
Logically, a disk is divided into tracks, cylinders, and sectors.
Each platter side has a read/write head; the area near the spindle (landing zone) holds no data. Modern disks keep heads parked in this zone when idle.
During operation, the spinning platter creates airflow that lifts the heads, allowing them to move to the data region.
Head‑to‑platter distance has decreased from several micrometers to as low as 0.005 µm, improving sensitivity.
Any dust or head‑platter collision can cause data loss or damage.
03 Platters, Tracks, Cylinders and Sectors
Each platter (often aluminum or glass) has two usable surfaces, numbered from 0 upward. Tracks are concentric circles on each surface; a cylinder is the set of tracks with the same radius across all surfaces. Sectors are arc‑shaped segments of a track, typically 512 bytes.
1. Platters
Numbered from the top surface down, each platter surface corresponds to a head.
2. Tracks
Tracks are numbered from the outer edge inward; a typical surface has 300–1 024 tracks.
3. Cylinders
A cylinder groups tracks of the same radius across all surfaces, enabling fast electronic head switching.
4. Sectors
A sector contains a 512‑byte data block plus metadata such as identifiers, CRC, and ECC.
04 Disk Read/Write Principle
Data is written sequentially by cylinder, head, then sector. The controller moves the head to the correct cylinder (seek), waits for the target sector to rotate under the head (rotational latency), and then transfers the data.
Access time = seek time + rotational latency + transfer time.
05 Locality Principle and Disk Prefetch
Because disk I/O is much slower than memory, operating systems prefetch sequential blocks based on the locality principle: data near recently accessed data is likely to be needed soon. Prefetch size is usually a multiple of the system page (commonly 4 KB).
06 Disk Fragmentation
Fragmentation occurs when files are not stored contiguously, causing the read/write arm to seek multiple times. This increases access time and degrades performance.
07 Disk Capacity and Partition Size Calculation
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 765 6144831 7 HPFS/NTFS
/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)
/dev/hda3 2806 9729 55617030 5 Extended
/dev/hda5 2806 3825 8193118+ 83 linux
/dev/hda6 3826 5100 10241406 83 linux
/dev/hda7 5101 5198 787153+ 82 linux swap / Solaris
/dev/hda8 5199 6657 11719386 83 linux
/dev/hda9 6658 7751 8787523+ 83 linux
/dev/hda10 7752 9729 15888253+ 83 linuxEach sector is 512 bytes. Disk size = heads × sectors per track × bytes per sector × cylinders.
Example: 255 × 63 × 512 × 9729 = 80 023 749 120 bytes.
Manufacturers use decimal (×1000) while operating systems use binary (×1024), leading to different GB values.
Disk Arrays
RAID (Redundant Array of Independent Disks) combines multiple disks to improve performance, capacity, and fault tolerance. It provides striping, parallel reads, and redundancy through mirroring or parity.
Advantages
Higher throughput, fault tolerance via CRC and parity, and improved reliability.
Disadvantages
RAID 0 lacks redundancy; RAID 1 uses only 50 % of total capacity; RAID 0+1 offers a compromise.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
