- Modify the size of the attached EBS volume using the Amazon EC2 Management Console or the AWS CLI.
- Connect to the EC2 instance using SSH.
- Run the
lsblk
command to list the block devices on the instance. - Use the
growpart
command to resize the root partition:growpart /dev/xvda 1
- Use the
xfs_growfs
command to resize the XFS file system:xfs_growfs -d /
orresize2fs /dev/xvda1
- Run the
fdisk -l
command to verify the new size of the volume.
Note: Make sure to replace /dev/xvda
the actual device name of the root partition on your EC2 instance.
These steps should increase the size of the EBS volume attached to your EC2 instance. You may need to reboot the instance for the changes to take effect.