Disk Drive with a Different File System
Image of a disk drive with a different file system.
Writing a file system to disk is only the first step. The goal of this process is to actually *store* and *retrieve* data. The figure below shows a drive disk after some data have been written to it:
Disk Drive with Data Written to It
Image of a disk drive with data written to it.
As xref:figu-partitions-drive-with-data[Disk Drive with Data Written to It], shows, some of the previously-empty blocks are now holding data. However, by just looking at this picture, we cannot determine exactly how many files reside on this drive. There may only be one file or many, as all files use at least one block and some files use multiple blocks. Another important point to note is that the used blocks do not have to form a contiguous region; used and unused blocks may be interspersed. This is known as _fragmentation_. Fragmentation can play a part when attempting to resize an existing partition.
As with most computer-related technologies, disk drives changed over time after their introduction. In particular, they got bigger. Not larger in physical size, but bigger in their capacity to store information. And, this additional capacity drove a fundamental change in the way disk drives were used.
Partitions: Turning One Drive Into Many
Disk drives can be divided into _partitions_. Each partition can be accessed as if it was a separate disk. This is done through the addition of a _partition table_.
There are several reasons for allocating disk space into separate disk partitions, for example:
Logical separation of the operating system data from the user data
Ability to use different file systems
Ability to run multiple operating systems on one machine
There are currently two partitioning layout standards for physical hard disks: Master Boot Record (*MBR*) and GUID Partition Table (*GPT*). *MBR* is an older method of disk partitioning used with BIOS-based computers. *GPT* is a newer partitioning layout that is a part of the Unified Extensible Firmware Interface (*UEFI*). This section and xref:sect-disk-partitions-extended[Partitions Within Partitions - An Overview of Extended Partitions] mainly describe the _Master Boot Record_ (*MBR*) disk partitioning scheme. For information about the _GUID Partition Table_ (*GPT*) partitioning layout, see xref:sect-disk-partitioning-guid-partition-table[GUID Partition Table (GPT)].
While the diagrams in this chapter show the partition table as being separate from the actual disk drive, this is not entirely accurate. In reality, the partition table is stored at the very start of the disk, before any file system or user data. But for clarity, they are separate in our diagrams.
Disk Drive with Partition Table
Image of an unused disk drive with a partition table.