RAIDZ Expansion feature discussion #15232
Replies: 36 comments 156 replies
-
|
So to summarize that: Afaik, a copy command will rewrite the data with the new width after expansion. I think I saw a script sloshing around that basically does that for an entire array, cleaning up after itself. Does it file by file for space reasons. Takes a minute, but, you know. Only have to do it once. From my perspective that’s plenty good enough. Raid expansion is a niche feature, if much beloved by that niche. Adjusting width is then a niche within the niche. Handling that with a community script sounds like an entirely reasonable thing to do. Permissions and paths stay as is, filenames stay, last accessed and creation date changes and width changes. To explain the niche comments: I am part of that niche. Home user but without the funds to start at full width. I did a poor man’s raid expansion eventually, from 5 to 8. So the niche are people who start at a smaller width than they know they’ll need, and will only run one vdev. By definition home users, and then only a fraction of those. The niche within the niche are users where rewriting archival data makes an appreciable difference, or that care even though it doesn’t. That need not be handled in the file system. Handling it with good UX outside seems great. Setups that use ZFS like TrueNAS and Proxmox could even integrate such a script into their UI. |
Beta Was this translation helpful? Give feedback.
-
|
This script, with caveats (read the readme), helps automate rewriting your data by copying/pasting/deleting/moving at the filesystem level. |
Beta Was this translation helpful? Give feedback.
-
|
@Dulanic you can’t removed a raidz vdev from a pool. Mirror vdevs only (single disk vdev is special case of mirror) can be removed. You may be able to create a new pool with your 18TB drives, copy data over, then expand that. This really depends on how much you’re using already though. This is why a lot of home users stick with one vdev, lest they are “stuck” with two to manage. I have one 8x8 raidz2 which will likely last me forever. But in case it ever doesn’t, I intend to replace drives as they fail with larger-capacity ones. Once the last drive has been replaced, I’ll have more space. |
Beta Was this translation helpful? Give feedback.
-
|
My current take on this, the stripe-width expansion seems less of an urgent issue than the fact it only adds one drive at a time. |
Beta Was this translation helpful? Give feedback.
-
|
Is RAIDZ "contraction" support included in this PR? 🤔 |
Beta Was this translation helpful? Give feedback.
-
|
To @farkeytron: Discussion is here, not in the PR. IxSystems is paying for this work, so it’ll definitely come into TrueNAS. SCALE first likely, since that is where canary features land, then Core in due time. |
Beta Was this translation helpful? Give feedback.
-
Hah, I take you don't follow the issue tracking on github too carefully, then. The amount of issues I see with the encryption support (and not just performance problems, but like, swallowed my data or corrupted it on a replication ones) has made me pretty hesitant to recommend ZFS's native encryption support for anyone. |
Beta Was this translation helpful? Give feedback.
-
|
@don-brady @ahrens Thank you SO much for getting the ZFS expansion PR across the line. It'll likely be a key capability of ZFS from here on (in the next release onwards of course). 😄 |
Beta Was this translation helpful? Give feedback.
-
|
is the expansion option for all setups including stripe? |
Beta Was this translation helpful? Give feedback.
-
|
Quick question: if I update to zfs master and enable corresponding feature flag for raidz expansion, will it be active or enabled after expansion completes? Thus, can I downgrade to stable branch after that or there will be some incompatibilities in on disk layout and I'm limited to master branch after that until the next stable release. |
Beta Was this translation helpful? Give feedback.
-
|
A couple of days ago @mmatuska updated OpenZFS in FreeBSD main, including RAIDZ Expansion. You can try this out with the next set of 15-CURRENT snapshot images. |
Beta Was this translation helpful? Give feedback.
-
|
I tried to read through the DOCS here but still not sure if I can extend my 2-disk VDEV ( only option to create was a mirror ) Can this be expanded with a 3rd disk as RAIDZ-1 ? |
Beta Was this translation helpful? Give feedback.
-
|
This is arriving at a really good moment for me, I was about to expand a 4-disk raidz2 into a 6-disk by the old method (create an entirely new pool then So I must ask:
TIA! |
Beta Was this translation helpful? Give feedback.
-
|
How does expand address fragmentation, if my cap is under 50% does the end result remove most/all fragmentation? What if my capacity is over 50%, does the end result in more fragmentation then before? |
Beta Was this translation helpful? Give feedback.
-
|
I'm considering upgrading the disks in my system with something faster, and add an extra disk in the process. So let's say I first add the extra disk and let ZFS expand the pool, then swap out the pre-existing disks one by one (or perhaps connect the faster one alongside) and let it resilver each time. Would the resulting pool have the updated data-parity ratio? I would assume so since eventually all disks would have newly written data, but because it happened in response to a resilver it may not take the earlier expansion (fully) into account? As in: disk X is pretty much copied bit-for-bit to replacement disk X, resulting in the same original ratio (only that disk has to be rebuilt so there's no (re)balancing of data-parity). I don't think there's enough room to connect all the new disks alongside the original ones and just send it over. :DD |
Beta Was this translation helpful? Give feedback.
-
|
Would it be possible to use a similar approach to implement RAIDZ Shrinking. So if less space is used we can remove a disk permanently without losing parity? |
Beta Was this translation helpful? Give feedback.
-
|
My understanding is that after an expansion, old data remains on the old logical stripe width and only new data gets the benefit of larger logical stripes. Is that still correct with this feature now being released? If yes, is there a way to convert old data to use the new, larger stripe? |
Beta Was this translation helpful? Give feedback.
-
|
Does this use scratch space on a full pool and only at the beginning or can that happen again due to a pool being filled partway through the reflow? If it can't be used later, then is there anything that limits pool use to stop normal pool writes from happening at a rate that could consume the space the reflow needs? |
Beta Was this translation helpful? Give feedback.
-
|
I have a rather dumb, but likely vaild question: What happens if a disk dies during the expansion progress? Is the expanding progress considered an unsafe timespan, during which none of the disks should fail or are we safe all the time? 😁 |
Beta Was this translation helpful? Give feedback.
-
|
Is miscalculated available storage after expansion still an issue? If not I think this is something that needs some attention. Thoughts? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
in an old video Matt Ahrens mentions the need to reconstruct corrupted data from a drive failing before expansion when reading it after 1 or more expansions. Is the added "combinatorial reconstruction" performed or needed after a successful scrub. or is that additional step only performed 1 time? |
Beta Was this translation helpful? Give feedback.
-
|
Few questions:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Any idea about when 2.3.0 will reach debian bookworm-backports? |
Beta Was this translation helpful? Give feedback.
-
|
I am unable to attach new disks to my RAIDZ1. I'm running Ubuntu 24.04, but added the ZFS 2.3 PPA and upgraded ZFS. I enabled the feature flag for raidz_expansion. I applied the change to the pool. For good measure I rebooted. But I still get this message when attempting to attach a new disk. Let me know if you need any additional information. Here is my full zpool feature list. |
Beta Was this translation helpful? Give feedback.
-
|
hi, I would like to know why the expansion result in a much less total spaces.
after the expansion, the I was expecting that the total spaces should be about 42TiB, but in the end I only got 28TiB. I assume it's abnormal but I don't know what to do. Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
|
Hello every body, Small question, I have an zpool created in 2.0 zfs version, this one was upgraded to 2.3 package and zpool upgrade -a. I need to do another action before adding a new disk in my vdev ? Many thanks in advance for your answer :) Regards |
Beta Was this translation helpful? Give feedback.
-
|
Im currently expanding a 4-disk zraid-1 pool on Linux to 5 disks. I however notice extreme spikes in memory doing so. From one second to the other from 64 GB to 128GB (Which is my max ram), which triggers the Linux OOM Killing or freezes the system entirely. Even with a limited ARC of 24 GB (and just having around 50 GB actually in use). I reduced now ARC to even 18GB and scaled down some VMs and enabled SWAP on an nvme, which seemed to help a lot. Did someone also experience that? And are there ways around that? Whats really surprising is the enormous sudden spikes. |
Beta Was this translation helpful? Give feedback.
-
|
Hi Denis,
Watching closely for the responses to this (haven't used raidz expansion
yet, but I was planning to in the near-future -- and besides the "free/used
space numbers going astray" issue, this looks like is another potential
problem with raidz expansion, and probably even worse for me, since my
largest reliable machine -- with ECC RAM -- only has 64GB RAM).
A couple of tips:
1) have you searched the Github issues for OpenZFS? (
https://github.com/openzfs/zfs/issues)? if there are any open issues, you
can then add a comment mentioning you're also seeing it, and if there's
none, you can then open it so the devs will be aware of the issue (many of
them don't read this list, at least no assiduously).
2) It would help if you gave us more details, like OS/Distro/Version,
machine architecture especially re: storage, output from `zpool status`, if
`dmesg` or syslog shows anything, etc.
And a couple of questions/comments:
On Mon, Dec 1, 2025 at 8:05 AM Denis Arnst ***@***.***> wrote:
Im currently expanding a 4-disk zraid-1 pool on Linux to 5 disks.
I however notice extreme spikes in memory doing so. From one second to the
other from 64 GB to 128GB (Which is my max ram), which triggers the Linux
OOM Killing or freezes the system entirely.
"freezes entirely" meaning "eventually unfreezes itself and continues after
X minutes/hours/days" or "freezes entirely" as in "freezes forever and
needs a reboot to get the machine back up"?
Even with a limited ARC of 24 GB (and just having around 50 GB actually in
use). I reduced now ARC to even 18GB and scaled down some VMs and enabled
SWAP on an nvme, which seemed to help a lot.
Good tip on the NVMe SWAP, could be a viable workaround for my case (will
just have to buy another, larger NVMe since the one in the machine is
currently fully in use).
Did someone also experience that? And are there ways around that? Whats
really surprising is the enormous sudden spikes.
Also very interested in hearing from other folks experiencing raidz
expansion issues (this or any other).
Cheers,
--
Durval.
… —
Reply to this email directly, view it on GitHub
<#15232 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJHXRVWJJP6U6WVQEERJ3D37QOFFAVCNFSM6AAAAAA4HOSFKSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMJSGMZDSMA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is carrying on from PR #15022, so we don't crowd the PR out with general discussion traffic. 😄
Beta Was this translation helpful? Give feedback.
All reactions