Understanding Hard Disk Structure, Partitions, and File Systems (MBR vs GPT)
This article explains the physical components of hard disk drives, the concepts of tracks, cylinders and sectors, compares MBR and GPT partition schemes, outlines common file system types, and provides practical command‑line examples using fdisk and parted for creating, modifying, and deleting partitions on Linux.
Hard Disk Drive (HDD) is a storage medium composed of one or more aluminum or glass platters coated with magnetic material. The physical structure includes read/write heads, platters, a motor, a controller chip and cables; the motor spins the platters while the heads move to the appropriate track, hovering above the surface to read magnetic fields and locate sectors. Track: The circular path traced by a head on the disk surface. Cylinder: A set of tracks at the same radius on multiple platters. Sector: A segment of a track, typically 512 Bytes. Track, Cylinder, Sector, Heads, Platters – each platter has two surfaces, thus two heads. Three‑dimensional addressing (Cylinders‑Heads‑Sectors) is used to locate data. Common partition table types include BSD, DVH, GPT, LOOP, MAC, MSDOS (MBR), PC98, SUN. Two widely used formats are described below. MBR (Master Boot Record): The first sector of a disk (Cyl 0, Head 0, Sector 1) of 512 Bytes, containing 446 Bytes bootloader, a 64‑Byte partition table (max 4 primary partitions), and a 2‑Byte boot signature. Each primary partition can be up to 2 TB. GPT (GUID Partition Table): A modern standard that stores partition entries at the beginning and end of the disk, supporting up to 18 EB and an unlimited number of partitions (limited by the OS). The first sector remains an MBR for compatibility. File systems: Typical types are ext2/3/4, XFS, FFS, UFS, ReiserFS, JFS, VFAT (FAT32), NTFS. A file system abstracts physical storage into files and directories, handling allocation, deallocation and metadata. On Linux (e.g., CentOS) disk partitions can be managed with fdisk (MBR only) or parted (supports GPT). Example fdisk commands: # fdisk -cu /dev/sdb p # print partition table n # new partition d # delete partition t # change partition type w # write changes and exit Creating a 2 GB primary partition with fdisk : # fdisk -cu /dev/sdb Command (m for help): n # new partition p 1 First sector (2048-...): 2048 Last sector, +size{K,M,G}: +2G Command (m for help): t 83 Command (m for help): w After creating, view the table with fdisk -l /dev/sdb . To delete, use d followed by w . With parted , the syntax is: # parted /dev/sdb mklabel gpt # parted /dev/sdb mkpart primary ext2 1G 3G # parted /dev/sdb print # parted /dev/sdb move 1 3G 5G # parted /dev/sdb rm 1 # parted /dev/sdb rescue 3G 5G File system creation uses mkfs or mke2fs for ext families. The ext file system layout includes boot sector, block groups, superblock, filesystem description, block bitmap, inode bitmap, and data blocks. Key ext components: boot sector, block groups (uniform size), superblock (metadata, replicated), filesystem description (layout), block bitmap (free/used blocks), inode bitmap (free/used inodes), and data blocks (actual file contents). Management commands include mke2fs , tune2fs , dumpe2fs , e2label , e2fsck with various options for block size, label, reserved space, features, and mounting options.
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.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
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.
