XFS

From Pulsed Media Wiki
Revision as of 12:08, 21 April 2025 by Gallogeta (talk | contribs) (Created page with "== XFS == '''XFS''' is a high-performance 64-bit journaling file system developed by Silicon Graphics, Inc. (SGI) in 1994. Originally designed for the IRIX operating system, X...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

XFS

XFS is a high-performance 64-bit journaling file system developed by Silicon Graphics, Inc. (SGI) in 1994. Originally designed for the IRIX operating system, XFS was later ported to Linux and became one of the most commonly used filesystems for high-throughput and large-scale storage applications.

As of recent Linux distributions, XFS is fully supported and is the default file system for certain enterprise systems such as Red Hat Enterprise Linux (RHEL).

Features

  • High performance and scalability – Designed to handle large files and high I/O operations efficiently, making it ideal for enterprise, multimedia, and large-dataset environments.
  • Journaling – Provides metadata journaling for fast crash recovery.
  • 64-bit addressing – Supports extremely large file systems (up to 8 exabytes) and individual files (up to 8 exabytes).
  • Delayed allocation – Optimizes file layout by deferring block allocation until data is flushed to disk.
  • Online resizing – Supports growing mounted file systems without unmounting.
  • Advanced quota management – Per-user, group, and project-level quota tracking.
  • Extent-based allocation – Reduces fragmentation by allocating blocks in large contiguous regions.

Limitations

  • No built-in file-level compression or deduplication
  • No native snapshot support – Requires external tools such as LVM or volume managers.
  • No shrink support – File systems cannot be reduced in size after creation.
  • More complex recovery in corruption scenarios compared to simpler filesystems like ext4.

Usage

To format a partition with XFS:

<syntaxhighlight lang="bash"> mkfs.xfs /dev/sdX1 </syntaxhighlight>

To mount an XFS partition:

<syntaxhighlight lang="bash"> mount -t xfs /dev/sdX1 /mnt </syntaxhighlight>

To check an XFS filesystem (must be unmounted):

<syntaxhighlight lang="bash"> xfs_repair /dev/sdX1 </syntaxhighlight>

Common Use Cases

  • Enterprise servers and storage systems
  • High-performance computing (HPC)
  • Multimedia processing and video editing
  • Large file servers and NAS systems

XFS is commonly used where performance and reliability are prioritized over flexibility (e.g., snapshots, compression).

Comparison to Other Filesystems

Feature XFS ext4 Btrfs
Max file size 8 EiB 16 TiB 16 EiB Max volume size 8 EiB 1 EiB 16 EiB Journaling Metadata only Metadata + data (optional) Copy-on-write Snapshots No No Yes Online resize Grow only Grow/Shrink Grow/Shrink Compression No No Yes Recommended for High performance, large files General use Advanced features

See Also