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

I have an instance-store EC2 instance with Ubuntu 11.04 i386. At present my disk partition looks like this:

Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda1            9.9G  529M  8.9G   6% /
none                  828M  116K  828M   1% /dev
none                  833M     0  833M   0% /dev/shm
none                  833M   40K  833M   1% /var/run
none                  833M     0  833M   0% /var/lock
/dev/xvda2            147G  188M  140G   1% /mnt

Can I convert /mnt (/dev/xvda2) to ext4? If yes, can you please guide me or point me to the right resource.


share|improve this question
What filesystem is it right now? Do a cat /etc/mtab to find out. – mailq Sep 29 '11 at 21:34
At present its ext3 - /dev/xvda2 /mnt ext3 rw 0 0 – Gautam Sep 29 '11 at 21:50
Then just edit /etc/fstab and change ext3 to ext4. That's all. – mailq Sep 29 '11 at 21:58
up vote 10 down vote accepted

You can convert /mnt from ext3 to ext4 in place (after backing up data for safety):

sudo umount $dev
sudo tune2fs -O extents,uninit_bg,dir_index $dev
sudo fsck -fv $dev
sudo mount $dev

You don't have to edit /etc/fstab on Ubuntu 11.04 for EC2 since the AMI lists that file system as auto.


share|improve this answer
  1. Backup /mnt/
  2. umount /mnt/
  3. mkfs.ext4 /dev/xvda2
  4. mount /mnt/
  5. Restore your files
share|improve this answer
Thanks, I will try it now. – Gautam Sep 29 '11 at 21:50
Thanks it works. Even mkfs -t ext4 /dev/xvda2 works fine. – Gautam Sep 29 '11 at 22:12

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.