Solved

Calculating RAID 5 - Storage Space

Posted on 2011-03-14
40
1,019 Views
Last Modified: 2012-05-11
How do you calculate the storage space available for RAID 5.

Assuming 5 disks are used. Each disk is 250GB.

How do you calculate the disk space available for data storage and the disk space utilized for parity storage?

What is the formula?
0
Comment
Question by:ben1211
  • 13
  • 9
  • 8
  • +4
40 Comments
 
LVL 14

Expert Comment

by:DonConsolio
Comment Utility
Basically ist's

C [single Disk Capacity] * (  N [number of disks] - P [number of parity disks, usually 1] - H [number of hot spare disks, usully 0 or 1]  )
0
 
LVL 7

Expert Comment

by:takenoco
Comment Utility
Data capacity is reduced due to the parity data blocks. In practice the capacity of the array is based on the following equation where n is the number of drives and z is the capacity:

(n-1)z = Array Capacity
0
 
LVL 7

Expert Comment

by:Mdragga
Comment Utility
There are a variety of free RAID Calculators that a Google search brings up.

Per Wikipedia

Therefore, the usable capacity of a RAID 5 array is (N-1) x S(min) , where N is the total number of drives in the array and S(min) is the capacity of the smallest drive in the array.

Your setup would offer 1TB of space or approx 930 GB of real space.
0
 

Author Comment

by:ben1211
Comment Utility
Guys, I'm sorry...I can't understand the formula. Getting confused with H number of hot spare disks.

Using my example of RAID 5 and having 5 disks, each of 250GB, could you show me how this formula works with my example please?
0
 
LVL 7

Expert Comment

by:takenoco
Comment Utility
(5-1)250GB = 1TB available space...
0
 
LVL 32

Expert Comment

