Having Fun While Converting ext2 to ext3 and Vice Versa

Ok this time I was playing around with different filesystem types. I found this page quite useful by doing so, here is a short summary of the most important commands:

# make a normal ext2 filesystem
mke2fs /dev/hda1
# add a journal and therefore make it to an ext3 fs
tune2fs -j /dev/hda1
# ok now lets remove the journal
tune2fs -O ^has_journal /dev/hda1
# check if still everything is ok
e2fsck -f /dev/hda1

Do this whenever possible on a unmounted partition. Oh and don’t forget to edit /etc/fstab when needed.

Next I tried to resize a partition with the corresponding filesystem. First I checked out parted, but I couldn’t manage to get more than a message like “this ext2 filesystem looks suspicious” from it. So I decided to do it directly with resize2fs:

resize2fs /dev/hda 5000M

And finally resize the partition with fdisk or cfdisk, but be careful if something goes wrong this could lead to serious problems including data loss or filesystem corruption.