Introducing ZFS AnyRaid, Sponsored by Eshtek
At the beginning of this year, we made the decision to invest a substantial chunk of capital to support an open source project for which we have great personal interest. ZFS AnyRaid will give users the ability to mix different sized drives in a pool, a highly-requested feature since our launch. Just this week, Klara, Inc. announced the details of this project on the ZFS Leadership call. The project is still in heavy development but this week’s announcement puts everyone on notice that this is coming. The rest of this post will focus on more of the technical aspects of this solution as well as the phases for development. And for those that want to see the video where this announcement was made, look no further:
https://www.youtube.com/watch?v=MifloJFCpLU
What’s different about ZFS AnyRaid?
In traditional ZFS RAID-Z the usable space of a group of disks in a pool is limited by the size of the smallest disk. For example, if you mix 2x3TB and 2x5TB disks it will be the same as having 4x3TB disks. In addition, if you upgrade one of those 3TB disks to 5TB, you’re still limited to 4x3TB disks. AnyRaid will change those rules by enabling much better flexibility than traditional ZFS methods. Long story short: you’ll be able to mix up those disks and get better usable capacity than you would have before.
Pool Layouts & Usable Space Comparisons
With ZFS AnyRaid, we will see at least two new layouts added: AnyRaid-Mirror and AnyRaid-Z1. The AnyRaid-Mirror feature will come first, and will allow users to have a pool of more than two disks of varying sizes while ensuring all data is written to two different disks. The AnyRaid-Z1 feature will apply the same concepts of ZFS RAID-Z1, but while supporting mixed size disks. Let’s take a more mixed up scenario of 1x4TB, 2x6TB, and 1x8TB drive and compare usable space between traditional and AnyRaid pool types:
Mirror: 10TB Usable Space
AnyRaid-mirror: 12TB Usable Space
RAID-Z1: 12TB Usable Space
AnyRaid-RAID-Z1: 16TB Usable Space
Partial Upgrades & Usable Capacity
Another benefit to ZFS AnyRaid is the impact that replacing smaller devices with larger ones, or adding additional disks will have on usable space. Let’s imagine adding another 4TB disk to the configuration in the previous example. What does that do to the usable space for each mode?
Mirror: 10TB Usable Space
AnyRaid-mirror: 14TB Usable Space
RAID-Z1: 16TB Usable Space
AnyRaid-RAID-Z1: 18.5TB Usable Space
ZFS AnyRaid Project Phases
There are 4 primary goals to accomplish in phase 1 of this project:
Indirection Map
Mechanism to distribute data across the mixed size member disks dynamically to achieve high storage efficiency for added disks
Mirror Parity
Chunk are written to N member disks to provide resiliency
Layout and Performance Optimization
Optimize dynamic layout to avoid orphaned space
Implement VDEV Expansion
Handle the addition of new disks and make the additional space available for use in the pool
In phase 2, the team aims to add RAID-Z support as well.
Timeframe
The logical question everyone wants to know is when this feature will make it to HexOS. The reality is that it is too premature at this point to make any commitment yet, but as the project progresses and hits key milestones, we will keep you updated. And once we have a more solid estimate of inclusion in HexOS, you all will be the first to know.
Credits & Acknowledgments
A special thanks goes out to Allan Jude, Paul Dagnelie, and Igor Ostapenko for their work to bring this major new feature to OpenZFS!