A hard disk partition is a defined storage space on a hard drive. Most operating systems allow users to divide a hard disk into multiple partitions, in effect making one physical hard disk into several smaller logical hard disks.
Reasons to Use Hard Disk Partitions
A user may decide to split a hard disk into multiple partitions in order to organize his/her data more effectively. On Microsoft Windows machines, it is common to store the OS and applications on one hard disk partition and user data on another. When a problem occurs with Microsoft Windows, the OS partition can be completely formatted and reinstalled without affecting the data partition.
A user may decide to split a hard disk into multiple partitions because smaller partitions often have smaller cluster sizes. A cluster size is the smallest chunk of data that a partition can store. A large partition might have a cluster size of 16KB. This means that a file with one character in it will occupy 16KB of space on the disk. In a smaller partition, that file might only require 4KB to store. This is a useful strategy when storing a large number of small files.
A user may have to split a large hard disk into multiple partitions if the hard disk is larger than the partition size that the operating system supports.
Creating Hard Disk Partitions
Most operating systems use the `fdisk` command to create hard disk partitions. Many operating systems also have graphical tools that accomplish the same task.
Hard Disk Partitions and File Systems
Data is not actually stored in hard disk partitions.
Hard disk partitions store file systems, then these file systems store data.
Some operating systems blur the lines between partitions and file systems.
The Partition Table
Partition information is stored in the partition table, a reserved area at the beginning of a hard disk.
A standard partition table is only able to store information about four partitions. At one time this meant that a hard disk could have a maximum of four partitions.
To work around this limitation, extended partitions were created.
An extended partition stores information about other partitions. By using an extended partition, many more than four partitions can be created on a hard disk.
The four standard partitions are often called the primary partitions.
Partitions configured into an extended partition are often referred to as logical partitions.
When a partition is created, a special byte of data is written to record what type of partition it is.
Because multiple operating systems may share one hard disk, operating systems tend to agree on the meaning of these values.
The table below lists some of the partition types in use.
|DOS 12-bit FAT
|DOS 16-bit FAT <=32M
|DOS Extended Partition
|DOS 16-bit FAT >=32
|OS/2 HPFS, WinNT NTFS
|OS/2 Boot Manager
|Win95 FAT32 (LBA)
|Win95 FAT16 (LBA)
|Win95 Extended (LBA)
|Unix System V, Mach, GNU HURD
|Novell Netware 286
|Novell Netware 386
|MINIX until 1.4a
|Solaris X86, Linux swap
|FreeBSD, NetBSD, BSD/386, 386BSD
|BSDI BSD/386 filesystem
|BSDI BSD/386 swap
|Solaris 8 bootable
|Xenix Bad Block Table