Installation guide

Chapter 6. The Ext3 File System
40
Note
If you upgrade to Red Hat Enterprise Linux 6 with the intention of keeping any ext3 file systems
intact, you do not need to remake the file system.
New Mount Option: data_err
A new mount option has been added: data_err=abort. This option instructs ext3 to abort the
journal if an error occurs in a file data (as opposed to metadata) buffer in data=ordered mode. This
option is disabled by default (i.e. set as data_err=ignore).
More Efficient Storage Use
When creating a file system (i.e. mkfs), mke2fs will attempt to "discard" or "trim" blocks not used by
the file system metadata. This helps to optimize SSDs or thinly-provisioned storage. To suppress this
behavior, use the mke2fs -K option.
The following sections walk you through the steps for creating and tuning ext3 partitions. For
ext2 partitions, skip the partitioning and formatting sections below and go directly to Section 6.2,
“Converting to an Ext3 File System”.
6.1. Creating an Ext3 File System
After installation, it is sometimes necessary to create a new ext3 file system. For example, if you add a
new disk drive to the system, you may want to partition the drive and use the ext3 file system.
The steps for creating an ext3 file system are as follows:
1. Format the partition with the ext3 file system using mkfs.
2. Label the file system using e2label.
6.2. Converting to an Ext3 File System
The tune2fs allows you to convert an ext2 file system to ext3.
Note
Always use the e2fsck utility to check your file system before and after using tune2fs. A
default installation of Red Hat Enterprise Linux uses ext4 for all file systems. Before trying to
convert, back up all your file systems in case any errors occur.
In addition, Red Hat recommends that you should, whenever possible, create a new ext3 file
system and migrate your data to it instead of converting from ext2 to ext3.
To convert an ext2 file system to ext3, log in as root and type the following command in a terminal:
tune2fs -j block_device
where block_device contains the ext2 file system you wish to convert.
A valid block device could be one of two types of entries: