You are on page 1of 1

Creating a logical volume inside the AWS Ec2 instance.

=====================================================

lsblk

sudo pvcreate /dev/nvme1n1 //creates a physical


volume from the attached volume, xvdb is created while we create the volume in
aws console.

sudo vgcreate vgrp /dev/nvme1n1 //creates a volume


group that will manage the physical volume

sudo lvcreate -L300G -n lvol vgrp //creates a logical volume


within the volume group

blkid //to check which type of


file system it is using

sudo mkfs.ext4 /dev/vgrp/lvol //here we are going to


choose the file system

sudo mount -o defaults /dev/vgrp/lvol / //creating a mount point


here we have mounted the logical volume to root

lsblk //to check the disk


partition

df -H // to check the diskspace

You might also like