Extending mirror pool

d3zmodos

Dabbler
Joined
Apr 4, 2020
Messages
10
Hi

I have an existing setup with a pool of 2x4TB drives and I'm looking to add some additional storage so I got another pair of 2x4TB drives. The original drives are WD Reds (~2yrs old) and the new ones are WD Red Pros (mostly to avoid the SMR models).
The question now is how I should go about extending it and in what arrangement. The docs are very helpful in listing options and I've gone through the ZFS primer so I feel like I have at least a basic understanding of the tech that I'm dealing with here. However I'm uncertain about what a "vdev" encompasses exactly and how it relates to pool extensions.

My understanding is that when you create a new pool (lets take my example of a 2-drive mirror), it creates a virtual device (hence the name) that has ~4TB capacity and behind the scenes is mirroring writes to the two drives.
If I open the UI and go to the page for extending my existing pool, it claims that current available capacity is at ~500GB (I'm undesirably close to the 90%-usage-mark, hence the new drives) and if I add the two new drives the available capacity goes to ~4.5TB. This is expected but the question is what the arrangement of that capacity will be.

Just from reading the docs and making some guesses, here is what I expect will happen: A new vdev will be created that contains the two new drives and that those will be mirrored. It will then effectively append that storage to the existing pool such that the existing data remains where it is on the original drives, but new writes will/can happen to the new drives. Is that accurate?

In this situation, if one of the drives fails then the vdev that contains it will be marked as faulted but the other vdev will still have the data. I can just replace the failed drive, resilver to copy the data from the remaining mirror and then we're good to go. However if the failed drive is one of the original ones then with the above configuration, all of the reads for the resilver will come from the other original drive, which at this point would be significantly more likely to fail than one of the new drives (by virtue of being older, coming from the same batch, etc).

So instead what I think I would prefer is to have two vdevs each with one of the original drives and one of the new drives. With that setup, I believe I would need to have a failure in both an old and a new drive before I'd lose data (which I would expect to be much less likely). Does this seem sensible or have I missed something obvious here?

If the above is all correct then I expect the best way to get there would be to replace one of the drives on the existing pool with one of the new drives, let it resilver, and then extend that mirrored pool with the now-unused old drive and the remaining new drive (which would then form a mirror pair). Would that result in the configuration described above? I believe I'd be able to verify this after the fact with just a `zpool status` but given that I had other questions I thought it made sense to ask you guys before I spend hours on unnecessary resilvers :)
 
Top