Fact check myself on recent/near future ZFS and TrueNAS developments

haowenl

Dabbler
Joined
Feb 1, 2024
Messages
10
I'm a newbie in the TrueNAS world, and I would like to fact-check (idiot-proof) myself on some recent and near future features.

1. ZFS 2.1.0 and TrueNAS Cobia brings dRAID to the picture. According to ZFS dRAID docs, I got the impression that it has faster resilvering while maintaining roughly the same level of redundancy and performance as RAIDz. In that case, if I'm setting up a new system, is there any reason to go for RAIDz1 instead of dRAID1?
2. I'm currently setting my vdev and pool with the next 2 years of storage need in mind. That said, in two years, I might need to add one or two new drives to the dRAID1/RAIDz1 vdev. I see that the ability to expand a RAIDz vdev with more disks has been merged into ZFS master although not yet released. Given the current ZFS and TrueNAS release schedule (ZFS release schedule is what I'm not sure about), is it a reasonable expectation that the feature would land in TrueNAS in two years (Q1 of 2026)? To rephrase it, what's the chance for that feature to land in the next two releases, if not the very next release, of TrueNAS?
3. Related to both 1 and 2, I understand that the vdev expansion commit clearly says "raidz expansion", does it work with/apply to dRAID as well? I see changes to `vdev_draid.c` in that patch, so I'm assuming it works with both dRAID and RAIDz. Is that a correct interpretation?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
In that case, if I'm setting up a new system, is there any reason to go for RAIDz1 instead of dRAID1?
Unless you have a ton of disks (meaning at least two vdevs' worth) DRAID is strictly worse than RAIDZ, because it imposes limitations not found in RAIDZ, most notably all stripes are full width, so space efficiency will suffer with small files, to the point that a dedicated Special vdev is recommended if you go with DRAID. You also get no benefits in a single vdev.

Related to both 1 and 2, I understand that the vdev expansion commit clearly says "raidz expansion", does it work with/apply to dRAID as well? I see changes to `vdev_draid.c` in that patch, so I'm assuming it works with both dRAID and RAIDz. Is that a correct interpretation?
No, there is currently no public work on DRAID expansion.
 

haowenl

Dabbler
Joined
Feb 1, 2024
Messages
10
Unless you have a ton of disks (meaning at least two vdevs' worth) DRAID is strictly worse than RAIDZ, because it imposes limitations not found in RAIDZ, most notably all stripes are full width, so space efficiency will suffer with small files, to the point that a dedicated Special vdev is recommended if you go with DRAID. You also get no benefits in a single vdev.
Ahh, apparently I misunderstood what the docs are intending to say. Thank you so much for clarifying!

Related to both 1 and 2, I understand that the vdev expansion commit clearly says "raidz expansion", does it work with/apply to dRAID as well? I see changes to `vdev_draid.c` in that patch, so I'm assuming it works with both dRAID and RAIDz. Is that a correct interpretation?
I see! Another reason to not go for DRAID then!

As for being able to expand RAIDZ, is 2026 Q1 a reasonable expected date for it to be available? I know having the patch landed on ZFS master is a good sign, but I also notice that commits on master can take a bit to land in a release. I also understand that it takes a little bit more for TrueNAS to incorporate and support a new feature made available in ZFS upstream.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Yes, it is reasonable to think RAID-Zx expansion will be available in TrueNAS SCALE 2 years from now. BUT, TrueNAS Core, (based on FreeBSD), may NOT have RAID-Zx expansion. This is because SCALE is receiving the most changes, including GUI changes, at the moment. And Core is mostly getting stability and bug fixes.

Basically until iX makes hard, firm statements, (which on this subject they can't), it still remains guesswork and projections.


One other comment, including for others reading this thread about dRAID. The resilver improvement ONLY works because dRAID integrates hot spare disk(s). These hot spare disks are virtual, meaning the space is actually spread out across all the disks. Not a dedicated disk like RAID-Zx or ZFS Mirroring. That means dRAID gets the use of most of the hot spare disk as data, improving performance. At least until the spare space is needed.

By spreading out the hot spare disk space across all the disks in a dRAID vDev, when resilver time comes, their is no "hot" disk for writing like a regular hot spare. (Regular hot spare disks become a bottle neck during resilvers because ALL writes have to be done to it.)
 
Last edited:

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
One slight change. It appears RAID-Zx expansion will come to the ZFS code in both SCALE & Core before the end of 2024, (in SCALE version 24.10?). SCALE may or may not have the middleware & GUI changes available in that release. That is not known.

Next, Core is likely to get the same ZFS code release before the end of the year, as SCALE, though after SCALE shows it is reliable. However, Core may not ever get middleware & GUI changes to support RAID-Zx expansion. The reason for the ZFS update is to get any bug fixes and maintain ZFS compatibility between Core & SCALE.


The reason I say this about RAID-Zx expansion, is that iX is trying to get ZFS Fast De-Dup code in before the end of the year 2024. That code is expected, (note my wording, expected, not hard fact), to be merged into ZFS after RAID-Zx expansion code. Thus, a twofer as far as TrueNAS is concerned.

Last, just because RAID-Zx expansion, (or Fast De-Dup), is included, does not mean ultra data conservative people would want to use either feature right away. Some of us would wait for the first bug fix, or even several releases after, before trying such new features.
 

haowenl

Dabbler
Joined
Feb 1, 2024
Messages
10
Ah, thank you for the update, and bringing Fast De-Dup into the context here! Then if my estimation is any good, in 2026 or late 2025, RAIDz expansion would have already endured the testing of several versions. I'm planning to upgrade from a 2-mirror into a 5-wide RAIDz2 by:
  1. Set up 3-wide RAIDz2 alongside my 2-mirror
  2. Copy over data
  3. Kill the 2-mirror
  4. Expand from 3-wide RAIDz2 into 5-wide
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Not sure if you can create a 3 disk RAID-Z2... With the RAID-Zx expansion, it makes a bit of sense. (It is not possible to add RAID-Zx parity level...) But today, having 1 data disk and 2 parity disks, makes zero sense... so the GUI may prevent that.

However, you may be able to make a degraded 4 disk RAID-Z2. You'd have only 1 disk of parity until you have the data copied completely over and able to put in one of the Mirror disks as a replacement of the degraded "fake" disk. But, building a degraded RAID-Zx vDev is a bit advanced, and in general we discourage people who can't do it on their own. (Because if you can't do it on your own, without lots of questions, you may make a mistake, and loose all your data...) However, you have 1 to 2 years to research and even test out making a degraded RAID-Z2 vDev.


Note, when I say "parity disk", I mean logical amount of storage. ZFS RAID-Zx does not use fixed parity disks.
 

haowenl

Dabbler
Joined
Feb 1, 2024
Messages
10
Looks like I got homework to do lol. But I feel like, for whatever my novice opinions are worth, 3 disk RAID-Z2 starts to make sense when RAIDz can be expanded. The UI should still warn it, saying something like "By proceeding you understand that this is not meant to be a permeant storage setup but as a transitional state." or something. Idk, and this is probably a better discussion after RAIDz expansion is actually a thing in TrueNAS.
 
Top