RAID1 or RAIDZ2

Status
Not open for further replies.

bmcclure937

Contributor
Joined
Jul 13, 2012
Messages
110
I am in the process of building a new FreeNAS and have been researching the best storage option for my needs.

My old FreeNAS 0.7.x box is running a 4x1TB RAIDZ1 pool. I understand that RAIDZ1 is frowned upon with larger HDDs. It seems that the options that would fit my needs and also follow community recommendations on my new FreeNAS. These options are listed below:
  1. RAID 1 (ZFS mirror) with 2 x 5TB WD Red drives
  2. RAIDZ2 with 4 x 3TB WD Red drives
I do not want to spend over $400 and am hoping to find deals on the 5TB WD Red to hopefully spend around $350... if I go the route of RAID1.

What are the advantages of RAIDZ2 over RAID 1? It seems I can get similar storage capacity for the price by configuring a RAID1 with 2 x 5TB drives. If I used RAIDZ2 and have 4 drives then I will get roughly 4.8GB usable space with the drives I have listed above.

If I do choose RAID1 then I have further research that needs completed to learn more about adding drives to the pool down the road if I would like to expand storage, etc. My chassis will be a Lenovo TS140 so choosing the larger drives also allows to only take 2 of the drive bays and have room for expansion later.

I appreciate all of your thoughts and input on this topic. As stated, I intend to do more research just do not have the time right this instant.


Thank You!
 

Fuganater

Patron
Joined
Sep 28, 2015
Messages
477
If you care about your data, use RAIDZ2.

If you don't care if you lose your data, use RAIDZ1.

You could also do stripped mirrors.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If you don't care if you lose your data, use RAIDZ1.
He wasn't asking about RAIDZ1. He was asking about mirrors, but calling them RAID1.
 

bmcclure937

Contributor
Joined
Jul 13, 2012
Messages
110
If you care about your data, use RAIDZ2.

If you don't care if you lose your data, use RAIDZ1.

You could also do stripped mirrors.

Please read carefully, I stated RAID1 (ZFS mirror). I also explained that it would have 2 x 5TB HDD, which is not a feasible configuration for RAIDZ1. I understand that RAIDZ1 is not recommended. I am curious about RAID1 (mirror) vs. RAIDZ2.

He wasn't asking about RAIDZ1. He was asking about mirrors, but calling them RAID1.

Exactly, do you have any thoughts about this? I am still researching but it seems RAID1 (mirror) would be best approach. If I want to add more storage to pool down the road I can add another RAID1 mirror vdev to the pool for more storage.
 

Fuganater

Patron
Joined
Sep 28, 2015
Messages
477
Please stop calling it RAID1. That does not exist in FreeNAS hence the confusion. I figured you forgot the Z.

Mirrors are faster so if you are going to have any VM's using FreeNAS for storage, the performance will be much better than RAIDZ2. Since you have such a small chassis and only supports 4 drives? I would do a 2 disk mirror. That way you can buy 2 more down the line and expand your volume.
 

bmcclure937

Contributor
Joined
Jul 13, 2012
Messages
110
Please stop calling it RAID1. That does not exist in FreeNAS hence the confusion. I figured you forgot the Z.

Mirrors are faster so if you are going to have any VM's using FreeNAS for storage, the performance will be much better than RAIDZ2. Since you have such a small chassis and only supports 4 drives? I would do a 2 disk mirror. That way you can buy 2 more down the line and expand your volume.

Sorry to cause confusion. Getting back into the swing of things and learning the proper terminology. Catching up on the FreeNAS Manual, FreeBSD forums, and the great Slideshow post. I meant to ask about ZFS Mirror compared to RAIDZ2.

I agree with your approach. Think I will do a 2 disk mirror and then still have room to expand down the road by adding another mirror. Will not be running any VMs but this will provide some redundancy at least.
 

Fuganater

Patron
Joined
Sep 28, 2015
Messages
477
If you can expand your budget $60 you can get 2x 6TB drives (HGST and WD Red). They are on sale again for $229.
 

bmcclure937

Contributor
Joined
Jul 13, 2012
Messages
110
If you can expand your budget $60 you can get 2x 6TB drives (HGST and WD Red). They are on sale again for $229.

Do folks like the HGST or WD Reds better?
 

Fuganater

Patron
Joined
Sep 28, 2015
Messages
477
Same same. It's all personal pference.

Sent from my SM-T700 using Tapatalk
 

alexg

Contributor
Joined
Nov 29, 2013
Messages
197
Mirror does not protect against bit rot. That is one of the important features of ZFS. If you are setting up home use system with tested backup strategy and not worried about how long it takes to restore , RAIDZ1 in my opinion is sufficient. Search these forums for an explanation of what can happen with Raidz1 during resilvering.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Mirror do protect against bit rot.

