How to resize Linux filesystem on AWS

I am using Free Tier on Amazon Web Services. It is a great offer. It comes with 30GB of space among other things. However, by default, a Linux VM comes with only 8GB of space. I have been working on my WordPress installations and I found out that the 8GB space is running out. Fret not, we can increase the space online. No downtime is required. This is how to do it.

First of all: Backup!
Modifying partition and filesystem is no simple task. A simple typo could ruin your Linux installation or data. On AWS we can easily backup our VM using its snapshot feature. However, it is only free for up to 1GB of snapshot. So, in this case, I will use a good old traditional backup method. That is tar gunzip and rsync to my local PC 🙂 I backup my WordPress files, databases, and supporting configurations (apache, automysqlbackup, etc).

Continue reading