Partition (computing)

From Free net encyclopedia

(Redirected from Drive partition)

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.

Disk partitioning is a simple technique which can be viewed as a precursor of logical volume management.

Contents

Purpose

Partitioning allows one to have multiple file systems on a single hard disk. There are many reasons to do this including:

  • Technical limitations (e.g. old versions of the Microsoft FAT filesystem that can't address more than a certain amount of hard drive space; old PC BIOSes that prevent booting operating systems located past a hard drive's 1024th cylinder)
  • If one partition becomes corrupt, only that partition suffers and not your whole hard drive.
  • 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.
  • Most filesystems write files to disk in groups of fixed-size clusters whose size is directly proportional to the size of the partition the filesystem is on. If a file's size is not a multiple of the cluster size, the last cluster in the file's group of clusters will have unused space that can't be used by other files. So, filesystems that use clusters will cause files to take up more space on disk than they do in memory, and larger partitions means larger cluster sizes and therefore more wasted space. Therefore, using several small partitions instead of one large partition can save space.
  • Each partition may be customized to different requirements. For example, if you have a partition which is seldomly written to, you can mount it read-only. If you want to have very many small files, you should use a partition that has a filesystem with many inodes.
  • On multi-user systems running Unix, you may want to prevent users from doing hardlink attacks. To achieve this, the /home and /tmp directories should be separated from the system files in e.g. /var and /etc.

Partitioning schemes

Microsoft Windows

With Microsoft Windows, the standard partitioning scheme is to create a single 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 diskdump, PartitionMagic or Norton Ghost, the use of multiple partitions allows computer users to quickly recover from viruses, rootkits, and remote trojans.

On NT-based operating systems (including Windows 2000,Windows XP, and Windows Server products), the My Documents folder, a special folder that typically contains the user's documents and media files, can be mounted to a separate partition. This has the effect of being able to use a separate partition (or physical hard drive) while retaining the convenience of using My Documents as a storage location.

UNIX systems

For UNIX-based and UNIX-like operating systems such as Linux, fancy partitioning creates separate partitions for /, /boot, /home, /tmp, /usr, /var, /opt and swap. (The same is true for *BSD-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 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. 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.

List of partition utilities

See also

External links

de:Partition (Festplatte) es:Partición de disco fr:Partition de disque dur it:Partizione (informatica) nl:Partitie (informatica) ja:パーティション pl:Partycja (informatyka) pt:Partição sv:Partition tr:Bölümlere Ayırma (Bilgisayar) zh:分割 (電子計算機)