dual mirror vs z2?

Status
Not open for further replies.

Henry Miller

Cadet
Joined
Dec 29, 2013
Messages
9
I'm working on specing a freeNAS build, and I'm confused about the different RAID levels. I have some data that I'd rather not lose, so I know I want at least two drives redundancy. With the price of 3tb drives I can't see buying anything less (feel free to correct this if I'm wrong), and since I have space left in the 400gb drive in my current computer one ought to be plenty for the near future.

I'm just a small home: only my wife and I will use it. (I expect will die hardware long before any kids are old enough to be a factor)

I see two options:

Three disks, zfs mirrored. Pros is it uses less CPU and has much faster read performance. Cons - I'm not aware of any. If/when I'm running short of disk space I'll just buy 3 more drives and pop them in. If I'm still short - well the original drives are probably due for replacement anyway, so just upgrade them one at a time.

Five disks, zfs-z2 (If I read right 5 is a sweet spot - I'm willing to buy up to 7 drives if there is some advantage - but I don't want to waste money). Cons: more CPU used on write (insignificant), need to buy more drives upfront, slower reads if a disk fails, more disks so a failure is more likely. Pros: I'm not aware of any.

Obviously I'm leaning to the mirror configuration, but from reading the forums it looks like nearly everyone ends up with z2 in the long run after the real world downsides of the alternatives get them. Is there anything I'm missing here because I'm not seeing them.
 

Henry Miller

Cadet
Joined
Dec 29, 2013
Messages
9
I should qualify that: raid z2 has the obvious advantage of more disk space now. I don't consider that a pro because I don't see how I would use the extra in the near term, by the time I need it I expect the cost of larger drives (sizes that don't even exist today!) will be affordable. Thus upgrading existing pools seems like the cost effective long term solution to my space needs.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
6 is the sweet spot. Considering all combinations of up to 7 drives your "safest" is a RAIDZ3 of 7 disks. Most people would consider it overkill. It just depends on how important your data is.

Second best choice for safety is a 6 disk RAIDZ2. I consider this to be the optimal trade between available disk space, performance, and reliability. I'd choose this unless you want to be overly cautious(at which point I'd go to the one above).

Slower reads if a disk fails doesn't exist for ZFS. If you are building a reasonable server by following the recommendations in the forum stickies even a RAIDZ3 will be just fine for home use in the performance area. Your limitation WILL be your Gb LAN.
 

Henry Miller

Cadet
Joined
Dec 29, 2013
Messages
9
I'm still confused, why would I choose z2 over just a simple mirror with 3 disks. Seems to me either way I get protection from two disk failures, and the cost of 3 drives is less than the cost of 6. Of course with the z2 I get 4x the space, but I don't see myself actually using it. (and if I do want it latter big disks will be even cheaper). Saving money is always good, but if there is some reason to go with more I will do it.

I'm pretty much sticking to the recomended hardware (server grade parts, plenty of ECC ram). Everything seems easy until I try to figure out disks. (No surprise as this is where everyone's needs differ)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm still confused, why would I choose z2 over just a simple mirror with 3 disks. Seems to me either way I get protection from two disk failures, and the cost of 3 drives is less than the cost of 6.

With mirrors you get protection from only 1 disk per vdev(total of 3 if you are VERY lucky).

RAIDZ2 protects you from any 2 disk failures.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
With mirrors you get protection from only 1 disk per vdev(total of 3 if you are VERY lucky).

RAIDZ2 protects you from any 2 disk failures.
As I understand the OP, he only needs the capacity of only one drive. He has no need for several vdevs.
 

Michael Wulff Nielsen

Contributor
Joined
Oct 3, 2013
Messages
182
If that is the case then he could run raidz2 with 3 drives. But I would still agree with Cyberjock. With Raidz2/3 you pay an upfront cost in "safety drives" and everything else just adds space.

I think the 6 drives in raidz2 is the current sweetspot. Also due to the fact that vdevs can't grow, the OP would have to either destroy his pool and recreate it the future to expand, or be forced to add new "safety drives" to a new vdev.
 

Henry Miller

Cadet
Joined
Dec 29, 2013
Messages
9
Yes, my belief is the space of one drive is more than enough. However I want real safety, thus the idea of having 3 disks mirroring each other. (I've read the raid-5 is dead link, and I don't see why the same logic wouldn't apply to a simple mirror)

I know I can't grow a vdev, but I can grow the entire pool by adding a second vdev, which is what really matters. Obvioulsy if I know I need the space z2 makes sense since 6 drives gives 4 drives of capacity, while my plan gives only 2 drives of capacity at the same price. (or 4 drives z2 gives 2 drives of capacity for less money) Since I don't believe I need the extra space, and historicly drive sizes have increased: it seems likely that by the time I'm out of space the new vdev will use larger drives and thus my total space would be more than if I bought them all now and used z2!

I've been going back and forth on mirror/z2. I know once I have my system running there are things I cannot easially change. I don't want to make a dangeriously wrong decision, but I'm willing to make a decision that on hindsight wasn't correct so long as I'm not doing stupid things with my data.
 

Michael Wulff Nielsen

Contributor
Joined
Oct 3, 2013
Messages
182
Your data will be safe in both raidz2 or raidz3. So you don't do anything stupid imho. But Since you are already paying for 2 spare drives you might as well buy a few more and get a lot more space cheap. :)
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
zfs does let you mirror more than two disks, and it is a very good option if sheer space is not your primary goal. you will get very good performance out of mirrored disks, better than raidz/2/3 in several ways. if you expand a 3 disk mirror with another 3 disk mirror vdev then you get striping between the vdevs for even more speed.

most of the people here are after maximizing space so there is a lot of bias towards raidz. mirrors are infrequently seen here but are a simple and reliable technology.

the raid5 is dead logic applies as op suggested.

basically op seems to have done thorough homework but may be distressed by the possibilities.

the only likely mistake i see would be if you failed to predict growth of storage requirements. otherwise... i'd say you know what you are doing and why, which are good signs for a successful deployment.
 

scurrier

Patron
Joined
Jan 2, 2014
Messages
297
With mirrors you get protection from only 1 disk per vdev(total of 3 if you are VERY lucky).

RAIDZ2 protects you from any 2 disk failures.

As I understand the OP, he only needs the capacity of only one drive. He has no need for several vdevs.


Just for complete clarity, I'll ask the stupid question: A single 3 disk mirror can withstand any 2 drives failing. Right? RIGHT? I believe it is so, but cyberjock's reply (as a respected member of the community) has me wanting to verify.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Yep. 3 disk mirrored vdev will basically be functional if any disk in the vdev is functional. :)

But, most people won't consider 3 disk mirrors as that's a 66% loss of disk space.
 

Henry Miller

Cadet
Joined
Dec 29, 2013
Messages
9
To follow up, I eventually decided to go with 6 disks and z2. I'm sure this will last me for several years.
 
Status
Not open for further replies.
Top