RAID – continued
The two RAID types – Hardware and Software
What are these two RAID types and how do they affect my RAID setup? Besides the age-old arguments for and against both types, let us first take a look at each type and how it is put together.
Hardware raid, as the name implies, is built around hardware. You need a RAID card or a motherboard which supports RAID. The cost of the hardware depends on the level of performance you need and the installation quality.
Datacentre installations usually use far more expensive hardware which supports fancy options such as battery backup and dual controllers for redundancy.
RAID cards for servers are often supplied by the server chassis vendor, even though the actual RAID chips may be made by an independent manufacturer. Battery backup only ensures that data is not lost in case of sudden power outages.
On smaller systems, the onboard raid is often just a chip running limited software RAID (also called FAKERAID) Luckily the configuration is kept simple via the interface.
Setting up hardware RAID is often relatively easy – the hardest part is getting into the RAID configuration screen, which is often loaded before the BIOS and usually needs a unique key combination to access.
RAID is constructed in volumes (much like LVM) and any number of drives may be added to a volume to form an array. A minimum number of drives is needed for each RAID level, whether hardware or software.
The most common RAID level drive requirements are: RAID0 = 2 drives; RAID1 = 2 drives; RAID5 = 3 drives and RAID6 = 4 drives.
Software RAID is mostly restricted to LINUX operating systems. Windows has a RAID1 equivalent called DISK MIRRORING which works quite well, but no other RAID levels. On Linux, the raid system that is most commonly used is called MD-RAID.
Other RAID types in varying levels of maturity are LVM-RAID, BTRFS-RAID and ZFS-RAID. These last 3 are all file system based, while MD-RAID operates below the filesystem and any filesystem may be installed on top of MD-RAID.
Software RAID can do all the RAID levels that hardware RAID can plus a few HYBRID-RAID implementations as well as adding the possibility of RAID across partitions and not only disks.
Software RAID supports the following features as well:
- Threaded rebuild process
- Kernel-based configuration
- Portability of arrays between Linux machines without reconstruction
- Backgrounded array reconstruction using idle system resources
- Hot-swappable drive support
- Automatic CPU detection to take advantage of certain CPU optimizations
Hardware RAID used to outperform Software RAID, but with modern disk speeds, especially SSD, and modern CPU and RAM access speeds, Software RAID now outperforms all but the most expensive RAID hardware.
Hot spares are supported by both types of RAID. A “hot spare” is a spare disk (or more) that is not used until a drive in the RAID array fails. When this happens, the “hot spare” is cycled into use and rebuilt in place of the failed drive.
Large RAID arrays may have many “hot spares”. One hot spare may also serve multiple RAID arrays, as long as they are on the same physical server.