
Do you want to install Oracle in partition /u01 or /u02 or /oracle in Linux?
Or you want to install whatever you want in partition instead of installing it into a folder? but forgot to create partition during Redhat or Other Linux installation?
Below is one of the way to mount partition in Linux using fdisk utility.
In this case, the existing disk where the OS installed is /dev/hda and new hard disk added i.e. /dev/sda will be create as /u01 partition.
1. Check existing partition
Ok, this is the existing partition:
[root@webtest /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 15G 6.4G 7.5G 46% /
/dev/hda6 905M 18M 841M 3% /export
/dev/hda3 2.0G 36M 1.9G 2% /home
/dev/hda1 99M 12M 83M 13% /boot
tmpfs 1.6G 0 1.6G 0% /dev/shm
2. Then, new hard disk (/dev/sda) added.
[root@webtest ~]# fdisk -l
Disk /dev/hda: 20.4 GB, 20416757760 bytes
255 heads, 63 sectors/track, 2482 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 1971 15727635 83 Linux
/dev/hda3 1972 2232 2096482+ 83 Linux
/dev/hda4 2233 2482 2008125 5 Extended
/dev/hda5 2233 2363 1052226 82 Linux swap /
Solaris
/dev/hda6 2364 2482 955836 83 Linux
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sda doesn’t contain a valid partition table
It said, “Disk /dev/sda doesn’t contain a valid partition table”.
3. Then, its time to create a partition table.
Use fdisk /dev/sda
And format your disk as /dev/sda1
Partition table created, then the partition will appear with name /dev/sda1
4. Next, time to create and mount partition
Execute the following command
- which x is your partition number, in this example use #
#partprobe
#mke2fs -j /dev/sda[x] mke2fs -j /dev/sda1
#mount /dev/sda[x] /mount_point - which mount_point is your mount point, e.g # mount /dev/sda1 /u01
5. Check the partition with df -h /u01
6. Finally, if you want your /u01 partition appear and mounted automatically everytime system reboot, then edit your /etc/fstab entry and add new entry for the /u01 partition.
Done..