Linux Partitioning and Hard Drive Numbering


Linux Hard drive Partitioning

  1. A partition table must have at least one primary partition.

  2. A partition table permits:

    • A maximum of 4 primary partitions.

    • 3 primary partitions and 1 extended partition.
      An extended partition is a special kind of primary partition that contains two or more logical partitions.

  3. One and only one of the 4 possible primary partitions can be an extended partition.

  4. Multiple logical drives can be established in an extended partition.

  5. There can only be one primary partition active at a time.

Primary partitions in Linux are designated hda1, hda2, hda3, hda4.

Logical partitions always begin with hda5, even if there are less than 4 primary partitions.
So if your hard drive had just one big extended partition, then you would have

  • hda1-Extended
  • hda5-First logical partition
  • hda6-Second logical partition
  • and so on.


Example partition schemes

  1. Single hard drive with:

    1 primary partition
    1 extended partiton - with 4 logical partitions

       Primary Partition hda1
       _______________________
       Logical partition hda5   \
       -----------------------   \
       Logical partition hda6     \
       -----------------------     >  Extended partition hda2
       Logical partition hda7     /   (a primary partition that contains logical partitions)
       -----------------------   /
       Logical partition hda8   /
       _______________________ 
    

  2. Single hard drive with:

    3 primary partition
    1 extended partiton - with 4 logical partitions

       Primary Partition hda1
       _______________________
       Primary Partition hda2
       _______________________
       Primary Partition hda3
       _______________________
       Logical partition hda5   \
       -----------------------   \
       Logical partition hda6     \
       -----------------------     >  Extended partition hda4
       Logical partition hda7     /   (a primary partition that contains logical partitions)
       -----------------------   /
       Logical partition hda8   /
       _______________________ 
    


Linux Hard drive Numbering

The Linux designations convention for hard disk partitions is as follows:

hdx1 - First  Primary partition
hdx2 - Second Primary partition
hdx3 - Third  Primary partition
hdx4 - Fourth Primary partition

hdx5 - First  Logical partition within the extended partition
hdx6 - Second Logical partition within the extended partition
hdx7 - Third  Logical partition within the extended partition
hdx8 - Fourth Logical partition within the extended partition
hdx9 - Fifth  Logical partition within the extended partition
etc

Where x identifies the hard disk.

The Linux designations convention for hard disks is as follows


For Hard Drives attached to the Motherboard IDE Ports
hda - Master hard disk on ide:0; (ide:0-0)
hdb - Slave  hard disk on ide:0; (ide:0-1)
hdc - Master hard disk on ide:1; (ide:1-0)
hdd - Slave  hard disk on ide:1; (ide:1-1)


For Hard Drives attached to the Motherboard RAID IDE (If you had on-board RAID)
OR
For Hard Drives attached to the Promise IDE Controller (If you had an Add on PCI IDE controller card)
hde - Master hard disk on ide:2; (ide:2-0)
hdf - Slave  hard disk on ide:2; (ide:2-1)
hdg - Master hard disk on ide:3; (ide:3-0)
hdh - Slave  hard disk on ide:3; (ide:3-1)


For Hard Drives attached to the Motherboard RAID IDE (If you had on-board RAID and the above PCI IDE card)
hdi - Master hard disk on ide:4; (ide:4-0)
hdj - Slave  hard disk on ide:4; (ide:4-1)
hdk - Master hard disk on ide:5; (ide:5-0)
hdl - Slave  hard disk on ide:5; (ide:5-1)
© MAK 2004
End of Document