0% found this document useful (0 votes)
2K views4 pages

RAID (Redundant Arrays of Independent Disks) - GeeksforGeeks

RAID

Uploaded by

Anuradha Paswan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views4 pages

RAID (Redundant Arrays of Independent Disks) - GeeksforGeeks

RAID

Uploaded by

Anuradha Paswan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

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.

RAID (Redundant Arrays of Independent Disks)


Last Updated : 10 Jun, 2024
Types of RAID Controller
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 There are three types of RAID controller:
a single disk for increased performance, data redundancy, or to protect Hardware Based: In hardware-based RAID, there’s a physical controller
data in the case of a drive failure. The term was defined by David that manages the whole array. This controller can handle the whole group
Patterson, Garth A. Gibson, and Randy Katz at the University of California, of hard drives together. It’s designed to work with different types of hard
Berkeley in 1987. In this article, we are going to discuss RAID and types of drives, like SATA (Serial Advanced Technology Attachment) or SCSI (Small
RAID their Advantages and disadvantages in detail. Computer System Interface). Sometimes, this controller is built right into
the computer’s main board, making it easier to set up and manage your
What is RAID?
RAID system. It’s like having a captain for your team of hard drives, making
RAID (Redundant Array of Independent Disks) is like having backup copies
sure they work together smoothly.
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 Software Based: In software-based RAID, the controller doesn’t have its
because you have other copies stored on the other drives. It’s like having a own special hardware. So it use computer’s main processor and memory
safety net to protect your files from being lost if one of your drives breaks to do its job. It perform the same function as a hardware-based RAID
down. controller, like managing the hard drives and keeping your data safe. But
because it’s sharing resources with other programs on your computer, it
RAID (Redundant Array of Independent Disks) in a Database Management
might not make things run as fast. So, while it’s still helpful, it might not
System (DBMS) is a technology that combines multiple physical disk
give you as big of a speed boost as a hardware-based RAID system
drives into a single logical unit for data storage. The main purpose of RAID
is to improve data reliability, availability, and performance. There are Firmware Based: Firmware-based RAID controllers are like helpers built
different levels of RAID, each offering a balance of these benefits. into the computer’s main board. They work with the main processor, just
like software-based RAID. But they only implement when the computer
How RAID Works? starts up. Once the operating system is running, a special driver takes over
Let us understand How RAID works with an example- Imagine you have a
the RAID job. These controllers aren’t as expensive as hardware ones, but
bunch of friends, and you want to keep your favorite book safe. Instead of
they make the computer’s main processor work harder. People also call
giving the book to just one friend, you make copies and give a piece to
them hardware-assisted software RAID, hybrid model RAID, or fake RAID.
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 Why Data Redundancy?
hard drives. It splits your data across multiple drives, so if one drive fails, Data redundancy, although taking up extra space, adds to disk reliability.
your data is still safe on the others. RAID helps keep your information This means, that in case of disk failure, if the same data is also backed up
secure, just like spreading your favorite book among friends keeps it safe 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
What is a RAID Controller? RAID technique, the loss of a single disk can affect the entire data.

Key Evaluation Points for a RAID System


Reliability: How many disk faults can the system tolerate?
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 RAID-0

host system, it appears as a single big disk presenting itself as a linear


In the figure, blocks “0,1,2,3” form a stripe.
array of blocks. This allows older technologies to be replaced by RAID
Instead of placing just one block into a disk at a time, we can work with
without making too many changes to the existing code.
two (or more) blocks placed into a disk before moving on to the next
Different RAID Levels one.
RAID-0 (Stripping)
RAID-1 (Mirroring)
RAID-2 (Bit-Level Stripping with Dedicated Parity)
RAID-3 (Byte-Level Stripping with Dedicated Parity)
RAID-4 (Block-Level Stripping with Dedicated Parity)
RAID-5 (Block-Level Stripping with Distributed Parity)
RAID-6 (Block-Level Stripping with two Parity Bits)

Raid-0

Evaluation
Reliability: 0
There is no duplication of data. Hence, a block once lost cannot be
recovered.

Raid Controller
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.
1. RAID-0 (Stripping)
Advantages
Blocks are “stripped” across disks. It is easy to implement.
It utilizes the storage capacity in a better way.

Disadvantages
A single drive loss can result in the complete failure of the system.
It’s not a good choice for a critical system.
2. RAID-1 (Mirroring) It uses one designated drive to store parity.
The structure of Raid-2 is very complex as we use two disks in this
More than one copy of each block is stored in a separate disk. Thus, technique. One word is used to store bits of each word and another
every block has two (or more) copies, lying on different disks. word is used to store error code correction.
It is not commonly used.

