How to extend instance storage on Amazon EC2

AWS LogoI’ve just launched an EC2 instance from my own AMI. This time however I wanted it to have more storage so I increased the size of my disk space from 10 to 100GB.

Once the instance had launched I’ve noticed that – as before – only 10GB was actually available.

I’ve had this with other infrastructure before, and I knew that I had to extend the volume as well as the volume and the file system for the OS to recognise the extra space.

What puzzled me was the following error message when using the lvextend command:

Was I not using the command correctly? Had I miscalculated the space I had in addition? I checked again with fdisk -l:

Nope, I was right – but lvextend wasn’t happy.

The Solution

Amazon had already extended the volume – all I had to do was grow the file system:

Let’s check it out:

Sometimes things are actually easier than we think 😉

Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or draw on tablet devices. He blogs about his coding journey at http://wpguru.co.uk and http://pinkstone.co.uk.

Add your voice!