Filesystem conversions (ext2 to ext3 etc)

This is how to do a filesystem conversion assuming sda5 is your logical drive to convert.

 

To do an ext2 to ext3 filesystem conversion:

[root@server1 ~]# tune2fs -j /dev/sda5

To do an ext3 to ext4 filesystem conversion

[root@server1 ~]# tune2fs -O dir_index,uninit_bg,extents /dev/sda5

To do an ext2 to ext4 filesystem conversion

[root@server1 ~]# tune2fs -O dir_index,uninit_bg,has_journal /dev/sda5

To do an ext3 to ext2 filesystem back conversion

[root@server1 ~]# tune2fs -O ^has_journal /dev/sda5

Always do a filesystem check after the conversion:

[root@server1 ~]# e2fsck -pf /dev/sdb1

 

Also: Use at your own risk!