Many of us already very much aware of Hardware and Software RAID. Keeping performance in mind , hardware RAID is always preferable over software RAID but budget become constraint sometimes. Generally we use software RAID to save the cost of hardware RAID. Why Hardware RAID are costlier than software RAID ? The answer is cost of special hardware known as RAID controller used in hardware RAID and makes hardware RAID costly.
How can we reduce hardware RAID cost? The answer is very simple , by removing RAID controller. Many of the hardware manufacturing companies are doing same, they are removing hardware raid controller and in place of that using a chip that through BIOS configuration seems to work as hardware RAID. None of these are true hardware RAID controller but simply supported by BIOS configuration and special driver within OS. Manufacturing companies claims this hardware RAID since this can be configured via BIOS and OS can be booted from this RAID.
In Linux, fake raid configuration supported by device mapping driver dm-raid. If you on Redhat Linux system then for fake raid , you will find device file in /dev/mapper not in /dev . The other logical block device such as LVM , software RAID also appears in /dev/mapper, so this is clear that fake RAID is not a hardware RAID. You will find one more interesting fact in the case of fake RAID in Linux, suppose you have two hard disk in your RAID1 configuration, stup via fake RAID, then you will see three block device in Linux /dev/sda , /dev/sdb and /dev/mapper/isw*.
The most interesting fact is there is no performance gain of using fake raid in place of software RAID. We can consider fake RAID as another marketing stunt, nothing more than this. Using fake raid is not less than a nightmare, Linux software RAID is recommended over fake raid for stability point of view.
One can argue that if he/she opt for Linux software RAID over fake RAID then in case of multi boot RAID configuration will not persist. Yes this is only a advantage of fake RAID over software RAID but we more most of cases we do not use multi boot for production environment.
In Linux environment dm-raid driver of kernel implement such RAID for Operating System. To manage this RAID device from Linux shell we can use dmraid command. Here , I am trying to explain dmraid command with a few examples
root# dmraid -r
Above output saying that there is two RAID devices on the system.
root# dmraid -b
Above output saying that there is two block devices on the system in the raid /dev/sda and /dev/sdb
But the most important command is
root# dmraid -s
Above command will show you status of RAID. This command will help you to find health of the RAID.
You will get very useful status output using dmraid -s
Suppose you get status that one of your drive in RAID volume is not ok, In that case RAID downs into degraded status. You need to rebuild the RAID is RAID enter into degraded status.
What you will do to rebuild the array?
To rebuild the RAID, first you have to replace faulty disk with new error free disk and then issue dmraid -R RAID_Volume_name replaced_device. For example, if /dev/sdb was the faulty disk then following command will rebuild RAID
root# dmraid -R isw_abc /dev/sdb
Here volume name assumed as isw_abc, You can find volume name using dmraid -s