How to convert an ext3 partition to ext4?

Well, this is actually not too hard and ext4 gives better performance in various cases, so an update to ext4 is surely not a bad thing to do, but first check if your kernel does support ext4!

Converting an ext3 to ext4 is plain forward: 

  1. unmount the file system
  2. tune2fs -O extents,uninit_bg,dir_index /dev/sdaX
  3. fsck ( not 100% necessary, but doesn´t hurt )

So here you go:

cd /; umount /dev/sda1
tune2fs -O extents,uninit_bg,dir_index /dev/sda1
fsck -pf /dev/sda1
 

If you want to boot from an ext4 root device, you have to tell this to your kernel via boot parameter:
rootfstype=ext4

If you use grub as boot loader, change the entries as this one:

title		Debian GNU/Linux, kernel 2.6.26-2-686
root		(hd0,0)
kernel		/vmlinuz-2.6.26-2-686 root=/dev/mapper/gosisrv01-root ro quiet rootfstype=ext4
initrd		/initrd.img-2.6.26-2-686

You cannot comment on this entry