The ext4 filesystem.

Around July 2009, Fedora Core 11 came along with support for the ext4 filesystem. The big plus for me is support for large filesystems (bigger than 2 terrabytes).

Ext3 supported filesystems up to 2 terrabyte with files as big as 16 gigabytes.
Ext4 supports filesystems up to 1 exabyte with files as big as 16 terrabytes.

The above is not strictly true. The Ext3 filesystem uses 32 bit pointers, so it can keep track of 2 Giga-blocks. Given the default 1 kb block size, this would indeed be 2 terrabytes. If you use a 4 kb block size, then the Ext3 filesystem can handle a 8 terrabyte filesystem.

We have a RAID array that we are just expanding from a total capacity of 1 terrabyte to 5 terrabytes, so this promises to be useful.

Just for fun, I format a new single disk as ext4 via:

mke2fs -t ext4 /dev/sdc1
This works fine, and I mount the disk and move our root partition to it. Then in preparation to do some system maintenance, I desire to make this the root filesystem. This involves editing two files (/etc/fstab and /boot/grub/grub.conf).
fstab looks like this (no great surprise).
/dev/sdc1	 /                       ext4    defaults        1 1

grub.conf looks like this:

title Fedora (2.6.29.5-191.fc11.x86_64)
        root (hd0,0)
	kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/sdc1 quiet rootfstype=ext4
	initrd /initrd-2.6.29.5-191.fc11.x86_64.img
Two things to note here. The root (hd0,0) line has nothing to do with the root filesystem. This specifies the grub root (i.e. the /boot partition on my system). Secondly, I was unaware of the need for rootfstype=ext4, but without it my system would not boot and gave the error:
EXT3-fs Couldn't mount because of unsupported optional features (240)

Have any comments? Questions? Drop me a line!

Adventures in Computing / [email protected]