Adding A New Hard Drive

As a Linux Administrator, you need to know how to add new hard drives to your server, make sure your PC recognizes it, set and configure it. The basic hard drive configuration utility is fdisk. take a look at screenshot

The fdisk-1 command lists partition tables on local computer. In this case there are one IDE hard disks, designated  /dev/hdc. The /dev/hdc hard drive includes a number of partitions.

If it shows that it does not have a valid partition than you need to do something about that. Use fdisk to open hard drive with following command:
# fdisk path

NOTE:- Depending the value of your PATH variable, you may need to specify the full path. If fdisk doesn"t work by itself, try /sbin/fdisk.
If there is a completely new hard drive, you"ll see a message showing " hard drive does not contain a valid partition table" but however if you dont see it, that means someone has already used it but in either case, next thing you"ll see is the fdisk utility prompt.

Command (m for help):

Now press m command to see the options available within the fdisk utility.

Sets or Unsets the bootable falg
Deletes a partition. You need to select the partition number.
Lists known partition types more than 100 different partitions are available.
Shows available fdisk commands.
Configures the new partition
Lists the current partition table.
Exits the fdisk without saving changes.
Allows to change the partition system ID. Partition number and ID of partition are needed.
Verifies current partition table.
Writes changes and exits from fdisk.

In fdisk utility, you need to create a new partition. Issue n command(see table). The utility lets you choose whether to create primary or extended partition.  If there is already a extended partition, fdisk allows to create a logical partition.

Command (m for help) : n 
Command action
                e extended
                p primary partition (1-4)

Start by creating a primary partition with p command. Make it primary partition and start with the first available cylinder. Specify size of partition in cylinders, KBs, or MBs.

Continue this till you have configured the desired space and allocated all space on hard drive. Once finished with configuring partitions, save your changes with w command. If there is some mistake or you want start again, exit without saving by using the q command.

Before you can use the new partition, you need to format it to a system such as ext2, ext3, or VFAT.


0 Responses to "Adding A New Hard Drive"

Post a Comment


Managing Shell And its Secrets

Subscribe To Get Update On Mobile

Get updates of latest post on your mobile free