System information
Chapter 8. The XFS File System
XFS is a highly scalable, high-performance file system which was originally designed at Silicon
Graphics, Inc. It was created to support extremely large filesystems (up to 16 exabytes), files (8
exabytes) and directory structures (tens of millions of entries).
Main Feat u res
XFS supports metadata journaling, which facilitates quicker crash recovery. The XFS file
system can also be defragmented and enlarged while mounted and active. In addition, Red
Hat Enterprise Linux 6 supports backup and restore utilities specific to XFS.
Allo cat io n Feat u res
XFS features the following allocation schemes:
Extent-based allocation
Stripe-aware allocation policies
Delayed allocation
Space pre-allocation
Delayed allocation and other performance optimizations affect XFS the same way that they
do ext4. Namely, a program's writes to an XFS file system are not guaranteed to be on-disk
unless the program issues an fsync() call afterwards.
For more information on the implications of delayed allocation on a file system, refer to
Allocation Features in Chapter 6, The Ext4 File System. The workaround for ensuring writes to
disk applies to XFS as well.
O t h er XFS Feat u res
The XFS file system also supports the following:
Extended attributes ( xattr)
This allows the system to associate several additional name/value pairs per file.
Quota journaling
This avoids the need for lengthy quota consistency checks after a crash.
Project/directory quotas
This allows quota restrictions over a directory tree.
Subsecond timestamps
This allows timestamps to go to the subsecond.
8.1. Creat ing an XFS File Syst em
To create an XFS file system, use the mkfs. xfs /d ev/device command. In general, the default
options are optimal for common use.
When using mkfs. xfs on a block device containing an existing file system, use the -f option to
force an overwrite of that file system.
Chapt er 8 . T he XFS File Syst em
4 1