by:PowerEdgeTech
Comment Utility
Regardless of how many disks you use, ONE disk's worth of space will be used for parity.  5-disk RAID 5 =  4 disks' worth of space, or ~1TB.  (After the math, you'd end up with around 940GB of usable space in Windows.)
0
 

Expert Comment

by:kenwest3
Comment Utility
You always lose 1 disk for parity
if you use 4 disks at 100 gb per disk then you really have 3 disks @ 100 GB
or 300 GB RAID 5 Array
0
 
LVL 14

Expert Comment

by:DonConsolio
Comment Utility
- most RAID5 settings use 1 disk for parity (i.e. you lose the capacity of 1 disk)
- some advances RAID settings use 1 disk as spare (stand-by) disk
(if one disk fails the hot spare takes it's place without need for human intervention, the RAID
system can return to a redundant state without immediately swapping the failed disk)
0
 
LVL 32

Expert Comment

by:PowerEdgeTech
Comment Utility
Note in donconsolios' comment "RAID 5 uses 1 disk for parity" that it doesn't use one of the disks for parity and the others for data ... it uses "distributed parity", meaning the parity bits AND data are written/spread out across all the disks, but you end up losing one disk's WORTH of space to the parity.

Yes, a hot-spare will cost you another disk's worth of space, as will a RAID 6.
0
 

Author Comment

by:ben1211
Comment Utility
How does the hot spare disk come into play with this calculation.

Assuming I want RAID 5, and each disk is 250GB of space. And if I want one hot spare disk.

How will the calculation be then?
0
 
LVL 14

Accepted Solution

by:
DonConsolio earned 72 total points
Comment Utility
> Assuming I want RAID 5, and each disk is 250GB of space. And if I want one hot spare disk.

example (if your RAID system supports spare disks)
C [single Disk Capacity] = 250GB
N [number of disks]  = 5
P [number of parity disks] = 1
H [number of hot spare disks] = 1

Formula: C * ( N - P - H )
250GB * ( 5 - 1 - 1 ) = 250GB * 3 = 750GB available for data
0
 
LVL 32

Expert Comment

by:PowerEdgeTech
Comment Utility
If you had a hot-spare, then 4-disks would be in the RAID 5, giving you 3 disks' worth of space (~750GB).  If one of the four disks fail, then the hot-spare would automatically begin to rebuild to take the failed drive's place.

0
 
LVL 16

Expert Comment

by:Gerald Connolly
Comment Utility
RAID-6 (4D+2P) would be a better bet than RAID-5 + HS assuming you have a decent RAID controller that can do it.

0
 
LVL 32

Expert Comment

by:PowerEdgeTech
Comment Utility
RAID 6 would give you the same amount of useful space as a RAID 5 with a hot-spare, the only difference being that all the drives are actively participating in the array.  You don't have to wait for the hot-spare to rebuild, because essentially it already is there protecting your array - you can lose up to two drives in a RAID 6 (1 drive in a RAID 5).
0
 

Author Comment

by:ben1211
Comment Utility
What is Raid 6?
0
 
LVL 16

Expert Comment

by:Gerald Connolly
Comment Utility
RAID-6 is similar to RAID-5 except it uses two different Parity "disks", that means it can sustain the failure of 2 disks rather than the 1 of RAID-5.

See the explanation of RAID levels on wikipedia http://en.wikipedia.org/wiki/Standard_RAID_levels

If you use RAID-5 and you lose one disk, your data is at risk (from a second drive failure) until the replacement/hot spare is fully synchronised and with the size of todays disks this could be some considerable time.

Its a small risk, but unacceptable to many. RAID-6's ability to sustain the loss of 2 disks means that this risk is now removed, and the risk of losing 3 disks simultaneous is a tiny and generally acceptable risk, although there will always be some who still find this unacceptable.
0
 

Author Comment

by:ben1211
Comment Utility
With RAID 5, I know I should have a minimum of 3 disks, and with 1 hot spare disk, that would total 4 disk.

With RAID 6, what is the minimum number of disks needed? 3?
0
 
LVL 16

Expert Comment

by:Gerald Connolly
Comment Utility
Yes its still 3, Think of RAID-6 as RAID-5 plus another parity

With RAID-6 you shouldn't need a Hot Spare
0
 

Author Comment

by:ben1211
Comment Utility
connollyg with RAID-6 you don't need a hot spare? why not? Can I still have hot spare disks? 2 hot spare disks since RAID 6 can sustain the loss of two hard disks?

so how many disks would i need in this scenario?
0
 
LVL 32

Assisted Solution

by:PowerEdgeTech
PowerEdgeTech earned 213 total points
Comment Utility
Minimum number of disks for a RAID 6 is 4.  You do not generally need a hot spare, because with a RAID 6 it is as if your "hot-spare" is already actively participating in the array.

If you have a RAID 5 with a hot-spare and a disk dies, then the hot-spare automatically starts to rebuild to take the failed drive's place.  But in the several-hour-space of time that the hot-spare is rebuilding, if another of the online drives fail, then your entire array goes offline with all your data.

If you have a RAID 6 and a disk dies, then the array can still lose another disk and be ok while you are getting a drive in the system and rebuilt to replace the failed drive.  You could also have a hot-spare with a RAID 6 for additional protection ... but that then you are using 2 disks' worth of space out of 5 drives ... at some point, it is no longer cost-effective.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:ben1211
Comment Utility
So with RAID 6, the minimum is 4 disks, and should any one of the 4 disks fail, i just pull it out and replace it with another disk and the rebuilding process begins? am i correct? if i am correct, doesn't that sound like a hot spare?
0
 
LVL 32

Assisted Solution

by:PowerEdgeTech
PowerEdgeTech earned 213 total points
Comment Utility
Yes, you are correct, but if you re-read my post you'll see the difference:

In a RAID 5, your system is vulnerable to another disk failure until your hot-spare has completely rebuilt.
In a RAID 6, your system is still protected against another disk failure while your replacement disk rebuilds.

Think of a RAID 6 as a RAID 5 whose "hot-spare" does not need to rebuild to protect the array.
0
 

Author Comment

by:ben1211
Comment Utility
In the example below....5 disks were used, and 1 was always singled out as a parity disk. Assuming I used 6 disks or 7 disks....1 disk will ALWAYS be used as a parity disk, am I correct?

example (if your RAID system supports spare disks)
C [single Disk Capacity] = 250GB
N [number of disks]  = 5
P [number of parity disks] = 1
H [number of hot spare disks] = 1

Formula: C * ( N - P - H )
250GB * ( 5 - 1 - 1 ) = 250GB * 3 = 750GB available for data
0
 
LVL 32

Expert Comment

by:PowerEdgeTech
Comment Utility
That formula is for a RAID 5, where 1 disk's worth is used for parity.  In a RAID 6, two disks' worth of parity are used.  This is the case whether you use the minimum number of disks (3 for RAID 5 or 4 for RAID 6) or if you use 7, 8, or 10 disks.

It is important to note that no "single" disk contains all the parity used for the array.  Called "distributed parity", the parity bits are distributed across all the disks, so it is more accurate to say one disk's worth of space is dedicated to parity than to say one disk is dedicated to parity.
0
 

Author Comment

by:ben1211
Comment Utility
PowerEdgeTech...my apologies, but i couldn't clearly understand your explanation.

The formula above is used ONLY for RAID 5. Am I correct? Assuming I were to use 7 disks for RAID 5, one disk will always be used as a parity disk. Am I correct?

I don't get what you meant by - "In a RAID 6, two disks' worth of parity are used.  This is the case whether you use the minimum number of disks (3 for RAID 5 or 4 for RAID 6) or if you use 7, 8, or 10 disks."

I understand that in RAID 6, two disks worth of parity are used. What do you mean by the rest of the sentence?
0
 
LVL 32

Expert Comment

by:PowerEdgeTech
Comment Utility
If you use four 100GB disks in a RAID 6, two disks' worth of parity are used, so your total storage space would be 200GB.
If you use ten 100GB disks in a RAID 6, two disks' worth of parity are used, so your total storage space would be 800GB.

In a RAID 6, regardless of how many disks you use, two disks' worth of space are reserved for parity.
Same for RAID 5 ... regardless of how many disks you use, one disk's worth of space is reserved for parity.

0
 
LVL 14

Expert Comment

by:DonConsolio
Comment Utility
for RAID6 just use:
P [number of parity disks] = 2
0
 
LVL 16

Expert Comment

by:Gerald Connolly
Comment Utility
Raid 6 min=3!  Dooh! brain-fade.      Min for RAID-5 is 3, Min for RAID-6 is 4

If you have RAID-5 + HS you are protected against a single disk fail, and although the HS rebuild should kick-in immediately, your data is at risk of another disk failure until the rebuild is complete, and because of the size of modern disks they now take a substantial amount of time to rebuild.

With RAID-6 the HS is effectively already integrated into the array, and that is why RAID-6 can sustain the simultaneous failure of 2 disks and would require 3 disk to fail simultaneously, a scenario that is far less likely to happen.

So the big differences between a HS and the second parity disk in RAID-6, is that the Second Parity disk is actively in the array, protecting your data, whereas the HS is just spinning and using power, but NOT contributing to anything (except Global warming)!
0
 

Author Comment

by:ben1211
Comment Utility
connollyg...so you're saying in a RAID 6 - with 6 disks used, 2 disks are used for parity. Only one is a HS and is not used as a parity disk but basically sitting there idle?

For all the RAIDs available, how do I find out how many parity disks are used for each RAID.

For example, now I know RAID 5 (minimum 3 disks) and 1 disk is used for Parity. And can I have an additional disk for HS? Will the HS disk be part of the usable storage space?

PowerEdge...you mentioned "In a RAID 6, regardless of how many disks you use, two disks' worth of space are reserved for parity.
Same for RAID 5 ... regardless of how many disks you use, one disk's worth of space is reserved for parity."


Sao RAID 6 has 2 parity disks. Raid 1 has 1 parity disk. What about the HS disk? Why am I getting so confused???

Guys, could you give me a simple example. let's use 5 disks, each 100GB in capacity. Could you give me an example for RAID 5 and RAID 6 with and without a HS disk? Do all RAID's come witih HS disks or is that an option?

0
 
LVL 16

Assisted Solution

by:Gerald Connolly
Gerald Connolly earned 215 total points
Comment Utility
RAID-0 is just a stripe, no parity and no redundancy!  Lose a disk lose the lot!
RAID-1 is a mirror, no parity, but two copies of your data
RAID-5 is a stripe with a single parity
RAID-6 is a stripe with dual parity

Hot sparing is a separate complimentary feature to RAID, its not mandatory and not part of the RAID standard. But can be used with RAID-1, RAID-5 (and RAID-6)

You also need to understand that when we use the term Parity disk for RAID-5 and RAID-6 its not an actual disk as the parity is rotated around the complete set of disks, so if you have 3 disks (1, 2 & 3)  the Data (D) and Parity are spread round a bit like this

 1  2  3
D1 D1 P1
D2 P2 D2
P3 D3 D3

etc etc etc
0
 
LVL 16

Assisted Solution

by:Gerald Connolly
Gerald Connolly earned 215 total points
Comment Utility
5 disks of 100GB

RAID-5

  Without HS
    Data1 Data2 Data3 Data4 Parity       Capacity 400GB

  With HS
    Data1 Data2 Data3 Parity HS            Capacity 300GB

RAID-6

  Without HS
    Data1 Data2 Data3 Parity1 Parity2   Capacity 300GB

  With HS
    Data1 Data2 Parity1 Parity2 HS        Capacity 200GB

NB my comment on what parity really means

0
 

Author Comment

by:ben1211
Comment Utility
connollyg....from your example above for RAID-5.

this means that with a HS disk you actually get less useable hard disk storage?
0
 

Author Comment

by:ben1211
Comment Utility
if you get less useable space having a HS disk, then what actually is the use of the HS disk and not?

Assuming you didn't have a HS hard disk, and one hard disk failed. how then would you resolve  that situation?
0
 

Author Comment

by:ben1211
Comment Utility
Assuming I have RAID 5 WITHOUT a HS, and I were to lose one disk. What do I need to do? Can I just purchase another disk and replace the faulty disk? How do I replace it? Pull it out and fit in the new disk?

Likewise if I have RAID 6 without a HS, and two disks were to fail, how do I replace these two disk witih new disks?

0
 
LVL 32

Assisted Solution

by:PowerEdgeTech
PowerEdgeTech earned 213 total points
Comment Utility
This means that with a HS disk you actually get less useable hard disk storage?

Yes, because it is only standing "ready" for a drive in the array to fail so it can take its place.

If you get less useable space having a HS disk, then what actually is the use of the HS disk and not?

Some systems' priority is to protect the data at all costs ... others' priority is to hold as much information as possible.  If you are more concerned about protecting the data, a HS offers better protection; the HS automatically rebuilds to take the place of a drive that fails.  Without a HS, your failed drive will just sit there until you manually rebuild a drive to take its place.

What do I need to do? Can I just purchase another disk and replace the faulty disk?

Typically, yes.  Most systems have hot-swappable drives, so you would simply pull the failed drive and insert the new one.  In some controllers, it will automatically begin to rebuild the replacement drive.  In some systems, some intervention is required.  This intervention is usually done in the BIOS utility for the controller or through special management software in the OS.
0
 
LVL 16

Assisted Solution

by:Gerald Connolly
Gerald Connolly earned 215 total points
Comment Utility
connollyg....from your example above for RAID-5.
this means that with a HS disk you actually get less useable hard disk storage?


By George i think he's got it! Yup, that's right, it isnt doing anything except burning power and wearing out its bearings!

if you get less useable space having a HS disk, then what actually is the use of the HS disk and not?
Assuming you didn't have a HS hard disk, and one hard disk failed. how then would you resolve  that situation?


The point about a HS is that as soon as the RAID controller detects that a disk in an array has failed it starts rebuilding using the HS, which as i said before means that your data is at risk until the rebuild completes. Now if you have a manual process you add onto the risk period the time it takes for you to realise the disk has failed and change the failed disk (This could be 60 hours or so if the failure were to be on a Friday evening just after you finished work for the week-end.)

Assuming I have RAID 5 WITHOUT a HS, and I were to lose one disk. What do I need to do? Can I just purchase another disk and replace the faulty disk? How do I replace it? Pull it out and fit in the new disk?

Yes & Yes, but note my comments about the time involved and the risks to your data!

Likewise if I have RAID 6 without a HS, and two disks were to fail, how do I replace these two disk witih new disks?

If you only use 2 disks then your array is still valid but will work in a degraded mode, you would need another disk to fail to lose data. The point about RAID-6 is that the risk of losing your data is greatly reduced and you would have time to replace the failed disks without worrying (too much) about losing your data.
0
 
LVL 14

Expert Comment

by:DonConsolio
Comment Utility
RAID and Hot Spare are not a backup strategy, but to increase availability.

If you need higher availability (i.e. no downtime in case of error) use:
- parity disk(s) - survive fail of 1 or more drives
- hot spare - no need to do a panic replacement in case of error

A logical failure, filesystem problem, wrong format/delete  operation ,
controller/cable problem, lightning strike may still destroy your data even if
you have several parity and hot spare disks.

If you need your data saved
- backup, backup, backup

:-)
0
 

