Converting from ext2 to ext3 and back to ext2
Yes, is possible and is very easy. Ext2 differ from Ext3 only on few things: Journalling is one of them and can be added very easy to an Ext2 system. First, just look to the features of a Ext2 filesystem:
[root@randombugs]# tune2fs -l /dev/sdb1 | grep features
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super large_file
Adding a journal to a Ext2 filesystem is an easy process and some people are doing that directly on a mounted partitions. I recommend you to don’t do it on a read-write partition and remount the partitions read-only:
[root@randombugs]# mount -o remount,ro /usr
After I remounted the usr partition as read-only we just add the journal:
[root@randombugs]# tune2fs -j /dev/sdb1
tune2fs 1.41.3 (12-Oct-2008)
Creating journal inode: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override
Let’s see the features again of the partition /dev/sdb1
[root@randombugs]# tune2fs -l /dev/sdb1 | grep features
Filesystem features: has_journal ext_attr resize_inode dir_index filetype sparse_super large_file
Now we have a journal and you can remount your partitions as read write.
[root@randombugs]# mount -o remount,rw /usr
Converting an Ext3 to Ext2 is not such a big deal … BUT is not safe. I recommend you to backup all your data if you need to do that and umount your partition before doing that.
[root@randombugs]# umount /dev/sdb1
[root@randombugs]# tune2fs -O ^has_journal /dev/sdb1
tune2fs 1.41.3 (12-Oct-2008)
[root@randombugs]# e2fsck /dev/sdb1
I hope converting from Ext3 to Ext4 to be at least as easy as the conversion from Ext2 to Ext3.















The partition doesn’t have to be mounted to add a journal.
It worked under my Debian but should be mounted readonly. On what distribution did you tried ?
Leave your response!
Syndicate
Blogroll
Earn while you snoring!
Tags
Promote
Categories