Raid choice, the benefits the down side

AllenB

Cadet
Joined
Feb 7, 2022
Messages
4
I currently mirror two 4tb drives in my data pool. I have two new 4tb drives I want to add to it, but read on here that there would multiple datasets and this was bad somehow. They suggest starting from scratch so there would be just one. Since this is fresh install I don't have a problem just starting over but I'd like to know the ups and downs of using raid2. Would I have 8tb storage with 3 drives keeping the 4th as a backup? Could I have 12 TB storage with 4? How much do you have to reserve for parity? Is my data better protected from possible drive failure? Is there another Raid level that is better? I only have an I-3 with 8gb of Ram, by the way.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I have two new 4tb drives I want to add to it, but read on here that there would multiple datasets and this was bad somehow.
Two vdevs, not datasets. And that isn't a bad thing, but it does mean that you'll be using half of the total storage for redundancy. If you don't mind destroying the pool and recreating it, you could build it as RAIDZ1 (only one disk's redundancy, but more storage available) or RAIDZ2 (two disks' redundancy, same amount of available storage).
 

AllenB

Cadet
Joined
Feb 7, 2022
Messages
4
Thanks, I'll try that. I like idea of not losing over half my storage.
 

AllenB

Cadet
Joined
Feb 7, 2022
Messages
4
I went with Raidz1 and after copying all my media onto it I have about 8tb space left over.
 

anderstn

Dabbler
Joined
Oct 2, 2017
Messages
41
Weather you use z1 or z2 (which has the same functional requirements, benefits and risks as Raid5 or Raid6) depends mostly on what risk you are willing to take. Performance wise the difference is mostly that z2 can provide slightly better read speed while being slightly more taxing on your CPU. Both setups are geared towards redundancy in favor of high performance IO or speed. In both cases the biggest risk driver for a complete array failure is the time delay before a failed drive can be replaced and the size of your individual disks.

With z1 you can lose one drive. If you have 3-4 drives of average size and can replace the failed drive quickly that's probably an ok level of risk. However if you have a week of delay before your failed drive can be replaced or if all your disks are big, as in 8 TB+ range, it might be worth looking at z2 The reason for this is because the time spent to rebuild your array increases with disk size. Hence even if you replace a single big disk quickly the chance that a second drive may fail while an array is rebuilt increases as the process takes longer to finish. Similarly if you stick with z1 but scale up to say 8 drives, even if the drives themselves are small, then you also increase the risk of a critical failure because there are twice as many points of failure present while you are waiting for your replacement drive and/or rebuilding the array.

It's worth noting that you can run both of these setups with a spare drive present that automatically takes over for a failed drive. However this only removes the delivery time component from the risk equation. Also there are horror stories of people who have had spare drives present on a numerous z1 array, as in many disks, only to have the spare and another drive fail as the raid is being rebuilt. You should set up SMART tests (both short and long ones) on the spare as well as the raid disks and check the SMART data to mitigate this risk, but even then you can be unlucky. Rebuilding the array taxes disks more than your long smart test does and can trigger a drive failure that SMART was unable to predict. Hence why you often wan't to go to z2 first and then add a spare if you still find the risk to be unacceptable or have a configuration that's in-between the next natural array setup with respect to the number of disks used.

One minor disclaimer here. While I have used Freenas/Truenas for a couple of years now I am not an expert on the system. That said I have used Raid for several years prior both on my own equipment and at work and the general principle behind array sizes and redundancy has remained pretty much the same for a long time. The only real difference being that solutions like Truenas and cheaper and better disks for regular consumers have made it much more viable for us :)
 
Last edited:

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
z1 or z2 (a.k.a. Raid5 or Raid6)

Definitely NOT known as RAID5 or RAID6. Despite a superficial similarity, they are technologically very different. There are explanatory links in the Terminology and Abbreviations Primer.

Both setups are geared towards redundancy in favor of high performance IO or speed.

Neither RAIDZ1 nor RAIDZ2 excel at high performance or speed. Rather, they are optimized for large sequential file storage, such as archive files, ISO, or media files.

you can run both of these setups with a spare drive present that automatically takes over for a failed drive.

The only time this makes sense is if you have a single spare and multiple RAIDZ vdevs. If you have a single RAIDZ1 vdev with a spare, you are better off making it a RAIDZ2 vdev from the beginning. Having a single spare to cover several vdevs does make sense however.
 

anderstn

Dabbler
Joined
Oct 2, 2017
Messages
41
Definitely NOT known as RAID5 or RAID6. Despite a superficial similarity, they are technologically very different. There are explanatory links in the Terminology and Abbreviations Primer.
The implementation differs. The functional requirements and thus potential risks for the end user remain the same. I have made that more clear now.

Neither RAIDZ1 nor RAIDZ2 excel at high performance or speed. Rather, they are optimized for large sequential file storage, such as archive files, ISO, or media files.
I never claimed otherwise. What I wrote was "Both setups are geared towards redundancy in favor of high performance IO or speed."

The only time this makes sense is if you have a single spare and multiple RAIDZ vdevs. If you have a single RAIDZ1 vdev with a spare, you are better off making it a RAIDZ2 vdev from the beginning. Having a single spare to cover several vdevs does make sense however.
Which is essentially what I said as well "...you often wan't to go to z2 first and then add a spare if you still find the risk to be unacceptable or have a configuration that's in-between the next natural array setup with respect to the number of disks used"
 

AllenB

Cadet
Joined
Feb 7, 2022
Messages
4
I just thought of some more questions. So is it better to have the spare drive plugged into the NAS ready to take over or can it sit on my shelf? I have 4 identical 4tb drives, how do you tell which one is the failed drive? Is there something to tell you what Sata Port it's plugged into? Is there some way for Truenas to alert me over the network to one of my windows machines that a drive is failing?
 
Top