NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
sg86
May 28, 2019Aspirant
Readynas RAID 5 "protection" clarification
Hi, So I currently have this setup in X-RAID (Raid 5): 2TB | 2TB | 4TB | 4TB A total capacity of 8TB. So I have purchased an 8TB disk to back this up, as I want to wipe drives and start a fr...
- May 28, 2019
sg86 wrote:
Can someone let me know if there are any advantages of having the drives all the same size, as the capacity calculator (https://rdconfigurator.netgear.com/raid/index.html) is confusing me a little. It says that X-RAID will give me a 12TB capacity, but only 4TB is protected, so if I have 8TB used I will lose 4TB of data?
I think you are confused on how RAID protection actually works.
The short answer is that your system is protected against the loss of any single disk. So you normally won't lose any data if any of your disks fail or need to be replaced.
I say "normally" because RAID protection isn't bullet proof, and there are failure modes for the NAS and the disks that can result in data loss even with RAID. You need a backup strategy that backs up the NAS to a different device in order to protect your data. Purchasing USB drives for backup is usually the most cost effective option. Personally I back up my NAS to other ReadyNAS.
If your 8 TB drive is an internal disk, then it won't give you more protection if you put install it into the NAS. If you have 2x8+2x4TB you'd get more capacity, but not more protection. The capacity rule for XRAID is "sum the disks and subtract the largest".
More details follow...
sg86 wrote:
but I don't see how if only 4TB is protection according to the calculator?
You are confused because you are thinking the "protection" is a copied data block. With RAID-1 it is a copy. But it isn't with RAID-5.
So let's start with "vanilla" RAID-5 - assuming 4x4TB. You'd have a 12 TB volume and 4 TB of RAID parity blocks for protection. These parity blocks are evenly distributed across all your disks.
The idea is that RAID organizes the disks so that three data blocks (each on different disks) has an associated parity block (on the remaining disk). Let's call the data blocks A,B,C and the parity block P. The partity block is computed from A,B,C. The computation is done using the exclusive or function (A xor B xor C), but you can think of it as addition for my purpose.
So if
P=A+B+C
then
A=B+C-P B=A+C-P C=A+B-P
Since all these blocks are on different disks, then if one disk is replaced, then all the blocks on it can be reconstructed using the 4 formulas above. This works in routine cases, but there are some caveats:
- The formulas can only be applied if there is only one disk missing. If a second disk is removed or fails, then the system can't reconstruct any of the disks.
- The formulas can only be applied if the system can figure out what disk is missing (or was replaced).
- The formulas only work if the partity block was properly written in the first place. That is, P needs to be A+B+C before the disk failed or was removed.
FWIW, one reason for using xor instead of addition is that all four of these formulas end up being the same.
P=A xor B xor C A=B xor C xor P B=A xor C xor P C=A xor B xor P
sg86 wrote:
Can someone let me know if there are any advantages of having the drives all the same size,
First let's explain how XRAID handles mixed disk sizes, and then circle back to your question. We'll use your current configuration of 2x4TB+2x2TB.
Your system actually has 2 RAID groups. You can think of these as "layers". Each group has it's own protection, and the two groups are joined together into your data volume.
If you look at your 4 TB disks, you'll see two data partitions of about 2 TB each. The 2 TB disks have only one data partition. Note there are a couple of small system partitions (the operating system is also on the disks) that I am ignoring.
One group covers all 4 disks - it uses the first 2 TB data partition on the 4TB drives, and the only data partition on the 2 TB drives. That group uses RAID 5 for protection.
The second group covers the two 4 TB disks, using the second data partition on each of those drives. It uses RAID-1 for protection.
If you were to upgrade one of the 2 TB disks to 4 TB, then the system would
- reconstruct the first RAID group. That is, each block in the first data partition of the replacement disk would be reconstructed using the formulas above.
- convert the second RAID group from RAID-1 (2 disks) to RAID-5 (3 disks). That adds 2 TB of capacity to this RAID group
If you were to upgrade the last disk, then the system would
- reconstruct the first RAID group.
- reorganize the second RAID-5 group (3 disks) to RAID-5 (4 disks). That adds 2 TB of capacity to this RAID group
At this point, the system still has 2 RAID groups, even though the disks are all the same size.
Now if you did a factory default, the system would reformat the drives and start fresh. You'd end up with only 1 data partition on each disk (4 TB in size), so you'd have a single RAID group using RAID-5.
sg86 wrote:
Can someone let me know if there are any advantages of having the drives all the same size,
Ok, lets get back to this.
If you build the system with disks that are all the same, and never increase the size, you will end up with a simple RAID-5 organization with a single RAID group.
If you use mixed sizes (expanding the array), then you end up with multiple RAID groups that are joined together.
The multiple RAID groups are a bit more fragile - if something goes wrong with any one of them (and sometimes it does), then the volume can't be properly assembled. So the chance of losing your data goes up a bit, and the odds of successful data recovery go down a bit. Personally that's a risk I take - the convenience of vertical expansion outweighs this extra risk.
And even if you only have a single RAID group, there is still some risk that you will lose data as a result of a failure.
So the best practice here is to maintain good backups - assuming that your NAS might fail at any time, and that the failure might result in losing the data. Then you won't lose anything when something bad happens.
sg86 wrote:
Should I go for the 4 x 4TB and RAID 10 option then instead?
RAID-10 is a bit faster than RAID-6, but RAID-6 offers a bit more protection. In both cases, your ability to expand the system later is more limited (and the steps can be more complicated).
Overall my recommendation is to stick with XRAID, but implement a backup plan to protect your data.
StephenB
May 28, 2019Guru - Experienced User
sg86 wrote:
As I undertand if use 4 x 4TB I'll only "lose" 4TB of space, seems cleaner to me that's all, but I'll be 4TB down on overall space but with the lesser risk and lesser cost wasted it seems best
Well, I don't really buy the argument that the parity blocks are "wasted" space. I think that's too simplistic.
If we ignore the mixed size part of it for a moment:
- 7x2TB gives you a 12 TB volume with 2 TB of parity.
- 3x6TB also gives you 12 TB volume, but needs 6 TB of parity
- 2x12TB gives you 12 TB but needs 12 TB of mirroring.
I don't think relatively small 2 TB parity means that 7x2TB RAID-5 is better than the other choices. I think the odds of disk failure goes up with the number of disks - at least in my experience big disks are just as reliable as smaller ones. So the odds of volume loss also goes up with more disks. And although 2x12TB "wastes" the most space, it also has the best odds for data recovery.
I tend to look at initial cost and future upgrade options first, and not worry about parity block usage. That leads me to suggest that most users of 4 bay+ systems should try to leave at least one bay empty initially to make the first expansion less expensive.
With the choices above, I'll personally go with 3x6TB. Setup cost (about $560 USD) is the same as 7x2TB, and I think it will be more reliable. Horizontal expansion is also cheaper, since cost/TB is higher for 2 TB drive than it is for a 6 TB one. 2x12TB is around $730 USD - I won't quarrel with someone who takes that option, but I think it's pricey.
Your case is a bit different as far as the economics go, because you already have two 4 TB and one 8 TB drives in hand.
sg86
May 28, 2019Aspirant
Yes as you say I have a lot of drives floating around already, and these are all WD Red NAS drives so makes sense to keep them all the same spec (read something about same brands working best together)
I went ahead and order 2 x 4TB as this only cost £200, I can use the 8TB as a main backup and then if I run out of space in the future I can pickup another 8TB and stick two in there.
Thanks for all the advice, just wiping drives now and I'll have 4 fresh 4TB drives going in within a few days!
Think I will do a factory reset while I'm here and start a compete fresh
I went ahead and order 2 x 4TB as this only cost £200, I can use the 8TB as a main backup and then if I run out of space in the future I can pickup another 8TB and stick two in there.
Thanks for all the advice, just wiping drives now and I'll have 4 fresh 4TB drives going in within a few days!
Think I will do a factory reset while I'm here and start a compete fresh
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!