ext3 notes

Alessandro Dotti Contra <alessandro@hyboria.org>
Revision: 1.5 - last updated 20050928



Enabling ext3 support

If you want to enable ext3 file system support in your custom kernel, you have to choose the following options:

  <*> Ext3 journalling file system support
  [*]   JBD (ext3) debugging support

Performance issues

Enabling debugging support implies performance degradation.

Creating a new ext3 file system

To create a new ext3 file system on a newly created partition, just type (as root):

  # mke2fs -j /dev/hdx

After the new file system is created you can tune the check intervals:

  # tune2fs -i 180 -c 30 /dev/hdx

These are the default values on a Debian system; a check is performed every 180 days or every 30 mounts.

About file system checks

Enabling file system checks while using a journalled file system is not strictly needed, but it's still a safe measure against hardware faults.

Last but at least, an appropriate entry must be added to /etc/fstab. You can specify different mount options for ext3 file systems.

Converting an existing ext2 file system

If you need to convert an existing ext2 file system to ext3, just type (as root):

  # tune2fs -j /dev/hdx

After the file system has been converted, you need to change the relative entry in /etc/fstab, replacing ext2 with ext3 and specifying the desired mount options.

Lilo options and the root file system.

An ext3 capable kernel will auto detect an ext3 root file system at boot time. If this is unwanted, the following option might be used:

  LILO: linux rootfstype=ext2

Mount options for the root file system can be specified with the rootflags option (see lilo man page for details).

ext3 mount options

The following options are available for an ext3 file system:

mount -o data=journal
data and meta data are journalled (better robustness).

mount -o data=writeback
only meta data are journalled (better performances).

mount -o data=ordered
only meta data are journalled but data are flushed to disk before transaction is committed (this is the default).

This work is licensed under the terms of the Creative Commons NonCommercial-Attribution-ShareAlike license. A reference copy of this license can be found at the following address: http://creativecommons.org/licenses/by-nc-sa/2.5/