Cuelogic Blog Icon
Cuelogic Career Icon
Home > Blog > All > Increase size of the file system in AWS

Increase size of the file system in AWS

Assuming that you are using a linux AMI, you have an easy method for increasing the size of the file system:

1) Stop the instance

2) Detach the root volume

3) Snapshot the volume

4) Create a new volume from the snapshot using the new size

5) Attach the new volume to the instance on the same place where the original one was

6) Start the instance, stop all services except ssh and set the root filesystem read only

7) Enlarge the filesystem (using resize2fs command) and/or the partition if needed

resize2fs /dev/sda1

8) Reboot

As an alternative you can also launch a new instance and map the instance storage or you can create a new ami combining the two previous steps.