Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Thursday, September 23, 2010

fakeRAID

Source


In the last few years, a number of hardware products have come onto the market claiming to be IDE or SATA RAID controllers. These have shown up in a number of desktop/workstation motherboards and lower-end servers such as the HP DL360 G5, if ordered without the optional RAID card. Virtually none of these are true hardware RAID controllers. Instead, they are simply multi-channel disk controllers combined with special BIOS configuration options and software drivers to assist the OS in performing RAID operations. This gives the appearance of a hardware RAID, because the RAID configuration is done using a BIOS setup screen, and the operating system can be booted from the RAID. With the advent of Terabyte disk drives, FakeRAID is becoming a popular option for entry-level small business servers to simply mirror 2 1.5 TB drives, and dispense with an expensive hardware RAID 5 array.
Older Windows versions required a driver loaded during the Windows install process for these cards, but that is changing as it has already changed in FreeBSD (which has FakeRAID support built into the ATAPI disk driver). Under Linux, which has built-in softRAID functionality that pre-dates these devices, the hardware is normally seen for what it is -- multiple hard drives and a multi-channel IDE/SATA controller. Hence, fakeRAID.

Why not use a linux software raid?


If you have arrived here after researching this topic on the Internet, you know that a common response to this question is, "I don't know if you can actually do that, but why bother -- Linux has built-in softRAID capability." Also, it's not clear that there is any performance gain using hardware fakeRAID under Linux instead of the built-in softRAID capability; the CPU still ends up doing the work. The most common reason for using fakeRAID is in a dual-boot environment, where both Linux and Windows must be able to read and write to the same RAID partitions. Multiboot configurations are common among users who need multiple operating systems available on the same machine. These people shouldn't have to add a separate hard drive just so they can boot Linux. FakeRAID allows these users to access partitions interchangeably from either Linux or Windows. Another reason for using FakeRAID is if you define a disk mirror and a hard drive crashes, you can down the system and replace the failed drive and rebuild the mirror from the BIOS without having to boot into the operating system.
This wiki describes how to get Linux to see the RAID as one disk and boot from it in the same way that windows will install on this type of device. This document is constantly updated by users like you and is a "living" document to which your contributions are welcome.
RAID-1
/!\ You should be aware that dmraid (especially the dm-raid1 target of the device mapper) currently (including kernel version 2.6.17) supports the mirroring with RAID-1, but it has no error handling. When a block on one disk fails a failure reaches up to the application level, currently it doesn't try to read from the second disk. It only mirrors all data to the second disk.
So it secures the system from data loss, but the system can nonetheless crash. There exists patches for the 2.6.17 kernel series which enables a higher read speed and error handling in failure case, but until now they are not incorporated.
External links regarding RAID-1: Running Ubuntu On a Fakeraid/1 array described how to adapt the original HOWTO to a RAID-1 (mirroring) array.  
RAID-5
Since version 8.10 (Intrepid Ibex) Ubuntu has RAID5 support built into the kernel loading the right module. also dmraid is now in the 'main' respository, and can be installed without reconfiguring apt. Once dmraid is running, the live installer can handle installing to the raid.

No comments: