Installation guide

Mounting an Ext4 File System
45
Note
It is possible to use tune2fs to enable some ext4 features on ext3 file systems, and to use
the ext4 driver to mount an ext3 file system. These actions, however, are not supported in Red
Hat Enterprise Linux 6, as they have not been fully tested. Because of this, Red Hat cannot
guarantee consistent performance and predictable behavior for ext3 file systems converted or
mounted thusly.
7.2. Mounting an Ext4 File System
An ext4 file system can be mounted with no extra options. For example:
mount /dev/device /mount/point
The ext4 file system also supports several mount options to influence behavior. For example, the acl
parameter enables access control lists, while the user_xattr parameter enables user extended
attributes. To enable both options, use their respective parameters with -o, as in:
mount -o acl,user_xattr /dev/device /mount/point
The tune2fs utility also allows administrators to set default mount options in the file system
superblock. For more information on this, refer to man tune2fs.
Write Barriers
By default, ext4 uses write barriers to ensure file system integrity even when power is lost to a device
with write caches enabled. For devices without write caches, or with battery-backed write caches,
disable barriers using the nobarrier option, as in:
mount -o nobarrier /dev/device /mount/point
For more information about write barriers, refer to Chapter 17, Write Barriers.
7.3. Resizing an Ext4 File System
Before growing an ext4 file system, ensure that the underlying block device is of an appropriate size to
hold the file system later. Use the appropriate resizing methods for the affected block device.
An ext4 file system may be grown while mounted using the resize2fs command, as in:
resize2fs /mount/point size
The resize2fs command can also decrease the size of an unmounted ext4 file system, as in:
resize2fs /dev/device size
When resizing an ext4 file system, the resize2fs utility reads the size in units of file system block
size, unless a suffix indicating a specific unit is used. The following suffixes indicate specific units:
s — 512kb sectors
K — kilobytes
M — megabytes