A Partition on the Hard Disk Drive is a logical division of your computer.
Hard Disk Drives are the main data storage device. The required numbers and sizes of Hard Disk Drive partitions can be easily created during the installation of an OS and after the installation of the operating system by using free space.
An OS can be installed on a un-partitioned Hard Disk Drive, and this is usually done with the MS operating systems. Though, the ability to divide a Hard Disk Drive into many partitions has some important and useful advantages.
(1) A way for a single Hard Disk Drive to contain many OS. Though there are other method to install multiple OS on a system, like having multiple Hard Disk Drives, but this method is not convenient and economical.
(2) The ability to make data more secure from corruption of files of Operating System, if the Hard Disk Drive have multiple partitions which makes only some data which in that particular partition will be lost. Partition can also allow the data of one logical partition to be re-installed without disturbing the data of other logical partitions of the Hard Disk Drive. Like, if the OS corrupts and needs to be reinstalled, if the data is on some other partition then the OS installation will not going to affect the data present in the other partitions.
(3) Some filesystems have size limits. Thus, creating multiple partitions and multiple filesystems make it possible to install large Hard Disk Drive on the computer.
(4) Prevent runaway processes and overgrown log files from consuming space on the RAM and thus making the computer to process fast.
(5) Creating multiple partitions will increase hard disk space efficiency. In an average of 1/4 of a block is wasted for every file.
There are many restrictions on Hard Disk Drive partitions:
(1) The Hard Disk Drive partitions cannot overlap, as this will cause corruption of data on the Hard Disk Drive and any cause some other problems also
(2) Partitions of the Hard Disk Drive cannot be moved, but partitions can be resized and copied
Though partitions of the Hard Disk Drive are logically independent, they are logically connected with each other.
On Microsoft OS each partitions of the Hard Disk Drive and storage device is selected by a drive letter. The 1 partition on the 1 Hard Disk Drive is always donated by C:, and following letters such as D: , E: and F: are used to represent the other partitions of the Hard Disk Drive.
df command is used get the information about the partition of the Hard Disk Drive having Linux or Unix operating system although this command only shows those Hard Disk Drive partitions that are currently mounted. It is mainly suitable to use the df command with its -h i.e. df -h
fdisk, command which is located in the /sbin , can shows all of the Hard Disk Drive partitions on the system.
On computers in which any user can access the root files, such as a home systems, the switch to root can be done easily by typing the su command. Then fdisk command can be used to access the desired Hard Disk Drive, with the 1 Hard Disk Drive selected by /dev/hda. Thus, the following would access the first Hard Disk Drive:
/sbin/fdisk /dev/hda
The partition table for the selected Hard Disk Drive can then be viewed by command p and after pressing the ENTER key. Command m provides a menu of commands.