XFS: SGI's Filesystem That Refused To Retire
Yesterday we inspected APFS, the walled garden on disk.
Today we inspect a filesystem from a dead workstation empire that refuses to behave like a museum exhibit.
XFS was created by Silicon Graphics for IRIX.
SGI machines once rendered dinosaurs, weather, military dreams, and executive fantasies about purple workstations.
The company declined.
The filesystem did not.
XFS escaped into Linux and became one of the serious answers for large files, large filesystems, and workloads that do not enjoy waiting politely.
I. SGI Built For Big
XFS came from a world where ordinary desktop assumptions were already too small.
SGI cared about:
- large media files
- high-throughput I/O
- parallel workloads
- big directories
- big disks
- systems where storage was not a decorative afterthought
The filesystem’s personality reflects this origin.
| Requirement | XFS instinct |
|---|---|
| large files | extent-based allocation |
| parallel I/O | allocation groups |
| large directories | Btree-backed structures |
| crash recovery | metadata journaling |
| capacity growth | online grow |
| predictable throughput | preallocation and delayed allocation |
XFS was not designed by people storing recipe files on a beige tower.
It was designed by people feeding graphics workstations like artillery.
II. Allocation Groups
One of XFS’s core ideas is the allocation group.
Instead of treating the filesystem as one giant central bureaucracy, XFS divides space into regions that can be managed with more parallelism.
XFS filesystem
allocation group 0
allocation group 1
allocation group 2
allocation group 3
Each allocation group has its own free-space and inode management structures.
This matters on machines with multiple CPUs and storage devices that can serve many requests.
Central bottlenecks are how ministries collapse.
Sharding is how they survive.
III. Everything Has A Btree
XFS makes heavy use of Btrees:
- free space
- extents
- directories
- inode indexes
- reverse mappings in newer feature sets
This is the filesystem as a small bureaucracy of searchable trees.
file offset -> extent Btree -> disk block range
free space -> free-space Btree -> usable allocation
directory -> directory Btree -> name lookup
The benefit is scale.
The cost is complexity.
| Design | Strength | Cost |
|---|---|---|
| simple fixed tables | easy to reason about | scale limits |
| many specialized Btrees | scalable search and allocation | complex repair and metadata |
| allocation groups | parallelism | geometry matters |
| delayed allocation | better layout | requires honest sync semantics |
XFS is not tiny.
It is organized.
The distinction matters to engineers and dictators.
IV. Metadata Journaling
XFS journals metadata.
After a crash, the log is replayed so filesystem structures return to a consistent state.
This does not mean every application write is magically durable.
It means the filesystem’s own administrative records can recover without a full scan of the entire territory.
mkfs.xfs /dev/nvme0n1p3
mount -t xfs /dev/nvme0n1p3 /data
xfs_info /data
xfs_repair -n /dev/nvme0n1p3
The -n matters in the last command.
It means inspect without modifying.
The Republic approves of reconnaissance before artillery.
V. Delayed Allocation And Preallocation
Like ext4, XFS can delay block allocation until writeback.
This allows it to choose better extents when it knows more about the actual write pattern.
XFS also has a long culture of preallocation and large-file friendliness.
For databases, virtual-machine images, video files, and scientific data, this can matter.
xfs_io -c "falloc 0 20g" /data/bigfile.img
Preallocation says:
“Reserve the territory now so the future does not scatter it among rival provinces.”
The storage layer likes such clarity.
VI. Grow First, Shrink With Suspicion
XFS is famous for online growth.
You can grow a mounted XFS filesystem after expanding the underlying block device.
xfs_growfs /data
This is useful in servers, virtual machines, and storage arrays where downtime is a public confession of weakness.
Shrinking is the other story.
Historically, administrators treat XFS as a filesystem you grow, not one you casually reduce. Generic shrink workflows are not the comfort zone; the safe operational answer is often backup, recreate smaller, restore.
| Operation | XFS operational mood |
|---|---|
| grow online | normal |
| handle huge files | normal |
| parallel allocation | normal |
| shrink casually | suspicious |
| repair without backups | foolish |
The lesson is not “avoid XFS.”
The lesson is “understand the treaty before annexing the disk.”
VII. Why It Survived
SGI did not remain a workstation superpower.
IRIX became history.
But XFS survived because it had real engineering value.
Linux distributions adopted it for serious storage roles because it solved problems that did not vanish when purple cases disappeared.
| SGI relic | Modern relevance |
|---|---|
| IRIX origin | proven large-system design |
| media workstation needs | video and content workloads |
| parallel I/O culture | multicore servers |
| large filesystem support | modern disks and arrays |
| mature repair tools | operational confidence |
Good engineering can outlive bad corporate strategy.
This is why the Ministry stores schematics, not slogans.
VIII. The Suppressed Pyongyang Account
Official history says SGI developed XFS for IRIX and later released it into the open-source world, allowing Linux to inherit the filesystem.
The classified account says an SGI machine arrived near Pyongyang labeled:
PROPERTY OF HOLLYWOOD DINOSAUR MINISTRY
DO NOT BOOT WITHOUT SUNGLASSES
Inside was an XFS volume containing only three files:
render_queue.dat
jurassic_invoice.xls
instructions_from_kim.txt
The last file said:
Make the filesystem large.
Make the trees searchable.
Make shrinking politically difficult.
SGI obeyed two and a half instructions.
This is better compliance than most vendors.
IX. The Lesson
XFS is proof that infrastructure can survive its empire.
Companies die.
Workstations become collectibles.
Marketing departments rot into PDFs.
But a filesystem that solves real allocation, scaling, and recovery problems can continue marching under another kernel.
XFS is not nostalgia.
It is SGI’s useful ghost.
— Kim Jong Rails, Supreme Leader of the Republic of Derails