The XFS system was originally developed as a 64-bit file system for the Unix-based operating system (OS) known as IRIX in 1994. It's received regular updates since then, ultimately being released to open source communities in 1999 and becoming a mainstay in most Linux distros by the early 2000s. Red Hat Enterprise Linux 7.0, which was released in 2014, even uses XFS as its default file system.
Primary Features
Linux distros with XFS give users numerous advantages over other file systems, including:
- Data journaling: Journaling protects your system from crashes and sudden power outages while writing data to a serial journal before updating the disk blocks on the hard drive. It ultimately provides greater data consistency and integrity than other methods of writing data.
- Storage capacity: Since it's a 64-bit file system, XFS can support large-capacity hard drives. It's currently compatible with a maximum of approximately 8 exibytes, but 32-bit installations are limited to 16 tebibytes. Regardless, this is a substantial amount of storage space.
- Sparse files: One reason why XFS can accommodate such large file sizes is by providing a 64-bit spare address space for every file on the hard drive. By using extent mapping for these files, the final file allocation map is kept at a minimum size.
- Allocation: XFS also excels at data allocation, including striped allocation in RAID setups, extent-based allocation, and delayed allocation. It also uses internal partitions to create allocation groups that can optimize I/O performance – especially when using multiple processors or cores.
- Input / Output (I/O): When it was originally developed for IRIX, XFS used a guaranteed-rate I/O that let certain applications reserve the necessary bandwidth ahead of time. In modern deployments, XFS uses the direct I/O method.
- Partition Management: The XFS file system can expand partitions at any time – including during normal disk operations – as long as there is enough unallocated space on the drive.
- Online defragmentation: Another advantage of XFS is its natural resistance to disk fragmentation. However, in the case that an XFS-based hard drive starts to experience fragmentation, the built-in defrag utility, xfs_growfs, is usable even during normal system operations.
As you can see, there are numerous advantages to using XFS over other file systems. However, there are some drawbacks and disadvantages to consider.
Drawbacks and Disadvantages
While XFS is highly advantageous, it's not without its flaws. Some of the most notable drawbacks include:
- Required data journaling: While data journaling is a benefit to traditional, hard disk drives (HDDs), it can actually reduce the longevity of solid-state drives (SSDs). Unfortunately, the data journaling feature cannot be disabled in XFS.
- Disk snapshots: Because XFS relies on the volume manager for disk snapshots, support for online or live snapshots has yet to be implemented.
- Partitioning limitations: Although XFS allows for partitions to be expanded at virtually any time, the same partitions cannot be shrunk. However, there are several workarounds for this particular issue.
For users who require a large amount of storage space and fast, efficient disk operations, XFS is one of the best options on nearly all modern Linux distros.
You may read more about the XFS in Wikipedia: XFS.
Our article Data Recovery from an XFS Disk explains how to recover files from such disks.