Hello Good People
Today we’re going to talk about Raid Arrays.
DM-Multipath – is a Linux kernel feature that provides redundancy and improved performance for block storage devices.
If one of the paths is lost, the manager will redirect traffic to the other paths giving you access to the data.
The file that holds the configuration for that feature is /etc/multipath.conf . You can find more information Here.
Also, in Linux, we got MDADM. mdadm is a tool used to manage software-based raid arrays in Linux.
Raid Arrays
Raid: This means a Redundant array of independent or inexpensive Disks.
You can find more information here: https://en.wikipedia.org/wiki/RAID.
Raid is often used for redundancy or getting a more significant logical driver using several smaller disks.
Data Handling Methods
- Striping – combines multiple smaller physical disks to act as a logical larger disk.
- Mirroring – two physical disks as a single logical volume where a copy of the drive is replicated onto the second disk.
- Parity – used in Raid arrays for fault tolerance. Calculating data from two hard drives and storing the result on a 3rd different drive.
Raid Levels
- Raid 0 – this raid configuration uses striping, which means all disks into one larger drive. This level Has zero redundancy.
- say you have three HDDs, and you want to make them one big HDD, but you don’t need redundancy,
- Raid 0 will be your best choice in that case.
- Raid 1 – this raid configuration uses mirroring, which means both drives contains identical copy of the same data
- Raid 5 – this raid uses striping and parity, say you have 3 disks this configuration will splits the data between the drives.
- if one disk is lost the raid will have 2 elements and will be able to calculate the 3rd
- Raid 6 – this configuration is using striping with dual parity, same as raid 5 but uses one more drive meaning minimum of 4 drives. which means it keeps the pairs twice so if you lose 2 drives you can still recover the array. better redundancy.
- Raid 10 – this configuration uses Mirroring + Striping, minimum of 4 drives, which means you get 2 full copies.
- to view current raid configuration in Linux we can view the file /proc/mdstat.
- that will show you which raid configurations is supported by your system.
the current raid configured. and how many drives are used.