6.3. Converting to an ext3 File System
tune2fsprogram can add a journal to an existing ext2 file system without altering the data already on the partition. If the file system is already mounted while it is being transitioned, the journal is visible as the file
.journalin the root directory of the file system. If the file system is not mounted, the journal is hidden and does not appear in the file system at all.
A default installation of Red Hat Enterprise Linux uses ext3 for all file systems.
To convert an ext2 file system to ext3, log in as root and type,
/sbin/tune2fs -j <file_system>
where <file_system> is an appropriate LVM2 file system.
A valid LVM2 file system could be one of two types of entries:
- A mapped device — A logical volume in a volume group, for example,
- A static device — A traditional storage volume, for example,
/dev/hdbX, where hdb is a storage device name and X is the partition number.
dfcommand to display mounted file systems. For more detailed information on the LVM file system, refer to Chapter 8, LVM Configuration.
For the remainder of this section, the sample commands use the following value:
After doing this, be certain to change the partition type from ext2 to ext3 in the
If you are transitioning your root file system, you must use an
initrdimage (or RAM disk) to boot. To create this, run the
mkinitrdprogram. For information on using the
man mkinitrd. Also, make sure your GRUB configuration loads the
If you fail to make this change, the system still boots, but the file system is mounted as ext2 instead of ext3.