Ubuntu 9.04 (Jaunty Jackalope) comes with stable ext4 support… I can finally have a 1 Exabyte home partition littered with 64,000 files per directory!
While ext4 vs ext3 isn’t quite a hare and turtle comparison, ext4 also comes with new features such as extents, journaling checksumming, block allocation, delayed allocation, faster fsck, on-line defragmentation, and larger directory sizes. Sold!
I recently installed Ubuntu 9.04. I kept my ext3 /home partition from Ubuntu 8.04. So I decided to convert that from ext3 to ext4. What could possibly go wrong?
Make sure you have backups of your data!
As root, I unmounted the /home partition:
# umount /home
Then I converted the partition:
# tune2fs -O extents,uninit_bg,dir_index /dev/<home partition>
Then I ran fsck over the partition:
# fsck -pDf /dev/<home partition>
It runs in non-interactive mode, automatically ‘fixing’ the filesystem and attempting to optimise directories on the filesystem. It will warn of checksum errors, but that is to be expected while the filesystem is being rebuilt as ext4.
Once done, I modified /etc/fstab to mount the filesystem as ext4. That simply involves replacing ‘ext3′ with ‘ext4′ for the appropriate filesystem.
At the end:
# mount /home
Then I logged in and all was well.
More information on ext4…
ext4 File System: Introduction and Benchmarks
Benchmarks comparing ext3, ext4, xfs and reiserfs (every murderer’s favourite filesystem)…
Real World Benchmarks Of The EXT4 File-System
An interview with the author of ext4…
This was just what I needed and works like a charm. Most of the internet guides are too lengthy and complicated and about converting the boot partition.
thanks!