perbu (perbu) wrote,

ext4 and the Jaunty Jackalope

I've been longing for ext4 for a long time now. ext3 has a really broken implementation of fsync(2). Each fsync() turns into a sync(). If there is some activity on the file system your computer will slow to a halt. firefox uses sqlite and sqlite uses fsync() quite a lot. Ubuntu 9.04 will be released in about a month. I thought I might help out and test it and finally get a sane fsync(). Thirdly there a few really annoying bugs in Ubuntu 8.10 I hoped would be fixed. Great, I thought.

Upgrading is really quite simple. "sudo upgrade-manager -d" in a shell, press "next" a few times and you're done. If you're really crazy you want to convert file systems to ext4 as well, here is how you can do this.

First, find some sort of live linux distribution. I prefer PLD rescue. It's small, fast and it has all the tools and file systems you'll need. Make sure it supports ext4. If you don't want to convert your root file system you can skip this.

Boot the rescue system and get a root shell. Now you need to enable all the features that turn an ext3 system into a ext4 system:
# tune2fs -O extents,uninit_bg,dir_index /dev/DEVICE

Replace DEVICE with the real name of your, uhm, device. tune2fs did tell you that you'll need a fsck after you enabled the new features.

# e2fsck -fyD /dev/DEVICE


Rince and repeat for every filesystem on the system. Do a search/replace ext3/ext4 in /etc/fstab afterwards. Now you can reboot. You don't have to fuzz with the initramfs since the nice Ubuntu people finally built the ext4 support into the kernel. I guess they did this to save time on boots - but the fact that the whole system now autodetects what kind of root file system you have doesn't hurt.

Eject the live CD and reboot. Voila!
Tags: ext4, jaunty, ubuntu
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded  

  • 3 comments