Linux – “Converting” a filesystem from ext3 to ext4

ext2ext3ext4filesystemslinux

I've read on some Q&A on this website that one can "convert" an ext3 filesystem to ext4 without formatting, by issuing

tune2fs -O extents,uninit_bg,dir_index /dev/dev-name

And then running fsck.

I have a few questions regarding said operation, which weren't clarified in said Q&As…

  1. Is it really converted, as in "you'd get the same results formatting (except no data loss)"? It just seems strange for me (a layman) that it doesn't require formatting.

  2. Does it matter if you have an "old" version of tune2fs (I'd do it from a live CD – Puppy 5.4 Dec 2012 – but I guess fsck doesn't update that often)?

  3. Is there a significant performance gain by switching from ext3 to ext4 on the boot partition? I didn't want to mess with it and just do the switch on /home, but if there's a big difference I'd do some reading and apply it to the boot partition as well.

Best Answer

Obviously tune2fs just configures the filesystem, it does not rewrite data on disk. And obviously without rewriting you do not get the same results. The ext4 features are applied to new data only. Thus if you really want all benefits then you have to backup the data, format the volume as ext4 (or make the changes with tune2fs and then delete all the data) and restore the data.

A less radical approach is to have the tune2fs approach and copy one directory (tree) at a time, as the free space on the volume allows.

Related Question