Disk partitioning is a simple technique which can be viewed as a precursor of Logical volume management.
More than one operating system can be executed or installed in a single computer, without partitioning (LiveCDs, keydrives or a second hard disk unit with a bootable media that jumps to the second hard disk).
Table of contents
For UNIX-based and UNIX-like operating systems, fancy partitioning creates separate partitions for /, /boot, /home, /tmp, /usr, /var, /opt and swap. This ensures that if one file system gets corrupted, the rest of the data (the other file systems) stay intact, minimizing data loss. This has the disadvantage of subdividing the drive into small, fixed-size partitions, so, for instance, a user can fill up their /home partition and run out of useable hard drive space, even though other partitions still have plenty of free space. A good implementation requires the user to predict how much space each partition will need; sometimes a difficult task. Typical desktop systems use the other convention; a "/" (root) partition containing the entire filesystem and a separate swap partition.
Drive partitioning on the IBM PC
For a detailed discussion of how partitioning is implemented in the IBM PC architecture, see Partition (IBM PC). The rest of this article will concentrate on the practical aspects of PC hard drive partitioning.
Partitioning is done for several reasons:
- It is required. At least one partition must be created to provide an area recognizable by the operating system where a file system can be created.
- Some filesystems (e.g. old versions of the Microsoft FAT filesystem) have size limits smaller than a modern disk drive.
- If one partition becomes corrupt, you can attempt to salvage data onto another partition. This is similar to RAID, except on the same disk.
- On some OSes, e.g. Linux, the swap file is normally a partition of its own. When it is, systems with a dual boot configuration can make several OSes use the same swap partition and therefore save disk space.
- To prevent overgrown log or other files from making the whole computer unusable, they are put on their own partition. Then only one partition will run out of space.
- Often, two operating systems cannot coexist on the same partition, or use different "native" disk formats. The drive is partitioned into different logical disks for different OSes.
- For editing large files (such as photo and video files), scratch partitions are used to store the image that is currently being worked on (or file change history), thus increasing the speed and stability of the program. One popular program that utilizes scratch partitions is Adobe Photoshop CS.
- The speed of the harddrive is partially dependent on the cluster size. For some filesystem types, smaller partitions on one physical harddrive decrease the cluster size (because cluster size is directly proportional to partition size for those filesystem types), thus helping increase read and write speed.
Numerous partitioning schemes have appeared during the years, for almost all computer architectures in existence. Many of them are relatively transparent and allow convenient manipulation of the disk partitions; some however are obsolete in design and are accompanied by numerous quirks.
The partition table, as used in the IBM PC architecture, was first devised in 1982, when hard drives were coming into use. It is a simple table, consisting of up to 4 records, each of which indicating where the partition starts, where it ends and what its type is. In addition, an "active" flag is provided that tells the Master Boot Record from which partition to boot.
This scheme is widely considered obsolescent, because it allows for only 4 partitions (later, that is in 1987 with DOS 3.3, an expansion of this format that provides for "container" logical partitions that contain up to 24 secondary partitions inside themselves eased this problem somewhat, though by no means solved it), and because it has certain compatibility problems with hard drives bigger than 8 gigabytes in size. As the IBM PC architecture is extremely common, the partition tables are likely to stay for a while. However, a recent project of Intel and Microsoft called the Extensible Firmware Initiative (EFI) has a component called GUID Partition Table (GPT) that will, perhaps, provide a much better solution from the problem on future generations of PCs.
Legacy partition tables are complicated to administer, and have numerous quirks. The reader that is interested in modifying his partition table is strongly advised first to study these quirks, and only then modify the drive. In addition, it is strongly recommended to do the modifications only using properly tested partition utilities, such as GNU Parted or Symantec's PartitionMagic.
With Windows the standard partitioning scheme is to create a single partition, the C: drive, where the operating system, data, and programs all reside. It is recommended, however, to create multiple partitions or use multiple hard drives where the first partition (C:) is stored on one partition with the rest of the partitions and/or drives allocated to applications and data. The "My Documents" folder, a "special folder" home directory, can be mounted to take up the entire free space on a separate partition.
List of partition utilities
- GNU Parted, fdisk, cfdisk
- Norton's PartitionMagic
- Mandrake's DiskDrake
- Acronis's DiskDirectorSuite
- TeraByte Unlimited's BootIt NG