Advantages
In case of Error Correction, it uses hamming code.
It Uses one designated drive to store parity.

Disadvantages
It has a complex structure and high cost due to extra drive.
It requires an extra drive for error detection.

4. RAID-3 (Byte-Level Stripping with Dedicated Parity)

Raid-1 It consists of byte-level striping with dedicated parity striping.


The above figure shows a RAID-1 system with mirroring level 2. At this level, we store parity information in a disc section and write to a
RAID 0 was unable to tolerate any disk failure. But RAID 1 is capable of dedicated parity drive.
reliability. Whenever failure of the drive occurs, it helps in accessing the parity
drive, through which we can reconstruct the data.
Evaluation
Assume a RAID system with mirroring level 2.

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.
Raid-3

Advantages
Here Disk 3 contains the Parity bits for Disk 0, Disk 1, and Disk 2. If data
It covers complete redundancy.
loss occurs, we can construct it with Disk 3.
It can increase data security and speed.
Advantages
Disadvantages
Data can be transferred in bulk.
It is highly expensive.
Data can be accessed in parallel.
Storage capacity is less.
Disadvantages
3. RAID-2 (Bit-Level Stripping with Dedicated Parity) It requires an additional drive for parity.
In the case of small-size files, it performs slowly.
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.

5. RAID-4 (Block-Level Stripping with Dedicated Parity) Capacity: (N-1)*B


One disk in the system is reserved for storing the parity. Hence, (N-1)
Instead of duplicating data, this adopts a parity-based approach. disks are made available for data storage, each disk having B blocks.

Advantages
It helps in reconstructing the data if at most one data is lost.

Disadvantages
It can’t help reconstructing data when more than one is lost.

6. RAID-5 (Block-Level Stripping with Distributed Parity)

This is a slight modification of the RAID-4 system where the only


difference is that the parity rotates among the drives.

Raid-4

In the figure, we can observe one column (disk) dedicated to parity.


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-5

In the figure, we can notice how the parity bit “rotates”.


This was introduced to make the random write performance better.

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
Raid-4 data. This is identical to RAID-4.
Capacity: (N-1)*B
Assume that in the above figure, C3 is lost due to some disk failure.
Overall, space equivalent to one disk is utilized in storing the parity.
Then, we can recompute the data bit stored in C3 by looking at the
Hence, (N-1) disks are made available for data storage, each disk
values of all the other columns and the parity bit. This allows us to
having B blocks.
recover lost data.
Advantages
Evaluation
Data can be reconstructed using parity bits.
Reliability: 1
It makes the performance better.
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 Disadvantages
data. Its technology is complex and extra space is required.
If both discs get damaged, data will be lost forever. Complexity: The setup and management of RAID might be challenging.
Decreased performance: The parity calculations necessary for some
7. RAID-6 (Block-Level Stripping with two Parity Bits) RAID configurations, including RAID 5 and RAID 6, may result in a
decrease in speed.
Raid-6 helps when there is more than one disk failure. A pair of Single point of failure: RAID is not a comprehensive backup solution
independent parities are generated and stored on multiple disks at this while offering data redundancy. The array’s whole contents could be
level. Ideally, you need four disk drives for this level. lost if the RAID controller malfunctions.
There are also hybrid RAIDs, which make use of more than one RAID
level nested one after the other, to fulfill specific requirements.
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.

Frequently Asked Questions on RAID – FAQs

What is RAID 50?

Raid-6 RAID 50, also called RAID 5+0. RAID 50 combines distributed parity
(RAID 5) with striping (RAID 0).
Advantages
Very high data Accessibility.
Fast read data transactions. What is the best RAID type?

Disadvantages
Due to double parity, it has slow write data transactions. The best RAID configuration for your system will depend on wether
Extra space is required. you give importance to speed, data redundancy or both. If you give
importance to speed most of all, choose RAID 0.
Advantages of RAID
Data redundancy: By keeping numerous copies of the data on many
How to calculate RAID 6?
disks, RAID can shield data from disk failures.
Performance enhancement: RAID can enhance performance by
distributing data over several drives, enabling the simultaneous
RAID 6 is calculated by multiplying (N — 2) by the smallest disk size
execution of several read/write operations. (S).
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 What are the four types of RAID?
160 Days of DSA Aptitude Engineering Mathematics Discrete Mathematics Operating System DBMS
workstations, servers, and personal PCs

