- Create new partition using fdisk
- Change partition type using
t
option and put8e
to LVM type infdisk
- Write the changes in disk using
w
option infdisk
- Reboot system to commit changes
- Create Physical Volume using
pvcreate /dev/sdaX
- Create Volume Group using
vgcreate vgname /dev/sdaX
- Create Logical Volume in Volume Group using
lvcreate -n datalv0 -L 30G centos-data
- Get create LV name using
lvdisplay
- Format LV using
mkfs.ext4 /dev/centos-data/datalv0
- Create new directory
mkdir /data
- Get
UUID
usingblkid /dev/centos-data/datalv0
- Append
UUID=3f33f393-8b09-48e0-8a7e-5e06d90f7781 /data ext4 defaults 0 0
in/etc/fstab
file to mount in boot time mount -a
to Mount all filesystems (of the given types) mentioned in/etc/fstab
file- Give the prior permissions to mount point
- Done