Add Additional Hard Disk on Oracle Linux 6.5

Add Additional Hard Disk on Oracle Linux 6.5/Red Hat/CentOS

This is a virtualization environment in VMware ESXI 6.0. To add additional Hard Disk in Oracle Linux 6.5 first add hard drive in Virtual Machine then configure the hard disk inside the operating system. This is a fixed size additional hard disk means not resize.

Add 535GB hard disk in virtual machine, you can take different size of hard disk as per your requirement.

how add additional hard disk on oracle linux 6

To check hard disk has successfully added type the below command inside the operating system Oracle Linux 6.5.

fdisk -l

how add additional hard disk on oracle linux 6

To create a partition in hard disk sdb start fdisk in interactive mode by use of below command.

fdisk /dev/<device name>
In Our Case:
fdisk /dev/sdb

Then type sub-command to check there is free space in Hard Disk.

how add additional hard disk on oracle linux 6

Type sub-command n to create a new partition then type p for primary partition. Type 1 for partition number. Press enter for first cylinder then again press enter for last cylinder, In Last cylinder you can use custom hard disk size.

for example: 5000M means 5GB

Here we are creating single hard drive partition therefore for first and last cylinder use default cylinder value by just press enter.

how add additional hard disk on oracle linux

Type sub-command p to check partition has successfully created.

how add additional hard disk on oracle linux

Here you can change the type of partition by use of sub-command t, you must know the HEX Code partition type number for example: SWAP partition HEX code is 82.

Type sub-command w to write the new partition table on disk.

how add additional hard disk on oracle linux

At this point kernel is still using old table, you will need to reboot the operating system. If you don't want to reboot so force the kernel to re-read the partition table by type the below command.

partprobe

add additional hard disk on oracle linux 6

To check partition has successfully created type the below command.

fdisk -l

how add additional hard disk on oracle linux 6

To format the partition with ext4 linux file system type the below command. If you not format the partition the partition will not mount.

mkfs.ext4 /dev/sdb1

how add additional hard disk on redhat

To mount a partition on directory, first create a directory "DB" on root "/" by use of mkdir command. you can create directory with different name on any location.

mkdir /DB

how add hard disk on redhat

To mount a partition sdb1 on directory DB type the below command.

mount /dev/sdb1 /DB

how add hard disk on redhat

To permanently mount the partition sdb1 on directory DB edit the file fstab that available in directory "/etc/fstab" by use of vi editor.

vi /etc/fstab

how add additional hard disk on centos

Edit the below line in file fstab.

/dev/sdb1 /DB ext4 defaults 1 2 

how add hard disk on centos

After reboot the operating system Oracle Linux 6.5 check the drive sdb1 is mount on directory DB type the below command.

df -hT

how add additional hard disk on centos

 Thanks for read this Article

Comments

Post a Comment