Firstly many of us get questions about what is RAID and how it works.
Here is the answer to such questions
RAID is a way of storing the same data in different places on multiple hard disks or solid-state drives (SSDs) to protect data in the case of a drive failure. There are different RAID levels, however, and not all have the goal of providing redundancy.
How RAID works:
RAID works by placing data on multiple disks and allowing input/output (I/O) operations to overlap in a balanced way, improving performance. Because using multiple disks increases the mean time between failures, storing data redundantly also increases fault tolerance.
RAID arrays appear to the operating system (OS) as a single logical drive.
RAID employs the techniques of disk mirroring or disk striping. Mirroring will copy identical data onto more than one drive. Striping partitions help spread data over multiple disk drives. Each drive’s storage space is divided into units ranging from a sector of 512 bytes up to several megabytes. The stripes of all the disks are interleaved and addressed in order. Disk mirroring and disk striping can also be combined in a RAID array.
We will now see what is RAID controller
RAID controller:
A RAID controller is a device used to manage hard disk drives in a storage array. It can be used as a level of abstraction between the OS and the physical disks, presenting groups of disks as logical units. Using a RAID controller can improve performance and help protect data in case of a crash.
A RAID controller may be hardware- or software-based. In a hardware-based RAID product, a physical controller manages the entire array.
With software-based RAID, the controller uses the resources of the hardware system, such as the central processor and memory. While it performs the same functions as a hardware-based RAID controller, software-based RAID controllers may not enable as much of a performance boost and can affect the performance of other applications on the server.
If a software-based RAID implementation is not compatible with a system’s boot-up process and hardware-based RAID controllers are too costly, firmware, or driver-based RAID, is a potential option.
RAID levels
RAID devices use different versions called levels.
They are three categories in RAID levels
- Standard RAID
- Nested RAID
- Nonstandard RAID
In this blog, we will now be discussing Standard RAID
Basically, RAID contains level-0 to level-5
We will see the levels in detail
RAID level-0
Level 0 is also called striped disks
RAID 0 is taking any number of disks and merging them into one large volume. It will increase speeds as you’re reading and writing from multiple disks at a time. But all data on all disks is lost if any one disk fails. An individual file can then use the speed and capacity of all the drives of the array. The downside to RAID 0, though, is that it is NOT redundant. The loss of any individual disk will cause complete data loss. This RAID type is very much less reliable than having a single disk.
RAID level-1:
Level 1 is also called as mirrored disks.
Level-1 duplicates data across two disks in the array, providing full redundancy. Both disks store exactly the same data, at the same time, and at all times. Data is not lost as long as one disk survives. The total capacity of the array equals the capacity of the smallest disk in the array. At any given instant, the contents of both disks in the array are identical.
RAID level-2:
RAID 2 is another RAID standard level configuration that provides very high data transfer rates. In RAID 2, a central controller synchronizes the disks by making them spin at the same angular orientation so that they all reach the index simultaneously. RAID 2 uses bit-level striping and each sequential bit is placed on a different hard drive. The error correcting code (ECC) used is the Hamming code parity, which is calculated across bits and stored separately in at least a single drive.
RAID level-3:
RAID Level 3 includes data striping, but it also assigns one drive to store parity information. This provides some fault tolerance and is especially useful in data-intensive or single-user environments for accessing long sequential records. RAID 3 doesn’t overlap I/O, and it requires synchronized-spindle drives to prevent performance degradation with short records.
RAID level-4:
RAID 4 is a RAID configuration that uses a dedicated parity disk and block-level striping across multiple disks.
Because data is striped in RAID 4, the records can be read from any disk. However, since all the writes must go to the dedicated parity disk, this causes a performance bottleneck for all to-write operations.
RAID 4 is not commonly used.
RAID level-5
Level-5 is also called striped disks with single parity
RAID 5 requires the use of at least three drives. It combines these disks to protect data against loss of any one disk; the array’s storage capacity is reduced by one disk. It stripes data across multiple drives to increase performance. But, it also adds the aspect of redundancy by distributing parity information across the disks.
- If the request made by the process is less than equal to the max needed for that process.
- If the request made by the process is less than equal to the freely available resource in the system.