DEV Community

James Murdza
James Murdza

Posted on

How to extend the disk space of an AWS EC2 instance

This works for instances running Amazon Linux:

1. Add space in the AWS console

  1. Go to EC2, and select your instance.
  2. Scroll to the horizontal tab bar, and click storage.
  3. Click on the volume ID.
  4. Select the volume, and under actions, click "Modify Volume". If this is grayed out, you have to wait.
  5. Enter the new disk size and click modify.

2. Grow the partition

  1. Use sudo lsblk to determine the partition you want to grow.
  2. Use sudo growpart /dev/xvda 1 to grow the partition, changing xvda to the name of the partition you just determined.

Top comments (0)