ZFS 3 disk ZFS mirror

Hi,

let's assume I have 3 hard drives:
ada1 - 1TB
ada2 - 2TB
ada3 - 3TB

I was wondering if it's possible to stripe ada1 and ada2 to 3TB and create a mirror with ada3.

Thanks
 
If you stripe ada1 and ada2 you'll create a new virtual disk, which, I assume, you could use for mirroring with ada3. But I'm not sure about the performance as the virtual disk will be faster than ada3.

I would instead consider splitting ada3 in two partitions and create a 2TB mirror from ada2 and the first partition of ada3 and a second mirror consisting of ada1 and the second partition of ada3.
 
Last edited by a moderator:
In theory, you could use gconcat(8) to create a virtual disk using ada1 and ada2, then use that virtual disk in ZFS as half of the mirror vdev with ada3.

Then, down the road, you could replace the virtual disk with a real 3 TB drive and resilver the ZFS pool. :)
 
If you stripe ada1 and ada2 you'll create a new virtual disk, which, I assume, you could use for mirroring with ada3.
That should work. I've never tried it, but there are some ZFS documents around that show how to do multi-level RAID.

But I'm not sure about the performance as the virtual disk will be faster than ada3.
Think of it from a balance point of view: the 3T disk is exactly half the capacity. Assuming that the IO rate is uniformly distributed over the capacity, half the IOs will be hitting that one 3T disk. If we then assume that the 1T and 2T disk together are no slower than the 3T disk, then the 3T disk will be the bottleneck. And in reality, most disks are the same speed independent of capacity (they can all do roughly 70-100 IOps and 150-200 MB/sec), so the 1T and 2T disk together will be significantly faster than the 3T.

Once you admit that the 3T disk is the bottleneck, life gets easy: Any way you slice it, you will get the same performance, so just keep it simple.

I would instead consider splitting ada3 in two partitions and create a 2TB mirror from ada2 and the first partition of ada3 and a second mirror consisting of ada1 and the second partition of ada3.
That would work too, but then you have to separate ZFS vdevs. In theory, you might be able to use them for different purposes. In practice, that's too hard. Instead you have to stripe them together (which is easy), and the performance will once again be the same as above. Six of one, half dozen of the other.
 
Back
Top