How to increase EC2 Instance root volume size

1st of all we need to format the partition

the command of formatting the partition is
$mkfs.ext4 /dev/xvdf

then we have to mount the partition to another directory for example we mount the partition on /opt directori. so now we have to cmnd
$mount /dev/xvdf /opt

So now our new volume is mounted on the /opt directory. But not visible. we can check it using the command
$df -h

Now we have to do visible this partition to the /opt directory

===================Another way====================

df -h


growpart /dev/xvda1

lsblk -f

trdoxr2fs /dev/xvda1

Now check the size.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top