Programming/Linux/Working with AWS instances

From Thalesians Wiki

Elastic storage

Once you have changed the size of a volume using AWS's elastic storage, the changes won't be immediately reflected in

df -h

New volumes should be formatted to be accessible. Resized existing volumes should also be modified (resized) from inside the operating systems. A detailed discussion of these aspects can be found in

However, as a quick solution, run the following two commands, in the given order, after resizing a volume:

sudo growpart /dev/xvda 1
sudo resize2fs /dev/xvda1

The volume size changes should then be reflected in

df -h

This information comes from Stack Overflow post.