How to extend Centos 7 Linux LVM partition in AWS

This is how you would expand / partition on CenetOS based AWS image


lsblk

Install grpowpart

 yum install cloud-utils-growpart -y

Grow partition

growpart /dev/xvda 2

Reboot your instance

Extend Volume

pvresize /dev/xvda2

Extend logical volume

lvextend -l +100%FREE /dev/mapper/centos-root

Extend filesystem

For ext4

resize2fs /dev/mapper/centos-root

For XFS

xfs_growfs /dev/centos/root