RAID
RAID
Disks)
RAID (Redundant Arrays of Independent Disks) is a technique that makes use of a combination of
multiple disks for storing the data instead of using a single disk for increased performance, data
redundancy, or to protect data in the case of a drive failure. The term was defined by David
Patterson, Garth A. Gibson, and Randy Katz at the University of California, Berkeley in 1987. In this
article, we are going to discuss RAID and types of RAID their Advantages and disadvantages in detail.
What is RAID?
RAID (Redundant Array of Independent Disks) is like having backup copies of your important files
stored in different places on several hard drives or solid-state drives (SSDs). If one drive stops
working, your data is still safe because you have other copies stored on the other drives. It’s like
having a safety net to protect your files from being lost if one of your drives breaks down.
Let us understand How RAID works with an example- Imagine you have a bunch of friends, and you
want to keep your favorite book safe. Instead of giving the book to just one friend, you make copies
and give a piece to each friend. Now, if one friend loses their piece, you can still put the book
together from the other pieces. That’s similar to how RAID works with hard drives. It splits your data
across multiple drives, so if one drive fails, your data is still safe on the others. RAID helps keep your
information secure, just like spreading your favorite book among friends keeps it safe
A RAID controller is like a boss for your hard drives in a big storage system. It works between your
computer’s operating system and the actual hard drives, organizing them into groups to make them
easier to manage. This helps speed up how fast your computer can read and write data, and it also
adds a layer of protection in case one of your hard drives breaks down. So, it’s like having a smart
helper that makes your hard drives work better and keeps your important data safer.
Hardware Based: In hardware-based RAID, there’s a physical controller that manages the whole
array. This controller can handle the whole group of hard drives together. It’s designed to work with
different types of hard drives, like SATA (Serial Advanced Technology Attachment) or SCSI (Small
Computer System Interface). Sometimes, this controller is built right into the computer’s main
board, making it easier to set up and manage your RAID system. It’s like having a captain for your
team of hard drives, making sure they work together smoothly.
Software Based: In software-based RAID, the controller doesn’t have its own special hardware. So it
use computer’s main processor and memory to do its job. It perform the same function as a
hardware-based RAID controller, like managing the hard drives and keeping your data safe. But
because it’s sharing resources with other programs on your computer, it might not make things run
as fast. So, while it’s still helpful, it might not give you as big of a speed boost as a hardware-based
RAID system
Firmware Based: Firmware-based RAID controllers are like helpers built into the computer’s main
board. They work with the main processor, just like software-based RAID. But they only implement
when the computer starts up. Once the operating system is running, a special driver takes over the
RAID job. These controllers aren’t as expensive as hardware ones, but they make the computer’s
main processor work harder. People also call them hardware-assisted software RAID, hybrid model
RAID, or fake RAID.
Data redundancy, although taking up extra space, adds to disk reliability. This means, that in case of
disk failure, if the same data is also backed up onto another disk, we can retrieve the data and go on
with the operation. On the other hand, if the data is spread across multiple disks without the RAID
technique, the loss of a single disk can affect the entire data.
Availability: What fraction of the total session time is a system in uptime mode, i.e. how
available is the system for actual use?
Performance: How good is the response time? How high is the throughput (rate of
processing work)? Note that performance contains a lot of parameters, not just the two.
Capacity: Given a set of N disks each with B blocks, how much useful capacity is available to
the user?
RAID is very transparent to the underlying system. This means, that to the host system, it appears as
a single big disk presenting itself as a linear array of blocks. This allows older technologies to be
replaced by RAID without making too many changes to the existing code.
RAID-0 (Stripping)
RAID-1 (Mirroring)
1. RAID-0 (Stripping)
RAID-0
Instead of placing just one block into a disk at a time, we can work with two (or more) blocks
placed into a disk before moving on to the next one.
Raid-0
Evaluation
Reliability: 0
There is no duplication of data. Hence, a block once lost cannot be recovered.
Capacity: N*B
The entire space is being used to store data. Since there is no duplication, N disks each
having B blocks are fully utilized.
Advantages
It is easy to implement.
Disadvantages
A single drive loss can result in the complete failure of the system.
2. RAID-1 (Mirroring)
More than one copy of each block is stored in a separate disk. Thus, every block has two (or
more) copies, lying on different disks.
Raid-1
RAID 0 was unable to tolerate any disk failure. But RAID 1 is capable of reliability.
Evaluation
Reliability: 1 to N/2
1 disk failure can be handled for certain because blocks of that disk would have duplicates
on some other disk. If we are lucky enough and disks 0 and 2 fail, then again this can be
handled as the blocks of these disks have duplicates on disks 1 and 3. So, in the best case,
N/2 disk failures can be handled.
Capacity: N*B/2
Only half the space is being used to store data. The other half is just a mirror of the already
stored data.
Advantages
Disadvantages
It is highly expensive.
In Raid-2, the error of the data is checked at every bit level. Here, we use Hamming Code
Parity Method to find the error in the data.
Advantages
Disadvantages
At this level, we store parity information in a disc section and write to a dedicated parity
drive.
Whenever failure of the drive occurs, it helps in accessing the parity drive, through which we
can reconstruct the data.
Raid-3
Here Disk 3 contains the Parity bits for Disk 0, Disk 1, and Disk 2. If data loss occurs, we can
construct it with Disk 3.
Advantages
Disadvantages
Raid-4
Parity is calculated using a simple XOR function. If the data bits are 0,0,0,1 the parity bit is
XOR(0,0,0,1) = 1. If the data bits are 0,1,1,0 the parity bit is XOR(0,1,1,0) = 0. A simple
approach is that an even number of ones results in parity 0, and an odd number of ones
results in parity 1.
Raid-4
Assume that in the above figure, C3 is lost due to some disk failure. Then, we can recompute
the data bit stored in C3 by looking at the values of all the other columns and the parity bit.
This allows us to recover lost data.
Evaluation
Reliability: 1
RAID-4 allows recovery of at most 1 disk failure (because of the way parity works). If more
than one disk fails, there is no way to recover the data.
Capacity: (N-1)*B
One disk in the system is reserved for storing the parity. Hence, (N-1) disks are made
available for data storage, each disk having B blocks.
Advantages
Disadvantages
This is a slight modification of the RAID-4 system where the only difference is that the parity
rotates among the drives.
Raid-5
Evaluation
Reliability: 1
RAID-5 allows recovery of at most 1 disk failure (because of the way parity works). If more
than one disk fails, there is no way to recover the data. This is identical to RAID-4.
Capacity: (N-1)*B
Overall, space equivalent to one disk is utilized in storing the parity. Hence, (N-1) disks are
made available for data storage, each disk having B blocks.
Advantages
Disadvantages
Its technology is complex and extra space is required.
Raid-6 helps when there is more than one disk failure. A pair of independent parities are
generated and stored on multiple disks at this level. Ideally, you need four disk drives for this
level.
There are also hybrid RAIDs, which make use of more than one RAID level nested one after
the other, to fulfill specific requirements.
Raid-6
Advantages
Disadvantages
Advantages of RAID
Data redundancy: By keeping numerous copies of the data on many disks, RAID can shield
data from disk failures.
Scalability: RAID is scalable, therefore by adding more disks to the array, the storage
capacity may be expanded.
Versatility: RAID is applicable to a wide range of devices, such as workstations, servers, and
personal PCs
Disadvantages of RAID
Cost: RAID implementation can be costly, particularly for arrays with large capacities.
Decreased performance: The parity calculations necessary for some RAID configurations,
including RAID 5 and RAID 6, may result in a decrease in speed.
Single point of failure: RAID is not a comprehensive backup solution while offering data
redundancy. The array’s whole contents could be lost if the RAID controller malfunctions.
Conclusion
In Conclusion, RAID technology in database management systems distributes and replicates data
across several drives to improve data performance and reliability. It is a useful tool in contemporary
database setups since it is essential to preserving system availability and protecting sensitive data.
RAID 50, also called RAID 5+0. RAID 50 combines distributed parity (RAID 5) with striping (RAID 0).
The best RAID configuration for your system will depend on wether you give importance to speed,
data redundancy or both. If you give importance to speed most of all, choose RAID 0.
1. RAID 0 (striping).
2. RAID 1 (mirroring).