Author Comment

by:ben1211
Comment Utility
connolly and poweredge....if you are saying that WITHOUT a HS Disk, should one disk fail in RAID 5 or RAID 6, I can just pull that faulty disk out and replace it with a new one (without my server going down - basically a swap as well)....then it means a HS actually is worthless. am i correct?

of course with a HS, the HS disk automatically starts to rebuild in the failure of one of the Hard Disks of the RAID 5 or 6 - am I correct?
0
 
LVL 14

Expert Comment

by:DonConsolio
Comment Utility
If you have your RAID at hand and always can swap out disks HS may be
considered worthless, but if your RAID is in some datacenter far away and
failure occurs on a weekend you may be happy to have HS :-)

If you have spare disks you may put them into your RAID as well and not
keep it somewhere on your desk :-)
0
 
LVL 16

Expert Comment

by:Gerald Connolly
Comment Utility
@ben1211 - What a HS is doing, is exactly what you are saying you can do manually! but the big difference is that it does it immediately, no delay. If done manually it can take several minutes to several days for you to do that.

Its quite common for people to complain about RAID-5 failing and losing their data, when what really happened is that they didnt notice the first disk failing and got caught out when the second disk failed.

I would always automatically configure a HS for anything other than RAID-6.

@DonConslio - A HS is never worthless. Implementing a HS is always based on a sound business decision
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now