Converting ext3 to ext2

From KoshWiki

Jump to: navigation, search

Contents

Origin

I learned how to do this from troubleshooters.com[1]

NOTE: I ran the removal in knoppix, and the readd while the system was running (it is on a test machine)

Description

The only difference between ext2 and ext3 is the journaling support (that I know of) so to downgrade from ext3 to ext2 you just need to remove the journal.

To return to ext3, you just need to readd the journal.

Removing the Journal

First we run tune2fs to remove the journal

root@1[~]# tune2fs -O ^has_journal /dev/hda1
tune2fs 1.38 (30-Jun-2005)

Then run e2fsck (actually, you should run e2fsck -f /dev/hda1 instead)

root@1[~]# e2fsck /dev/hda1
e2fsck 1.38 (30-Jun-2005)
/: clean, 26574/19202048 files, 690651/19183610 blocks

Readding the Journal

tune2fs again to add the journal

debian:~# tune2fs -j /dev/hda1
tune2fs 1.37 (21-Mar-2005)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first.  Use tune2fs -c or -i to override.

References

  1. Converting Ext2 Filesystems to Ext3 after a quick google.
Personal tools