System information

The ext4 file system also supports the following:
Extended attributes (xattr) This allows the system to associate several additional
name and value pairs per file.
Quota journaling — This avoids the need for lengthy quota consistency checks after a
crash.
Note
The only supported journaling mode in ext4 is d ata= ord ered (default).
Subsecond timestamps — This gives timestamps to the subsecond.
6.1. Creat ing an Ext 4 File Syst em
To create an ext4 file system, use the mkfs. ext4 command. In general, the default options are
optimal for most usage scenarios:
# mkfs. ext4 /d ev/device
Below is a sample output of this command, which displays the resulting file system geometry and
features:
Examp le 6 .1. mkfs. ext4 co mman d o u t p u t
~]# mkfs.ext4 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
245280 inodes, 979456 blocks
48972 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1006632960
30 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Chapt er 6 . T he Ext 4 File Syst em
33