× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: Readynas RAID 5 "protection" clarification

sg86
Aspirant

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 fresh.

 

Finally getting to the question, I would like to utilise the new 8TB drive, so I'm trying to decide if I should buy 1 more 8TB drive and then replace the 2 x 2TB, or buy two more 4TB drives for the same cost, and have all the drives the same capacity.

 

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?

 

Should I go for the 4 x 4TB and RAID 10 option then instead? My main concern/usage is protection of data, but all of my reading says that RAID 5/6 is the safest option, but I don't see how if only 4TB is protection according to the calculator?

 

Thanks!

Model: RN2120v2|Readynas 2120v2 1U 4-Bay Diskless
Message 1 of 13

Accepted Solutions
StephenB
Guru

Re: Readynas RAID 5 "protection" clarification


@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

  1. 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.
  2. 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 

  1. reconstruct the first RAID group. 
  2. 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.

View solution in original post

Message 3 of 13

All Replies
schumaku
Guru

Re: Readynas RAID 5 "protection" clarification

As X-RAID does use a "special" scheme with the three disks of 2T+2T+8T - it's certainly not RAID5 (distributing data two at least two plus one for parity) ... more something like a (RAID0)+RAID1 from (2T+2T)+8T so there is about 4T of your storage blocks unused, as there can't be any RAID redundancy (misleadingly designated "protection").

 

Netgear does spread some confusing information with this: "X-RAID® dynamically changes raid RAID1 for 1 - 2 drives. RAID5 for 3 - 6 drives. RAID6 for 7+ drives. FLEX-RAID® maintains the RAID type.".  Correct is that they are tuning the "RAID protection" to these modes where similar capacity drives are available, and combining things smart. When you continue and try e.g. 2T+2T+8T+8T ist becomes obvious that a RAID5 scheme won't be effective (and impossible!), ... in a configuration with four drives like 2T+2T+8T+8T they indicate no unused space. So under the hood, they make use of two RAID1, they will do something like RAID0(RAID1+RAID1) like (2T+2T)+(8T+8T) ... any RAID5 scheme would lead to even more overhead, even if combining the two 2T to a 4T "member".

 

With both RAID1 and RAID5 there is a redundancy ("protection") of one drive, with RAID1 it's an exact block copy over two units, with RAID5 it's two blocks plus one parity block over three [or more] units.

 

Play a little bit more with the similator - with smaller and much larger drives, and you will see...

 

 

Message 2 of 13
StephenB
Guru

Re: Readynas RAID 5 "protection" clarification


@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

  1. 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.
  2. 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 

  1. reconstruct the first RAID group. 
  2. 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.

Message 3 of 13
sg86
Aspirant

Re: Readynas RAID 5 "protection" clarification

Thanks for both of the great answers.

I did understand the difference between RAID types just didn't understand how X-RAID grouped the different drive sizes so that's really useful thanks.

I do intend to backup as well going forward.

With everything being said then and assuming I do actually understand! I think it would be more than enough to buy two new 4Tb drives, starting from scratch (00 the other two drives), and letting the readynas setup as raid 5 which will give me 12TB of space and then I have two 2TB drives to backup my most important data.

Of course I could buy 3 new 8Tb drives giving me a lot more space, but the cost would be £600 instead of £200.

Please do correct me if I'm wrong.
Message 4 of 13
StephenB
Guru

Re: Readynas RAID 5 "protection" clarification


@sg86 wrote:
 I think it would be more than enough to buy two new 4Tb drives, starting from scratch (00 the other two drives), and letting the readynas setup as raid 5 which will give me 12TB of space and then I have two 2TB drives to backup my most important data.

Of course I could buy 3 new 8Tb drives giving me a lot more space, but the cost would be £600 instead of £200.


Those are the basic options (plus 2x12 TB for £800).

 

You might consider 2x8TB+2x4TB - which cost about £400 and gives you the same space as 3x8TB.  That does of course require multiple RAID groups, but it's pretty cost effective. 

Message 5 of 13
sg86
Aspirant

Re: Readynas RAID 5 "protection" clarification

Yes but having heard what you've said I'm not sure I like the idea of the extra risk, it seems best if the drives are all the same size.

 

The WD Red drives I'm matching up are £100 per 4TB, so I can either buy 2 x 4TB or would have to get 3 x 8TB to match them all up. So 200 or 600 as I said in my previous post.

 

Of course I can mix them but then I may as well just leave it as it is, I'm not gaining anything as I don't need much more space (right now). Whilst I'm wiping and factory resetting the device I just thought it best to plan for the future, and after you've mentioned these multiple RAID groups for some reason I dislike it 😄

 

Message 6 of 13
StephenB
Guru

Re: Readynas RAID 5 "protection" clarification


@sg86 wrote:

Yes but having heard what you've said I'm not sure I like the idea of the extra risk, it seems best if the drives are all the same size.

Well, as I tried to say above the risk is relatively small, and you are going to be protected from the general threat of volume loss by your backup strategy.  

 

But of course it's your call to make, and there is no right or wrong answer.

 

I also recommend getting a UPS to protect the NAS from unclean shutdowns.  You'd get one that includes a USB connection for monitoring.  Then the NAS will detect when the UPS battery is draining, and shut down cleanly before it runs out.  A lot of data loss stories here begin with an unexpected power shutdown.  One factor is that cached writes are lost - which will result in parity blocks getting out of sync with the data blocks. 

Message 7 of 13
sg86
Aspirant

Re: Readynas RAID 5 "protection" clarification

I have a network APC UPS already actually, though I think I need a battery change 🙂

 

In theory I could buy a single 8TB for 200, put the two 4TB and new 8TB in, copy data across from current 8TB backup and then put that in. Really can't make the call! but this would give me 16TB over 12TB, just seems like the other 8TB would be totally wasted

Message 8 of 13
StephenB
Guru

Re: Readynas RAID 5 "protection" clarification


@sg86 wrote:

this would give me 16TB over 12TB, just seems like the other 8TB would be totally wasted


Well, with 2x8+2x4 you need 8 TB of parity blocks - you can't provide protection against single disk loss with less.

Message 9 of 13
sg86
Aspirant

Re: Readynas RAID 5 "protection" clarification

Yes that's why I said 16TB, isn't that right then?

 

As I undertand if use 4 x 4TB I'll only "loose" 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

Message 10 of 13
StephenB
Guru

Re: Readynas RAID 5 "protection" clarification


@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.

 

Message 11 of 13
sg86
Aspirant

Re: Readynas RAID 5 "protection" clarification

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
Message 12 of 13
Steedvlx600
Luminary

Re: Readynas RAID 5 "protection" clarification

Thanks for that detailed explanation. It answered quite a few questions for me.

Message 13 of 13
Top Contributors
Discussion stats
  • 12 replies
  • 2504 views
  • 2 kudos
  • 4 in conversation
Announcements