Friday 1 July 2011

hard disk partition

What is a hard disk partition

When a hard drive is installed in a computer, it must be partitioned before you can format and use it. Partitioning a drive is when you divide the total storage of a drive into different pieces. These pieces are called partitions. Once a partition is created, it can then be formatted so that it can be used on a computer. When partitions are made, you specify the total amount of storage that you would like to allocate to that partition from the total size of the drive. For example, if you have an 80 GB drive, then it would be possible to make one partition consisting of the entire 80 GB of available storage. Alternatively, you could make two partitions consisting of a 20 GB partition that will be used for the operating system and programs and a 60 GB partition set aside for data, music, and images.

In the current IBM PC architecture, there is a partition table in the drive's Master Boot Record (section of the hard dirve that contains the commands necessary to start the operating system), or MBR, that lists information about the partitions on the hard drive. This partition table is then further split into 4 partition table entries, with each entries corresponding to a partition. Due to this it is only possible to have four partitions. These 4 partitions are typically known as primary partitions. To overcome this restriction, system developers decided to add a new type of partition called the extended partition. By replacing one of the four primary partitions with an extended partition, you can then make an additional 24 logical partitions within the extended one. The table below illustrates this.

Partition Table
Primary Partition #1
Primary Partition #2
Primary Partition #3
Primary Partition #4 (Extended Partition)
Logical Partition #1
Logical Partition #1

As you can see, this partition table is broken up into 4 primary partitions. The fourth partition, though, has been flagged as an extended partition. This allows us to make more logical partitions under that extended partition and therefore bypassing the 4 partition limit.

Each hard drive also has one of its possible 4 partitions flagged as an active partition. The active partition is a special flag assigned to only one partition on a hard drive that the Master Boot Record (MBR) uses to boot your computer into an operating system. As only one partition may be set as the active partition, you may be wondering how people can have multiple operating systems installed on different partitions, and yet still be able to use them all. This is accomplished by installing a boot loader in the active partition. When the computer starts, it will read the MBR and determine the partition that is flagged as active. This partition is the one that contains the boot loader. When the operating system boots off of this partition the boot loader will start and allow you to choose which operating systems you would like to boot from.


Why make partitions

Now that you know what a partition is, you may be wondering why you would even need to make multiple partitions instead of just making one. Though there are quite a few reasons, we will touch on some of the more important ones below:

* Multiple Filesystems - When you create a partition, you then need to format it before it can be used. When formatting a partition you tell the operating system what filesystem you would like that partition to be formatted in. Once you format a partition, and therefore assign the type of filesystem you want to use with it, you can not change that filesystem without formatting the partition again and losing all the data contained on it. If you require different filesystems on your computer, whether it be for security or for a specific application, you can then make multiple partition and assign one type of filesystem to one of the partitions and another to one of the other partitions.
* Partition Size - On older operating systems the maximum size of a partition was limited. Therefore if you had more storage space on a hard drive than was usable in a single partition, you would need to create other partitions to utilize this unused space.
* Multiple Operating Systems - Some operating systems use filesystems that are not compatible with other operating systems. If you want to use two operating systems on the same computer that are not compatible in this way, you could then make two partitions, one for each operating system. Then a boot loader could be used to switch between them when you start your computer.
* Wasted disk Space - When a filesystems store data in a partition, the larger the partition, the greater the chance of wasted space. By having multiple partitions of smaller size, you reduce the amount of waste that filesystems may create.
* Seperate system files from users files - Some components of an operating system require storage space to operate. For example, in Windows if you have no hard drive space available on the drive that Windows is installed on, you will not be able to print. By creating a partition solely devoted to the operating system and then another partition dedicated to your own data and programs, there is less of a chance of you using up the space on the operating system partition with your data, and thus not causing problems.

No comments:

Post a Comment