System information
Note
A default installation of Red Hat Enterprise Linux uses ext4 for all file systems. However, to
convert ext2 to ext3, always use the e2fsck utility to check your file system before and after
using tune2fs. Before trying to convert ext2 to ext3, back up all file systems in case any
errors occur.
In addition, Red Hat recommends creating a new ext3 file system and migrating data to it,
instead of converting from ext2 to ext3 whenever possible.
To convert an ext2 file system to ext3, log in as root and type the following command in a terminal:
# tune2fs -j block_device
block_device contains the ext2 file system to be converted.
A valid block device can be one of two types of entries:
A map p ed d evice
A logical volume in a volume group, for example, /d ev/mapper/Vo l G ro up0 0 -
Lo g Vo l 0 2.
A st at ic d evice
A traditional storage volume, for example, /d ev/sdbX, where sdb is a storage device name
and X is the partition number.
Issue the d f command to display mounted file systems.
5.3. Revert ing t o an Ext 2 File Syst em
In order to revert to an ext2 file system, use the following procedure.
For simplicity, the sample commands in this section use the following value for the block device:
/d ev/mapper/Vo l Gro up0 0 -Lo gVo l 0 2
Pro ced u re 5.2. Revert f rom ext 3 t o ext 2
1. Unmount the partition by logging in as root and typing:
# umo unt /dev/mapper/VolGroup00-LogVol02
2. Change the file system type to ext2 by typing the following command:
# tune2fs -O ^has_jo urnal /dev/mapper/VolGroup00-LogVol02
3. Check the partition for errors by typing the following command:
# e2fsck -y /dev/mapper/VolGroup00-LogVol02
4. Then mount the partition again as ext2 file system by typing:
Red Hat Ent erprise Lin ux 6 St orage Admin ist rat io n G uide
30