Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

XFS

Direct answer

XFS is the default filesystem on RHEL: high-performance, journaled, scales well with large files and parallel I/O. It can grow online but cannot shrink.

When to use this

Use it for large or high-throughput filesystems, or when growing or repairing XFS.

First 30 seconds

1. xfs_info <mountpoint> — geometry.

2. Errors? dmesg | grep XFS.

3. Grow: xfs_growfs <mountpoint>.

4. Repair: unmount, xfs_repair /dev/<dev>.

5. df -h after.

Operational verification

mkfs.xfs → mounted → grown with xfs_growfs → repaired offline with xfs_repair

Evidence · next step

For Filesystems & Mounting → XFS, continue with the first unproven Topic check: Capture XFS identity, geometry, backing size and current mount options. If that boundary is healthy, advance to the adjacent check: Review kernel XFS corruption, shutdown and log-recovery messages. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it for large or high-throughput filesystems, or when growing or repairing XFS.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

backing device/LV → XFS superblock + allocation groups → log/metadata B+trees → VFS mount → file I/O → workload

Healthy evidence: XFS mounts with expected geometry/options, kernel reports no shutdown/corruption, size matches planned backing capacity and workload I/O remains healthy.

Step 2 Verification and output interpretation Verify boundary

Existing fast checks for this Topic. - Capture XFS identity, geometry, backing size and current mount options.

  • Review kernel XFS corruption, shutdown and log-recovery messages.
  • Compare filesystem data size with underlying LV/device size before growth.
  • After changes, verify space reporting and representative workload I/O/latency.

Verification chain. backing device/LV → XFS superblock + allocation groups → log/metadata B+trees → VFS mount → file I/O → workload

Step 3 Commands Verify boundary
mkfs.xfs /dev/vg0/data
xfs_info /data
xfs_growfs /data
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: filesystem shutdown, metadata corruption, assuming unsupported shrink, or growing only the LV without XFS growth produces a storage-state mismatch.

Step 5 Common mistakes Narrow the fault
  • Expecting XFS to shrink (it cannot).
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points

Grow with xfs_growfs <mountpoint> (mounted). Plan sizes — shrinking means backup, recreate and restore. Repair with xfs_repair on an unmounted filesystem; -L (zero the log) is a last resort that can lose data.

Key checks
  • findmnt — mount tree with options
  • df -hT — usage and filesystem types
  • findmnt --verify — check /etc/fstab
  • dmesg -T | grep -iE 'ext4|xfs|btrfs' — filesystem kernel messages
ReferenceWhat it is1 section · depth on demand

Core model

Confirm the device and XFS UUID, effective mount and kernel XFS health first. Distinguish log recovery from structural repair. Never assume a generic filesystem shrink workflow applies to XFS; migration/recreation may be required when reducing storage.

ReferenceImportant terms & boundaries5 sections · depth on demand

What this shows and what it does not

XFS evidence shows filesystem state and supported resize behavior, not lower block health or application data semantics.

In depth

XFS: high-performance journalling file system

XFS is the default file system on RHEL and its derivatives, and is popular for large volumes. The kernel's XFS documentation describes it:

  • XFS is a high-performance journalling file system, extent-based, with B-trees for directories, extents and free space.
  • It has a data section, an optional separate log and an optional real-time section.
  • inode64 (the default) allows inodes anywhere on the device.
  • The older V4 format, without metadata checksums and with timestamps ending in 2038, is deprecated and will be removed from the kernel in September 2030.

Mount options (documentation)

OptionEffect
inode64 (default) / inode32Inode placement; inode32 only for very old applications
logbufs=NIn-memory log buffers, 2–8 (default 8)
usrquota, grpquota, prjquotaQuota accounting and enforcement (managed with xfs_quota)
discardOnline TRIM; the documentation recommends fstrim instead, because of the performance cost
noquotaNo quotas

XFS characteristics in operation

PropertyConsequence
Can be grown while mounted (xfs_growfs)Easy expansion with LVM
Can't be shrunk in practicePlan sizes; shrink by copying to a new file system
Dynamic inode allocationRarely runs out of inodes
No boot-time fsckfstab pass field 0; repair with xfs_repair on an unmounted device
Project quotasDirectory-tree quotas (e.g. per tenant or per container)

Checking for the V4 format

xfs_info shows crc=1 for the V5 format. If crc=0 appears, plan a migration before your distribution drops V4 support.

host$ sudo mkfs.xfs -L backup /dev/vg1/backup
host$ xfs_info /srv/backup | grep -E "crc=|isize|bsize=|agcount"
meta-data=/dev/mapper/vg1-backup isize=512    agcount=16, agsize=8192000 blks
         =                       crc=1        finobt=1, sparse=1, rmapbt=1
