How it works
A RAID array combines several disks into one to gain capacity, speed or fault tolerance, and almost never all three at the same time. Each level resolves this commitment in a different way: there are levels that distribute the data without saving anything else, others that write complete copies and others that calculate parities to be able to reconstruct what is lost.
The calculator takes the number of disks, their capacity and the level chosen, and returns how much capacity is actually left for data, how much redundancy is taken, how many disks can fail without losing information and what approximate performance is obtained. The capacity is shown in the decimal units used by manufacturers and in the binary units reported by the operating system, which is where the eternal feeling that the disk comes with less than what it says on the box comes from.
It also estimates how long a rebuild takes and how likely it is to encounter an unrecoverable read error during its duration, which is the point where many single-parity arrays eventually fail. The final comparison calculates all levels with the same hardware, to see at a glance what is gained and what is lost with each one.
Examples
8 × 4 TB · RAID 624 TBTwo of the eight disks go into double parity, so there are six left for data: 24 TB decimal, which the operating system will show as 21.8 TiB. The efficiency is 75% and the array tolerates the failure of any two disks.8 × 4 TB · RAID 1016 TBWith the same discs, the mirror leaves only half the capacity. In return, it writes at twice the speed of RAID 6 and rebuilds by copying a single disk instead of reading the remaining seven.5 × 4 TB · RAID 572 %It is the probability of encountering an unrecoverable read error when rebuilding a crashed disk, with desktop disks having 1 error every 10^14 bits. You have to read an entire 16 TB and, in RAID 5, any error during that read has nowhere to recover from.12 × 8 TB · RAID 6064 TBTwelve disks divided into two groups of six: each group loses two disks in its double parity, so there are eight left for data. More capacity is sacrificed than in RAID 6, but the rebuild only reads the five disks in the affected group instead of the eleven in the array.Use cases
- Decide how many drives to buy and what size to reach the capacity needed for a NAS or file server.
- Compare levels before creating the arrangement, when you can still choose, because changing levels afterwards almost always means redoing it from scratch.
- Explain to a client or boss why eight 4TB drives don't give you 32TB of usable space.
- Estimate how many hours an array is exposed while rebuilding a disk, to plan the change in a low-usage window.
- Justify the jump from RAID 5 to RAID 6 in a large disk array by showing the risk of rebuilding.
- Calculate the actual cost per usable terabyte of different disk combinations and tiers before signing the purchase.
Frequently asked questions
Why does the operating system show less capacity than I estimate?
Because they don't speak the same language. Manufacturers sell in decimal units, where a TB is one trillion bytes, and most operating systems report in binary units, where a TiB is 2^40 bytes – about 9% larger. A 4TB disk appears as 3.64 TiB without a single byte missing. The calculator shows the two figures precisely so that the difference is not surprising. Added to that is what the file system reserves, which depends on which one you use.
RAID 5 or RAID 6?
It depends on the size of the disks and how many there are. RAID 5 sacrifices a single disk and tolerates a single failure; The problem is that, while rebuilding, the array is left without any protection and all surviving disks must be read from end to end, something that with multi-terabyte disks can take days. RAID 6 sacrifices one more disk but endures a second failure right at that critical moment. With disks of 4TB or larger, or arrays of eight disks or more, RAID 6 is the reasonable choice.
What is write penalty?
It is the number of physical disk operations each logical write costs. In RAID 0 it is 1, because it is written and that's it. In mirrors it is worth 2, because the same data goes to two disks. In RAID 5 it is 4: you have to read the old data, read the old parity, write the new data and write the new parity. In RAID 6 it is 6, because there are two parities. That's why an array with parity can have excellent reads and very poor random writes, and that's why write-heavy databases usually go on RAID 10.
How many disks does RAID 10 actually support?
One guaranteed, and up to half the settlement if you're lucky. RAID 10 creates mirrors in pairs and distributes the data between them: as long as the failures fall on different mirrors, the array is still alive, but if the two disks that fail are the same pair, everything is lost. With eight discs you could lose four and keep going, or lose two and be left with nothing. That is why the calculator shows both figures and it is never advisable to plan with the optimistic one.
When is RAID 50 or RAID 60 appropriate?
When there are so many disks that a single parity group becomes cumbersome. Dividing twelve or twenty-four disks into multiple groups shortens the rebuild, because only the group where the disk failed is read and not the entire array, and it also allows one failure per group to be tolerated instead of just one in the entire array. The price is that each group is left with its own parity: the more groups, the less usable capacity. These are server controller or drive enclosure levels, not a four-bay NAS.
What happens if the disks are different sizes?
In a classic RAID, all the disks behave as if they were the size of the smallest one, and what is left over on the large ones remains unused. That's why the calculator works with a single size: if you have mixed disks, load the smallest one and you will obtain the real capacity of the array. Some storage systems, such as several home NAS or file systems with their own redundancy, know how to take advantage of excess space, but they no longer follow the rules of traditional RAID.
Does a hot spare disk add fault tolerance?
It does not add tolerated failures, it adds reaction speed. A hot spare is plugged in and spinning with no data, waiting for a disk to drop so the rebuild can boot on its own, in minutes and not when someone walks by the rack. Since the most dangerous moment of a fix is precisely the one from the failure to the end of the reconstruction, shortening that window is worth a lot. Of course, it occupies a bay and is paid for like any other disk, and that is why the calculator deducts it from the efficiency.
What is an unrecoverable read error and why does it ruin a rebuild?
It is a sector that the disk cannot read even with its own correction codes. The data sheets declare it as a rate: desktop drives usually indicate less than 1 every 10^14 bits read, NAS drives 1 every 10^15, and SAS business drives 1 every 10^16. In daily use it's almost unnoticeable, but a rebuild forces you to read all surviving disks in full, and that's when the count becomes awkward: in an array with a single parity, a single error on that massive read means lost data. With double parity, on the other hand, the sector is rebuilt with the second and nothing happens.
Does RAID replace backups?
No, and it is the most expensive misunderstanding of storage. RAID protects against the physical failure of a disk and nothing else: an accidental deletion, a file corrupted by the application, ransomware, theft, a fire or a source that takes all the disks at once are replicated or lost equally throughout the array. RAID is high availability, that is, continuing to work while a disk is changed; backup is being able to go back. Both are needed.
Are the IOPS and speed values what I am going to measure?
They are a theoretical ceiling, useful for comparing levels with each other. They assume that the load is distributed evenly among all the disks and that neither the controller, nor its cache, nor the bus, nor the file system get in the queue. In practice, a controller with a battery-protected cache can hide much of the write penalty, and an ongoing rebuild can take half the performance. Use the numbers to decide the level, not to promise figures.