Types of Partitions

There are three types of partition definitions, and each provides different functionality for different situations:

■ Primary partitions: These are the standard physical partitions you would use if you did not need too many separate partitions. There can be at most four primary partitions on a disk.

■ Extended partition: An extended partition is a portion of a disk in which logical partitions can be created (see the next bullet item). It is a special type of partition because it cannot directly hold any data itself but contains other partitions that can themselves hold data.

■ Logical partitions: These are special partitions that live inside an extended partition. Once an extended partition has been created, you can choose to create further partitions as logical partitions inside it. Without the use of extended partitions and logical partitions inside them, we would be limited to the maximum four primary partitions.

If you have never encountered partitions before, they can be very daunting. With this in mind, Figure 3-1 shows a logical view of sample partitions on a hard disk. This is not necessarily how partitions are physically laid out on disks but provides a good conceptual view of how they work together.

Extended partition boundary Primary partition Logical partition

After a partition has been created, it is represented in Linux by a device name. Devices are represented by files in /dev, and the devices we are interested in at the moment are the block devices that represent disks. The naming scheme for these device files varies. Traditionally, IDE disks were named /dev/hda, /dev/hdb, and so on, while SCSI disks were named /dev/sda, /dev/sdb, and so on. Newer versions of Linux will see all disks, IDE, SCSI, or SATA as /dev/sda,/dev/sdb,and so on.

Was this article helpful?

0 0

Post a comment