Resizing an EBS Volume

Peter Rukavina

For the longest time, if you wanted to resize a EBS volume (aka “your disk drive”) attached to an Amazon Web Services instance (aka “your server”), you had to go through a dance that involved shutting down the instance. This was relatively simple in spirit, but terrifying enough in practice that I procrastinated doing it as I watched the size of my primary volume on the server powering this blog gradually fill up.

Today I reached 100% and I had no choice: fortunately, things, it turns out, have become much easier. All I needed to do was resize the volume in the AWS console (select the volume, click Modify, change the size) and then extend the Linux filesystem to use the new capacity with:

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

From start to finish it took about 2 minutes.

Now I’ve got gigabytes of free space to slowly fill up in the weeks and months to come, and the confidence that when I need to increase capacity again I won’t need to go into hiding to avoid it.

Comments

Submitted by Peter Rukavina on

Permalink

Checking in from 2020, almost two years later: this still works exactly like it did in 2018. I bumped my primary EBS volume from 100 GB to 200GB after hitting 98% utilization.

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search