To install LVM
$yum install -y makecache lvm2
To check available partition
$lsblk
Command to create Physical Volume, here you can define one or more partition name.
$pvcreate /dev/sdb /dev/sdc
Command to create Logical Volume Group, "demo_lvm_group" is a name, shoulb be change.
$vgcreate [demo_lvm_group] /dev/sdb /dev/sdc
Command to create Logical Volume, -L is use for define size, -n is use for Logical Volume name "demo_lvm_volume" (Changable).
$lvcreate -L 5G -n [demo_lvm_volume] [demo_lvm_group]
Command to create file system for newly created Logical Volume.
$mkfs.ext4 /dev/demo_lvm_group/demo_lvm_volume
Create directory and mount Logical Volume
$mkdir /mnt/lvm
$mount /dev/demo_lvm_group/demo/lvm_volume /mnt/lvm/
$df -h