jump to navigation

ext4 on Ubuntu 9.04 July 4, 2009

Posted by jdstrand in ubuntu, ubuntu-server.

It all started back in the good ol’ days of the Jaunty development cycle when I heard this new fangled filesystem thingy called ext4 was going to be an option in Jaunty. It claimed to be faster with much shorter fsck times. So, like any good Ubuntu developer, I tried it. It was indeed noticeably faster and fsck times were much improved.

The honeymoon was over when I ended up hitting bug #317781. That was no fun as it ate several virtual machines and quite a few other things (I had backups for all but the VMs). This machine is on a UPS, uses raid1, and on modern hardware (dual core Intel system with 4GB of RAM). In other words, this is not some flaky system but one that normally is only rebooted when there is a kernel upgrade (well, that is a white lie, but you get the point– it is a stable machine). According to Ted Ts’o, I shouldn’t be seeing this. Frustrated, I spent the better part of a weekend shuffling disks around to try to move my data off of ext4 and reformat the drive back to ext3. I was, how shall I put it, disappointed.

Some welcome patches were applied to Jaunty’s kernel soon after that to make ext4 behave more like ext3. By all accounts this stops ext4 from eating files under adverse conditions. So, now not only does the filesystem perform well, it doesn’t eat files. Life was good…

… until I noticed that under certain conditions I would get a total system freeze. Naturally, there was nothing in the logs (something I always appreciate ;). I thought it might have been several things, but I couldn’t prove any of them. Yesterday, however, I was able to reliably freeze my system. Basically, I was compiling a Jaunty kernel (2.6.28) in a schroot and using this command:

$ CONCURRENCY_LEVEL=2 AUTOBUILD=1 NOEXTRAS=1 skipabi=true fakeroot debian/rules binary-generic
Things were going along fine until I tried to delete a ton of files in a deep directory during the compile, then it would freeze. I was able to reproduce this 3 times in a row. Finally, I shuffled some things around and put my /home partition back on ext3 and I could not reproduce the freeze. There are several bugs in Launchpad talking about ext4 and system freezes, and after a bit more research I will add my comments, but for now, I am simply hopeful I will not see the freezes any more.

To be fair, ext4 is not the default filesystem on 9.04, and while it is supposed to be in 9.10, people I know running ext4 on 9.10 aren’t seeing these problems (yes, I’ve asked around). I do continue to use ext4 for ‘/’ on Jaunty systems with a separate /home partition as ext3, because it really does perform better, and this seems to be a good compromise. Having been burned by ext4 a couple of times now, I think it’ll probably be awhile before I trust ext4 for my important data though. Time will tell. :)


1. Edward A Robinson - July 4, 2009

yup thats my plan even with 9.10, ext4 for the system ext3 for my data!

2. shamil - July 4, 2009

Before using ext4 i checked out the bugs in the so called stable version of it that was included in ubuntu and mandriva this year. Just following the developer emails was a clear indication that ext4 is not stable and should be avoided in favor of ext3 for reliability.

3. Maxim - July 5, 2009

I have the same problem with Jaunty and ext4 (bug #330824, a fix has been committed two days ago).

4. eythian - July 5, 2009

In case you hadn’t found it, the lockup bug is: https://bugs.launchpad.net/ubuntu/jaunty/+source/linux/+bug/330824

5. João Pinto - July 5, 2009

I have been using ext4 for all the partitions on both my work and home desktop system, had no problems despite my rare random system hangs on the laptop (not associated with FS I/O).
For important data I always trust on the backups, never on my main system :)

jdstrand - July 5, 2009

Of course, and I do have backups. That said, having a reliable filesystem is something I am pretty interested in. :)

6. Mike - July 5, 2009

Forget EXT4; wait for BTRFS.

7. peoplefromtaiwan - July 5, 2009

Re:Soft lockups (freezes) when deleting files from ext4 partitions on 2.6.28

Fix Comitted – By Stefan Bader on 2009-07-03


jdstrand - July 5, 2009

This is excellent news– I hadn’t seen that bug yet, and this will save me some time researching it. Thanks!

8. Chris Smart - July 6, 2009

If your system freezes, don’t forget your Magic keys to sync your data and reboot safely.

ALT + SysReq + r, e, i, s, u, b



9. Anes - November 6, 2009

NOW I am realyl scared. I am using ext4 since it ever came out on Ubuntu and *knocking on wood* never had a problem with it so far.
Hopefully it stays this way. Hope you guys have backups.


jdstrand - November 6, 2009

Don’t be too scared– recent kernel updates for 9.04 have stability fixes that should address these issues.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: