If you need to add an additional mount point onto a RHEL or OEL Linux server, here’s how to do it using the logical volume manager for maximum flexibility:
We assume that you’ve added a new physical disk and that it’s called /dev/sdb.
First check size of the device to ensure you’ve got the correct one:
# fdisk -l /dev/sdb
Now create a new primary partition on the disk:
# fdisk /dev/sdb
n (new partition)
p (primary partition)
1 (partition number)
<return> for 1st block
<return> for last block
w (write config)
q (quit)
Check you can see the new partition:
# ls -la /dev/sdb*
(You should see /dev/sdb1)
Now ensure that you create a new physical volume that the volume manager can see:
# pvcreate /dev/sdb1
Physical volume "/dev/sdb1" successfully created
Create a new Volume Group containing the new physcial partition:
# vgcreate VolGroup01 /dev/sdb1
Volume group "VolGroup01" successfully created
Create a new logical volume inside the volume group:
# lvcreate -L 480GB -n LogVol01 VolGroup01
Logical volume "LogVol01" created
Format the new logical volume using EXT3 (you can choose which version of EXT you want):
# mkfs -t ext3 /dev/VolGroup01/LogVol02
Now you just need to mount the partition up.