Expanding ZFS Storage with More Drives

I know there are plenty of threads about this subject, but I am curious about one detail.

I am running ElectricEel-24.10.2 and I have updated the ZFS storage pool to the latest version. By all accounts I believe my system can support expanding drives based on what I read in the release notes a while back.

I am running a 1 x RAIDZ2 | 6 wide array. One of the drives is actually in the process of failing smart, so I will be replacing it soon. I was considering adding a new drive.

Now onto my question, I believe somewhere in my reading I read that the way expanding the storage works is you if you want to add a new drive you would add 2 drives as a vdev and then it gets added to the total pool. Its recommended to do 2 drives so that if that new drive fails the data on that vdev isn’t lost completely. Obviously this is not cost effective because I have to buy 2 drives vs 1. I was wondering if there was a way to add the drive to the existing RAIDZ2 array and leverage the failover from there rather than buying two disks?

I could completely be misunderstanding wrong, I don’t have a spare drive to confirm yet, so I wanted to get an understanding of how expanding storage works now on the latest version of Scale.

Thank you in advance!

Ignoring your current, failing HD. You would expand your 6 wide Raid-Z2 to a 7 wide Raid-Z2 in the same VDEV. That’s using the Raid-Z expansion feature. The other way to make the pool larger would be to add another 6 wide Raid-Z2 VDEV.

If you didn’t require everything to be all on Raid-Z2, you could create another pool, VDEV structure, like a two pair mirror, and redistribute your data between the pools as wanted. I don’t have a link for how the Raid-Z expansion works but the following explains it from before

I don’t think anyone’s recommended that. It doesn’t really make sense.

The redundancy protection does not change after the creation of the original vdev.

A RAIDZ1 vdev will always protect against 1 drive failing.

A RAIDZ2 vdev will always protect against 2 drives failing.

A RAIDZ3 vdev will always protect against 3 drives failing.

When you wish to “expand” a RAIDZ2 vdev with an additional drive, it is still able to withstand two drives failing in the vdev before the expansion completes.

This has nothing to do with replacing a failed drive, in which the vdev is now only able to withstand one drive failure before the replacement process succeeds.

Don’t try to tackle both at the same time. Deal with the failing drive first, and then decide on expansion later.

2 Likes