Disk partitioning
From Wikipedia, the free encyclopedia
In computer engineering, hard disk drive partitioning is the creation of logical divisions upon a hard disk that allows one to apply operating system-specific logical formatting. In layman's terms, partitioning a hard drive makes it appear to be more than one hard drive, especially in how each partition is formatted for different operating systems, and in how files are copied from one partition to another.
Contents |
[edit] Purpose
Partitioning allows the creation of several file systems on a single hard disk. This has many benefits, including:
- Allowing for dual boot setups (for example, to boot Microsoft Windows and Linux), which means the user can have more than one operating system on his/her computer, although only one can be used at a time.
- Sharing swap partitions between multiple Linux distributions, which means less hard drive space is wasted on Linux swap partitions.
- Protection or isolation of files, which means if the operating system stops working, it can just be reinstalled without, hopefully, deleting the user's personal files and settings.
- Raising overall computer performance. Hard drives with one partition have very large MFT Tables and are generally slower than hard drives with multiple partitions
Partitions may be customized to different requirements, for example, allowing for read-only partitions to protect data - if one partition is damaged, none of the other file systems are affected, and the drive's data may still be salvageable.
[edit] Types of partitions
[edit] Primary
A primary partition contains one file system. In MS-DOS and earlier versions of Microsoft Windows systems, the first partition (C:) must be a "primary partition". Other operating systems may not share this limitation; however, this can depend on other factors, such as a PC's BIOS.
Technically, a hard disk may contain as many as four primary partitions, however, typically only the active one shows up in the fdisk command.
[edit] Extended
An extended partition is secondary to the primary partition(s). A hard disk may contain only one. It is sub-divided into logical drives, each of which is assigned additional drive letters.
For example, a hard disk with one primary and one extended, with two logical drives, would typically show three drives, C:, D:, and E: (assuming the CD or DVD drives weren't lettered D: or E:)
See Extended Boot Record for information on the contents of an extended partition...
[edit] Compressed Hard Disks
Hard disks are sometimes compressed to create additional space, with programs such as STACKER (DR DOS except 6), SuperStor (DR DOS 6), DoubleSpace, or DriveSpace (Windows 95). This compression is accomplished by creating a very large file on the partition, then storing the hard disk's data in this file. At startup, device drivers open this file and assign it a separate letter. Frequently, to avoid confusion, the original partition and the compressed drive have their letters swapped, so that the compressed disk is C:, and the uncompressed area (often containing system files) is given a higher name. (SuperStor required a separate device driver to be loaded, DEVSWAP.COM)
[edit] Partitioning schemes
[edit] Microsoft Windows
With Microsoft Windows, the standard partitioning scheme is to create a single primary partition, the C: drive, where the operating system, user data, applications, and page file all reside. Some users, however, prefer to create multiple partitions so that the operating system can be stored separately from other kinds of data. While this scheme generally results in slightly lower performance due to additional work needing to be done by both the hard drive and the operating system, proponents of multiple partitions generally point to the benefit of being able to erase a single partition (typically the operating system itself) while retaining the other data. When used in conjunction with partition copying programs such as net-runna Enterprise, Acronis True Image, diskdump, Paragon Partition Manager, Norton Partition Magic or Norton Ghost, the use of multiple partitions allows computer users to quickly recover from viruses, rootkits, and trojan horses or an otherwise damaged, corrupt or compromised operating system.
[edit] UNIX systems
For UNIX-based and Unix-like operating systems such as Linux and Mac OS X, fancy partitioning creates separate partitions for /, /boot, /home, /tmp, /usr, /var, /opt and swap. (The same is true for Sun-based operating systems, except that partitions are called slices.) 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 usable 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. Logical Volume Management can however introduce a degree of flexibility, allowing volumes to be resized. Typical desktop systems use the other convention; a "/" (root directory) partition containing the entire filesystem and a separate swap partition. A /home partition is useful for desktop uses as it allows a clean reinstall (or a fresh install of another Linux distribution) while leaving data intact.
[edit] See also
- File system
- Volume (computing)
- Logical volume management
- Physical formatting
- Master boot record
- Extended Boot Record
- GUID Partition Table
- Apple Partition Map
- BSD disklabel
- ISO image
- ROM image
- List of partition utilities
[edit] Further reading
- Stéphane Martineau, Jens Olsson, Nick Roberts (2002-11-02). "The Alt-OS-Development Partition Specification (AODPS)". 0.4.
- Andries Brouwer (1995–2004). "List of partition identifiers for PCs".
- Andries Brouwer (1999-09-16). "Minimal Partition Table Specification".
- (1998-08-05). "partitioning primer". Ranish.
- Intel. "EFI specification". 1.10.
- Allen Smith. "ATA (EIDE) Drive Capacity and Addressing".
- Microsoft (2005-06-03). "Using GPT Drives".
[edit] External links
- FDISK and FORMAT instructions for any hard drive Simple partition instructions.
- GNU Parted, a command line partition manager
- Linux Partition HOWTO
- Cute Partition Manager
- GParted is an industrial-strength package for creating, destroying, resizing, moving, checking and copying partitions, and the filesystems on them.