data     =                       bsize=4096   blocks=131072000, imaxpct=25
host$ sudo xfs_quota -x -c 'report -h' /srv/backup
host$ sudo umount /srv/backup && sudo xfs_repair -n /dev/vg1/backup
host$ sudo xfs_admin -l /dev/vg1/backup
label = "backup"
host$ sudo fstrim -v /srv/backup

Repair

xfs_repair -n checks without changing anything. Run it first. A file system that won't mount because of a dirty log should normally be mounted once, so the log replays, before repairing. xfs_repair -L, which zeroes the log, is a last resort that can lose recent metadata.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works at runtime

XFS is part of Filesystems & Mounting → XFS. XFS is a high-performance journaling filesystem built around allocation groups and metadata B+trees; it supports online growth but not general filesystem shrinking, which materially affects storage-resize planning.

Topic-specific state model. XFS is a high-performance journaling filesystem built around allocation groups and metadata B+trees; it supports online growth but not general filesystem shrinking, which materially affects storage-resize planning.

Interpretation rule. - XFS mount success ≠ metadata trees are free of corruption.

  • xfs filesystem grow ≠ underlying LV/partition was grown safely.
  • Larger backing device ≠ XFS automatically consumes new space.
  • Generic shrink plan ≠ supported XFS shrink operation.

Quick reference

XFS administration:

mkfs.xfs -L data /dev/vg/data
xfs_info /data
xfs_growfs /data                     # grow online (cannot shrink)
xfs_repair -n /dev/vg/data           # check, unmounted
xfs_repair /dev/vg/data
xfs_db -r -c 'frag -f' /dev/vg/data
xfs_fsr /data                        # online defrag
xfs_quota -x -c 'report -h' /data
xfsdump / xfsrestore                 # native backup tools

Repair refuses with a dirty log: mount once to replay it; xfs_repair -L discards the log and may lose recent metadata — last resort. XFS supports reflinks (cp --reflink) on filesystems created with reflink=1 (default on recent mkfs).

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. XFS evidence shows filesystem state and supported resize behavior, not lower block health or application data semantics.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. XFS owns XFS allocation groups, log, repair/grow semantics and its non-shrink planning boundary. LVM owns LV sizing below it.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in Filesystems & Mounting → XFS. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.kernel.org/filesystems/index.html · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
xfs filesystem linuxxfs growxfs repairxfs cannot shrink
Embedded reference data

Quick lookup tables

XFS operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for XFS.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateXFS is a high-performance journaling filesystem built around allocation groups and metadata B+trees; it supports online growth but not general filesystem shrinking, which materially affects storage-resize planning.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin host + incident/change time → capture block topology and stable identities → validate partition/device metadata → validate filesystem identity/integrity and effective mount namespace/options → validate PV/VG/LV/device-mapper state where used → make one controlled change at the first failed boundary → re-read effective storage state → repeat original workload I/O/acceptance test.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainbacking device/LV → XFS superblock + allocation groups → log/metadata B+trees → VFS mount → file I/O → workloadTrace requested/configured state through effective state to the observed workload result.
Failure boundaryXFS evidence proves filesystem state and supported resize behavior, not lower block health or application data semantics.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux storage evidence can establish this proof path: backing device/LV → XFS superblock + allocation groups → log/metadata B+trees → VFS mount → file I/O → workloadUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove behavior outside the captured device, metadata, mapping, mount or workload scope. XFS evidence proves filesystem state and supported resize behavior, not lower block health or application data semantics.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven boundary: prove backing identity, then on-device metadata, then filesystem/LVM mapping and effective mount/device state, and finally repeat the original workload I/O before any additional storage change.Continue to the next unresolved boundary while preserving the original test condition.

XFS · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryXFS
Topic pathFilesystems & Mounting → XFS
Runtime stateXFS is a high-performance journaling filesystem built around allocation groups and metadata B+trees; it supports online growth but not general filesystem shrinking, which materially affects storage-resize planning.
Fast checks- Capture XFS identity, geometry, backing size and current mount options. - Review kernel XFS corruption, shutdown and log-recovery messages. - Compare filesystem data size with underlying LV/device size before growth. - After changes, verify space reporting and representative workload I/O/latency.
Verification chainbacking device/LV → XFS superblock + allocation groups → log/metadata B+trees → VFS mount → file I/O → workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary.
Failure boundaryXFS evidence proves filesystem state and supported resize behavior, not lower block health or application data semantics. Boundary chain: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?