
This post is a translation of the Spanish original.
XRAID: XFS brings parity RAID inside and looks at SMR drives
Up to 20 times faster than mdraid at writing. That's the figure accompanying XRAID in every headline, and I admit it's what made me click first. But the more I read, the less the number mattered to me and the more the design behind it did.
What XRAID is
XRAID is a declustered parity RAID implementation that lives inside XFS, not underneath as a separate layer. It's been published by Christoph Hellwig, a name closely tied to storage in the kernel, after about 18 months of work, and it's focused on Zoned XFS. Its two stated goals are to support parity RAID on zoned devices such as SMR drives and to have a fast RAID without the data-integrity problems that classic parity RAID carries.
The trick is that XRAID doesn't try to protect everything equally. Parity is applied only to file data, which is where it works efficiently, and metadata redundancy is left to what already exists, for example a mirror with MD RAID. On top of that it builds logical zones from the drives' physical zones. For now it supports between zero and two parities, with more planned, and comes with an xfsprogs branch that adds mkfs support and a new utility called xraid.
The fine print
Before getting excited it's worth reading what Hellwig himself makes clear:
- It's experimental and he himself says it isn't ready to be submitted to the mainline kernel.
- The performance figures come from his initial tests, compared against mdraid. I haven't seen independent benchmarks.
- Optimising for SSDs hasn't been a priority, although it also works with conventional drives and SSDs.
- There's no confirmed way to convert an existing XFS to XRAID.
In other words, this isn't something to put into production or your home NAS next week.
Why I think it's the right idea
I've been watching homelab people avoid SMR drives as if they were radioactive for a while. And rightly so: putting an SMR drive in a traditional RAID can end in endless rebuilds and crawling writes. The underlying problem is that classic parity RAID rewrites blocks in place, and an SMR drive hates exactly that. XRAID starts from the other end: if the filesystem already writes sequentially by zones, the RAID can take advantage of it instead of fighting it.
My position is clear. A filesystem knowing what it's protecting is better than having a blind block layer underneath. It's the same lesson ZFS and Btrfs already taught us, and I think it's good that XFS applies it in its own way instead of giving up on parity RAID as impossible.
I also see the best counter-argument. mdraid is boring, and in systems boring is a virtue: it's been in production for decades, everyone knows it and when it fails you know where to look. Putting parity inside the filesystem means an XRAID failure is an XFS failure, and the toolbox for recovering data doesn't exist yet. Plus, that 20x is the best case measured by the author himself against a single reference.
From the systems side, what interests me most is the separation between data and metadata. Protecting metadata with a mirror and data with parity is a sensible balance: what leaves the volume useless if it gets corrupted is duplicated, and what takes up almost all the space gets parity. I haven't tried it yet and I won't on anything I care about until there's serious public review on the kernel lists.
I'm left with a question: if in a couple of years XRAID gets into mainline and works as promised, will we look again at cheap high-capacity SMR drives as a reasonable option for home storage, or has the reputational damage already been done?


