18.14 Converting a Non-root Ext2 File System to Ext3

Caution

Before performing a file system conversion, make a backup of the file system from which you can restore its state.

To convert a non-root ext2 file system to ext3:

  1. Unmount the ext2 file system:

    # umount filesystem
  2. Use fsck.ext2 to check the file system.

    bash-4.1# fsck.ext2 -f device
  3. Use the following command with the block device corresponding to the ext2 file system:

    # tune2fs -j device

    The command adds an ext3 journal inode to the file system.

  4. Use fsck.ext3 to check the file system.

    bash-4.1# fsck.ext3 -f device
  5. Correct any entry for the file system in /etc/fstab so that its type is defined as ext3 instead of ext2.

  6. You can now remount the file system whenever convenient:

    # mount filesystem

For more information, see the tune2fs(8) manual page.