System information

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 no barri er option, as in:
# mo unt -o no barri er /d ev/device /mount/point
For more information about write barriers, refer to Chapter 22, Write Barriers.
6.3. Resizing an Ext 4 File Syst em
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 resi ze2fs command:
# resi ze2fs /mount/device node
The resi ze2fs command can also decrease the size of an unmounted ext4 file system:
# resi ze2fs /d ev/device size
When resizing an ext4 file system, the resi ze2fs 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 — 512 byte sectors
K — kilobytes
M — megabytes
G — gigabytes
Note
The size parameter is optional (and often redundant) when expanding. The resi ze2fs
automatically expands to fill all available space of the container, usually a logical volume or
partition.
For more information about resizing an ext4 file system, refer to man resi ze2fs.
6.4. Backup ext 2/3/4 File Syst ems
Pro ced u re 6 .1. Backup ext 2/3/4 File Syst ems Examp le
1. All data must be backed up before attempting any kind of restore operation. Data backups
should be made on a regular basis. In addition to data, there is configuration information
that should be saved, including /etc/fstab and the output of fd i sk -l . Running an
sosreport/sysreport will capture this information and is strongly recommended.
# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot1 /boot ext3 defaults 1 2
Writ e Barriers
35