Fixed Disk Partitions
Fixed Disk Partitions
9850317225
What is a partition?
Partitioning is a means to divide a single hard drive into many logical drives. A partition is a contiguous
set of blocks on a drive that are treated as an independant disk. A partition table is an index that relates sections
of the hard drive to partitions.
1. Data Encapsulation : Since file system corruption is local to a partition, you stand to lose only some of
your data if an accident occurs.
2. Increase disk space efficiency : You can format partitions with varying block sizes, depending on your
usage.
3. Limit data growth : Wrong programs or runaway processes by users can consume so much disk space
that the operating system no longer has room on the hard drive for its bookkeeping operations. This will lead to
disaster. Keeping the users in deparate partition can keep you away from this type disaster.
Types Of Partitions :
1. Fixed Partitions : The size of the partition can not be modified in run time mode.
2. Logical Volume Manager (LVM) : The size of the partition can be altered any time. It combines mul-
tiple hard disks all together to give large capacity hard drive.
3. Redundant Array of Independant Disks (RAID) : This is basically mirroring of data in multiple hard
disks, so that in event of failure of one hard drive, one can safely get data from other drive.
1. IDE Hard Disk : Integrated Drive Electronics (IDE) hard disks have been around for quite a few years.
Prior to these drives, hard disks were interfaced to a PC motherboard via an expansion board known as a hard
disk controller. You can create at the most 63 partitions in IDE Hard Disk.
Magnum Net Solutions Pvt. Ltd., 25, Saikrupa Apt, Central Excise Colony, Chhatrapati Square, Nagpur 15
: http://ax100.net : info@ax100.net
Magnum
9850317225
2. SCSI Hard Disk : SCSI (Small Computer System Interface) is a set of standards for physically con-
necting and transferring data between computers and peripheral devices. In one SCSI Hard Disk you can have
15 partitions at the most.
Primary Partition :
A primary partition contains one file system. In MS-DOS and earlier versions of Microsoft Windows
systems, the first partition (C:) must be a "primary partition". Other operating systems may not share this
limitation; however, this can depend on other factors, such as a PC's BIOS. In earlier OS there can be only one
primary partition and remaining hard disk space goes to extended partition. We can have multiple logical drives
in extended partition. Now in new OS we can have four primary partitions in one single drive.
Patitions are given hex ID’s. Linux operating system may recognize a number of different file systems
(ext2, ext3, reiserfs, etc.), they have all consistently used the same partition type code: 0x83 (Linux native).
Extended Partition :
An extended partition is secondary to the primary partition. A hard disk may contain only one extended
partition; which can then be sub-divided into logical drives, each of which is (under DOS and Windows)
assigned additional drive letters.
For example, under either DOS or Windows, a hard disk with one primary partition and one extended
partition, the latter containing two logical drives, would typically be assigned the three drive letters: C:, D: and
E: (in that order).
Primary Partition
Extended Partition
Magnum Net Solutions Pvt. Ltd., 25, Saikrupa Apt, Central Excise Colony, Chhatrapati Square, Nagpur 15
: http://ax100.net : info@ax100.net
Magnum
9850317225
There are various tools available for creating partitions. Most of them are free and some are paid. fdisk
tool is very nice tool for creating partition on command line. Below are some of examples which will clear the
partition procedure.
Example 1 : How do I find number of hard disks and partition structure in Linux Machine ?
The simplest way is fdisk -l command, which gives complete information about the hard disk. Alterna-
tively you can try cat /proc/partitions to get list of partitions.
Example 2 : Create a partition of 200 MB with ext3 file system and mount the same in /data Folder of you
machine.
You can use fdisk command as below to edit particular hard disk, say /dev/hda
Magnum Net Solutions Pvt. Ltd., 25, Saikrupa Apt, Central Excise Colony, Chhatrapati Square, Nagpur 15
: http://ax100.net : info@ax100.net
Magnum
9850317225
Magnum Net Solutions Pvt. Ltd., 25, Saikrupa Apt, Central Excise Colony, Chhatrapati Square, Nagpur 15
: http://ax100.net : info@ax100.net
Magnum
9850317225
New partition /dev/sda5 is created. Now write the partition table by w command as below.
As you have done modifications in the MBR, you need to reboot the system, so that your kernel can
read the new partition table. You can do this task without rebooting the machine. Just ask the kernel to re-read
the MBR, by using partprobe command as below.
Now format the drive /dev/sda5 using mkfs.ext3 command and mount in /data folder as below. As we
are formatting this partition with ext3 file system, the journal will be created in the drive, which can be used to
recover the file system if it crashes.
You can also add entry of this drive to /etc/fstab as below so that this partition will automatically get
mounted
Magnum Net Solutions Pvt. Ltd., 25, Saikrupa Apt, Central Excise Colony, Chhatrapati Square, Nagpur 15
: http://ax100.net : info@ax100.net
Magnum
9850317225
Magnum Net Solutions Pvt. Ltd., 25, Saikrupa Apt, Central Excise Colony, Chhatrapati Square, Nagpur 15
: http://ax100.net : info@ax100.net