Even with striped drives ZFS will detect corruption (it'll not be able to correct it however).
 

alexg

Contributor
Joined
Nov 29, 2013
Messages
197
The important part is that there's a chance of recovering with raidz even though probability of resilvering failure are high with raidz1 and larger disks.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
With mirrors too, it's even safer than a RAID-Z1 usually.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Mirror does not protect against bit rot.
@Bidule0hm has already corrected you on this, but I'm curious where this idea came from, or what thought process led you to this conclusion. Unless you explicitly turn checksumming off, ZFS will always know about bit rot, and if ZFS knows a block is corrupt, it will try to correct it from another clean copy. In a mirrored configuration, there's a second identical copy, so unless there's a bad sector in the exact same place of the other drive, ZFS will have a clean copy to not only serve the correct data, but also correct the bit rot on the first disk. And again:
The important part is that there's a chance of recovering with raidz
Given the context of this thread, it sounds as though you think this distinguishes RAIDZ from a ZFS mirror, i.e., that there's no chance of recovering (from bit rot or from a disk failure) with a mirror, while there is with RAIDZ. Is this your belief? And if so, why? Because it's also incorrect.
 

alexg

Contributor
Joined
Nov 29, 2013
Messages
197
I stand corrected. My bad
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Basically mirrors can have a problem compared to RAID-Z2. Specifically, if you have bit rot on
disk 0, and disk 1 fails completely, that file is GONE. Of course, you should have monthly or
twice a month scrubs setup to detect bit rot. And hopefully correct it before the other mirror dies.

That said, under some un-usual conditions, people use 3 way mirrors. That's good for read heavy
work loads. And would protect against a single disk failure with a second disk having bit rot.

RAID-Z2 also has 2 levels of redundancy, so it can over come the same problem: Failure of one
disk and a second disk with bit rot, yet data is still available.
 
Last edited:

Scharbag

Guru
Joined
Feb 1, 2012
Messages
620
I also think as you continue to expand your pool with additional vDevs, RaidZ2 becomes more reliable statistically. This is because a RaidZ2 vDev can always tolerate up to 2 failed disks. This might never apply in your case.

Example:

RaidZ2 pool made up of 3 6 drive vDevs will tolerate any 2 drive failures and can tolerate up to 6 drive failures (that would cause me to worry, a lot...). The interesting thing is that a resilver will take some time but will read "some" information from every good drive in the degraded vDev. During this time, another drive failure can be tolerated without data loss. I have resilvered my production pool many times due to drive failures (Seagate ST3000DM0001 garbage...) and have never had another failure during a resilver.

ZFS mirror of same size would be 12 vDevs with 2 drives each. This array "could" tolerate up to 12 failed drives BUT, if 2 drives in any one vDev fail, the entire pool is lost. In this case, a resilver will read, at 100% capacity, the only remaining drive in the vDev. If it fails during the rebuild, the whole pool is lost.

There are some magical statistical things that can be calculated to show the survivability based on drive failures between what is effectively Raid10 and Raid60 (less math has been posted on ZFS types). This is also affected by the RaidZ2 vDev arrangement and I am sure that at some point, the RaidZ2 vDev is statistically more prone to failure than a mirrored pool if you do not follow the ZFS vDev recommendations. Math is fun.

Regardless, if I were you, I would build 2 mirrored pools made of 2 drive vDevs. One pool is production, one pool is backup. That way, you can sustain 75% drive failure without losing any of your data.

The most important thing to understand is that mirroring and RAID is not for data protection, it is for data availability. Backups are for data protection. As has been posted many times, RAID is not a replacement for backup. I know it sucks to have to spend money on backup drives. But hey, if you really want to protect your data, you need a backup solution.

Cheers,
 

Fuganater

Patron
Joined
Sep 28, 2015
Messages
477
The most important thing to understand is that mirroring and RAID is not for data protection, it is for data availability. Backups are for data protection. As has been posted many times, RAID is not a replacement for backup. I know it sucks to have to spend money on backup drives. But hey, if you really want to protect your data, you need a backup solution.
Cheers,

I have to disagree about this. Having some type of RAID is absolutely essential for data protection and data integrity. Yes RAID and backups are 2 different things but without any type of RAID setup, your data is not protected against many things. Having a backup only adds and additional layer of protection to your data.
 

Scharbag

Guru
Joined
Feb 1, 2012
Messages
620
I have to disagree about this. Having some type of RAID is absolutely essential for data protection and data integrity. Yes RAID and backups are 2 different things but without any type of RAID setup, your data is not protected against many things. Having a backup only adds and additional layer of protection to your data.
ZFS does offer advantages for data integrity which is a very good point. This, imho, still relates to availability as even if no raid was used, and there were properly managed backups, then bit rot can be recovered from.

My comments are more directed to the audience to the ensure that raid is not used in lieu of a backup strategy.

Cheers,
 
Status
Not open for further replies.
Top