Add New Logical Volume
First, you must have a block device available to you. In this example we will use /dev/mapper/data01, but equally well this could be /dev/sdb or /dev/mmcblk0p1.
First, convert it into a Physical Volume:
# pvcreate /dev/mapper/data01
Next, we will create a new Volume Group called Vdata to contain this PV:
# vgcreate Vdata01 /dev/mapper/data01
Lastly, we will create a simple Logical Volume in this VG called Ldata. It will be the maximum available size.
# lvcreate -n Ldata01 -l 100%FREE Vdata01
Excellent. Format this to your preferred filesystem (here, ext4):
# mkfs.ext4 /dev/Vdata01/Ldata01
Then create a mountpoint for this filesystem:
# mkdir /databases/data01
Set the correct permissions at the mount point:
# chown oracle:dba /databases/data01
# chmod 770 /databases/data01
# chmod +s /databases/data01
Edit /etc/fstab So that the filesystem will be mounted on boot:
# vi /etc/fstab
/dev/Vdata01/Ldata01 /databases/data01 ext4 defaults 1 2
Then you can test (and mount) this with:
# mount -a