Chapter 9. Getting started with XFS
This is an overview of how to create and maintain XFS file systems.
9.1. The XFS file system Copy linkLink copied to clipboard!
XFS is a highly scalable, high-performance, robust, and mature 64-bit journaling file system. It supports very large files and file systems on a single host. It is the default file system in Red Hat Enterprise Linux 10. XFS was originally developed in the early 1990s by SGI and has a long history of running on extremely large servers and storage arrays.
The features of XFS include:
- Reliability
- Metadata journaling ensures file system integrity after a system crash. It keeps a record of file system operations. These records can be replayed when the system restarts and the file system is remounted.
- Extensive run-time metadata consistency checking
- Scalable and fast repair utilities
- Quota journaling. This avoids the need for lengthy quota consistency checks after a crash.
- Scalability and performance
- Supported file system size up to 1024 TiB
- Ability to support a large number of concurrent operations
- B-tree indexing for scalability of free space management
- Sophisticated metadata read-ahead algorithms
- Optimizations for streaming video workloads
- Allocation schemes
- Extent-based allocation
- Stripe-aware allocation policies
- Delayed allocation
- Space pre-allocation
- Dynamically allocated inodes
- Other features
- Reflink-based file copies
- Tightly integrated backup and restore utilities
- Online defragmentation
- Online file system growing
- Comprehensive diagnostics capabilities
-
Extended attributes (
xattr). With this, the system can associate several additional name/value pairs per file. - Project or directory quotas for quota restrictions over a directory tree.
- Subsecond timestamps
- Performance characteristics
XFS has high performance on large systems with enterprise workloads. A large system is one with a relatively high number of CPUs, multiple HBAs, and connections to external disk arrays. XFS also performs well on smaller systems that have a multi-threaded, parallel I/O workload.
XFS performs comparably well on smaller systems, but is more focused on scalability and large data sets.
9.2. Comparison of tools used with ext4 and XFS Copy linkLink copied to clipboard!
Different tools and commands accomplish common file system tasks on ext4 and XFS, including creation, checking, resizing, and backup operations.
This section compares which tools to use to accomplish common tasks on the ext4 and XFS file systems.
| Task | ext4 | XFS |
|---|---|---|
| Create a file system |
|
|
| File system check |
|
|
| Resize a file system |
|
|
| Save an image of a file system |
|
|
| Label or tune a file system |
|
|
| Back up a file system |
|
|
| Quota management |
|
|
| File mapping |
|
|
If you want a complete client-server solution for backups over network, you can use bacula backup utility that is available in RHEL 9. For more information about Bacula, see Bacula backup solution.