Disadvantages of RAID The most common four types of RAID are-

Cost: RAID implementation can be costly, particularly for arrays with


large capacities.
1. RAID 0 (striping).

2. RAID 1 (mirroring). Difference Between RAID 0 and RAID 1


RAID stands for Redundant Array of Independent Disk, and is the technique
3. RAID 5 (distributed parity). used for disk organization for reliability and performance. Both RAID 0…
7 min read
4. RAID 6 (dual parity).
Difference Between Hardware RAID And Software RAID
A Redundant Array of Independent Disks (RAID) is virtual disk technology
that combines multiple physical drives into one unit. This is a method of…
5 min read

Are you a student in Computer Science or an employed professional


looking to take up the GATE 2025 Exam? Of course, you can get a good Difference between RAID 2 and RAID 3
score in it but to get the best score our GATE CS/IT 2025 - Self-Paced RAID is the way to use multiple hard drives together to store the data. It is
used by many people from home users to big companies. RAID is popular…
Course is available on GeeksforGeeks to help you with its preparation. Get
6 min read
comprehensive coverage of all topics of GATE, detailed explanations, and
practice questions for study. Study at your pace. Flexible and easy-to-
follow modules. Do well in GATE to enhance the prospects of your career.
Difference Between RAID 5 and RAID 10
Enroll now and let your journey to success begin! In the data storage context, RAID 5 and RAID 10 are two of the RAID levels
that can be implemented in order to enhance data redundancy, data access…
6 min read

GeeksforGeeks 76
Increasing Performance of Multiple Disks
Earlier we used to have a single Disk which involved a lot of time delay and
Previous Article Next Article low performance in terms of fetching data and responding. This gave a rise…
Disk Scheduling Algorithms Last Minute Notes – Operating Systems 2 min read

Overview of Just a Bunch Of Disks (JBOD)


Similar Reads
Just a Bunch Of Disks : JBOD (stands for "Just a Bunch Of Disks") is referred
as the collection of hard disks with one single storage enclosure that are no…
Difference between RAID 1 and RAID 5 3 min read
Prerequisites - RAID , RAID levels 1. RAID 1 : RAID 1 is also known as the
mirror configuration of data as it replicates the data from drive 1 to drive 2. …
3 min read Hardware RAID
A Hardware RAID is basically a form of a RAID in which' all the processing is
done on the motherboard. Hardware RAID was the initial type of RAID…
Difference between RAID 1 and RAID 2 2 min read
RAID (Redundant Array of Independent Disks) technology is a foundational
element in modern storage systems, designed to enhance data reliability,…
5 min read
Article Tags : DBMS

Difference Between RAID 3 and RAID 4


RAID (Redundant Array of Independent Disks) is a data storage method that
integrates many disk drives into a single device to increase performance an…
4 min read
Corporate & Communications Address:-
A-143, 9th Floor, Sovereign Corporate
Tower, Sector- 136, Noida, Uttar Pradesh
(201305) | Registered Address:- K 061,
Tower K, Gulshan Vivante Apartment,
Sector 137, Noida, Gautam Buddh
Nagar, Uttar Pradesh, 201305

Company Explore
About Us Job-A-Thon Hiring Challenge
Legal Hack-A-Thon
Careers GfG Weekly Contest
In Media Offline Classes (Delhi/NCR)
Contact Us DSA in JAVA/C++
Advertise with us Master System Design
GFG Corporate Solution Master CP
Placement Training Program GeeksforGeeks Videos
Geeks Community

Languages DSA
Python Data Structures
Java Algorithms
C++ DSA for Beginners
PHP Basic DSA Problems
GoLang DSA Roadmap
SQL DSA Interview Questions
R Language Competitive Programming
Android Tutorial

Data Science & ML Web Technologies


Data Science With Python HTML
Data Science For Beginner CSS
Machine Learning JavaScript
ML Maths TypeScript
Data Visualisation ReactJS
Pandas NextJS
NumPy NodeJs
NLP Bootstrap
Deep Learning Tailwind CSS

Python Tutorial Computer Science


Python Programming Examples GATE CS Notes
Django Tutorial Operating Systems
Python Projects Computer Network
Python Tkinter Database Management System
Web Scraping Software Engineering
OpenCV Tutorial Digital Logic Design
Python Interview Question Engineering Maths

DevOps System Design


Git High Level Design
AWS Low Level Design
Docker UML Diagrams

You might also like