« previous: Your New Year's Resolution: Don't Get Hacked | next: What Does NOT NULL Mean, Really? »
Convert ext3 to ext4 for Much Faster Disk Checks

Now that ext4 has been in the mainline Linux kernel for a while, and has become the default filesystem (replacing ext3) in Ubuntu, I decided to use it when creating a new filesystem on a backup disk recently.
I was blown away by how much faster the fsck operation is on ext4 compared to ext3. For a partition of a few hundred gigabytes, where the fsck took around an hour on ext3, it took about a minute on ext4. Apparently, overall performance is improved too, but this improvement in the filesystem-check process is just incredible.
To convert an existing ext3 filesystem to ext4, you just need a single command, followed by an fsck:
tune2fs -O extents,uninit_bg,dir_index /dev/sdXX
e2fsck -fD /dev/sdXX
Of course replace "sdXX" with your actual device name. You can also include the -C0 option to e2fsck if you want a progress bar for the operation. And note this from the kernel.org wiki:
Running fsck will complain about "One or more block group descriptor checksums are invalid" - this is expected and one of the reasons why tune2fs requests to fsck.
See this Ubuntu help page for more details, including how to do this conversion for your active root filesystem.