If you consider switching you current Linux partitions to ext3, this HowTo is for you.
Although ext3 and ext2 partitions remain fully compatible, ext3 has a lot of advantages. For instance, when your computer crashed (which should not happen too often in Linux, but it does...), all the disks that were not cleanly unmounted had to be verified by fsck when mounted again. On large disks with many files that check could take 10 minutes or even more. With ext3, the disk can be checked and repaired within a few seconds.
ext3 offers improved data integrity features, avoiding that garbage data gets saved into your files when a severe crash occurs. Also, as ext3 and ext2 remain fully compatible, the ext2 fsck program which has proven to be very efficient over the past years can be used to fix ext3 disks in case of very serious disk errors.
Also, the ext3 driver improves the overall speed of your disks by optimizing data access.
And finally, the most important advantage of ext3 is the easy transition. Converting an ext2 partition to ext3 can be done "on the fly" without the need to unmount your disks or even worse reformat them. And, you can also easily switch back to ext2, with the same comfort, if ever you can find a valid reason to do so.
So let's get started. On PPC machines, you need an ext3 capable kernel, recent versions of mount and fsck and or later.
Yellow Dog Linux 2.1 and SuSE 7.3 both are up to date on ext3 and you won't need any upgrades to switch to ext3. On other distributions or on older versions of YDL or SuSE, you have to verify that you have a recent 2.4.x kernel with ext3 support enabled and the latest version of the util-linux package (above all of the mount command) and of the e2fprogs package.
How those packages are provided is often distribution specific, so check for updates on your distro site.
If you want to compile your own kernel, under the filesystems menu, select ext3. Please also select "JBD debugging support", as it will produce useful diagnostics if something goes wrong. I highly recommend compiling those into the kernel and not as modules.
Once you have made sure that your software is recent enough, you'll have to do the following to update to ext3:
To convert an ext2 partition (eg. /dev/hda7) to ext3, type this as root into a terminal:
tune2fs -j /dev/hda7 (Of course you have to replace hda7 by the relevant partition on your system)
The partition does not need to be unmounted to do this. The command creates the journal system on top of the existing ext2 file system and does not modify any of your data on the disk.
If you want to create a new ext3 filesystem on an empty partition, do the following:
mke2fs -j /dev/hda8 (Of course you have to replace hda8 by the relevant partition on your system)
Well, that was already it for the conversion! Next thing to do is to modify the relevant entries in /etc/fstab
Open /etc/fstab (as root) in your favourite editor. Identify the line that is relevant for the partition that you have changed to ext3 and change ext2 to ext3 as Type indication.
The line will then look like this:
/dev/hda12 / ext3 defaults 1 1
instead of:
/dev/hda12 / ext2 defaults 1 1
Simple, isn't it? Save the changes.
A last step we want to do is to disable the annoying file system checks we know from ext2. On an ext2 volume, the file system is checked by fsck on every 20th mount or after 180 days, whichever comes first. As ext3 partitions don't need that much attendance and are able to repair themselves, we can disable those checks. To do so, simply type (always as root...):
tune2fs -i 0 -c 0 /dev/hda7 (Of course you have to replace hda7 by the relevant partition on your system)
Note that it may not be bad to run a manual fsck on the partition sometimes, just to make sure the partition is really clean. (I usually do it every few month)
So, all that's left to do now is to reboot and you can enjoy your ext3 enabled system :) As always, if there are any questions, comments or concerns, .


