Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ubuntu 10, with 2 drives: root (8 gb), and data (sdf, 150 gb).

I created a snapshot, and then created a drive from the snapshot, sizing it to 300 gb.

I then shutdown the instance, removed the 150 drive, and attached 300 one.

Sever booted up fine, and all data is there, but sdf is still showing up as 150 gb.

I know how to resize a partition on a machine I have physical access to, but how would I do this safely in EC2?

share|improve this question
If you know how to do it, you know how to do it. If you created the snapshot, and then created the new volume with the new size, the only thing left is extend the partition inside the OS. Do it as you normally would. – JohnThePro Apr 19 '12 at 21:40
up vote 5 down vote accepted

I think this is it: sudo resize2fs /dev/sda1

Full instructions:

share|improve this answer

Please follow the below mentioned steps:

First :

sudo e2fsck -f /dev/xvdi1

Then resize:

sudo resize2fs  /dev/xvdi1
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.