Partitions are a way of dividing a disk drive's storage into
distinctly separate regions. Using partitions gives the system
administrator much more flexibility in terms of allocating
storage.
Because they are separate from each other, partitions can have
different amounts of space utilized, and that space will in no way
impact the space utilized by other partitions. For example, the
partition holding the files comprising the operating system will not be
affected even if the partition holding the users' files becomes full.
The operating system will still have free space for its own use.
Although it is somewhat simplistic, from this perspective you can
think of partitions as being similar to individual disk drives. In
fact, some operating systems actually refer to partitions as "drives".
However, this viewpoint is not entirely accurate; therefore, it is
important that we look at partitions more closely.
Partition Attributes
Partitions are defined by the following attributes:
Partition geometry
Partition type
Partition type field
Next, we will explore these attributes in more detail.
Geometry
A partition's geometry refers to its physical placement on a
disk drive. In order to understand geometry, we must first
understand how data is stored on a disk drive.
As the name implies, a disk drive contain one or more disks
coated with a magnetic material. It is this material that actually
stores the data. The surface of each disk is read and written by a
head, similar in function to the head in a
cassette tape recorder.
The head for each disk surface is attached to an
access arm, which allows the heads to sweep
across the surfaces of the disks. As the disks rotate under the
heads, the section of the disks under the heads at any given
position of the access arm make up a cylinder
(when only one disk surface is involved, this circular slice of
magnetic media is known as a track). Each
track making up each cylinder is further divided into
sectors; these fixed-sized pieces of storage
represent the smallest directly-addressable items on a disk drive.
There are normally hundreds of sectors per track. Present-day disk
drives may have tens of thousands of cylinders, representing tens of
thousands of unique positions of the access arm.
Partitions are normally specified in terms of cylinders, with
the partition size is defined as the amount of storage between the
starting and ending cylinders.
Partition Type
The partition type refers to the partition's relationship with
the other partitions on the disk drive. There are three different
partition types:
Primary partitions
Extended partitions
Logical partitions
We will now look at each partition type.
Primary Partitions
Primary partitions are partitions that take up one of the four
primary partition slots in the disk drive's partition
table.
Extended Partitions
Extended partitions were developed in response to the need for
more than four partitions per disk drive. An extended partition
can itself contain multiple partitions, greatly extending the
number of partitions possible.
Logical Partitions
Logical partitions are those partitions contained within an
extended partition.
Partition Type Field
Each partition has a type field that contains a code indicating
the partition's anticipated usage. In other words, if the partition
is going to be used as a swap partition under Red Hat Linux, the partition's
type should be set to 82 (which is the code representing a Linux
swap partition).