RAID with Linux

'Real' Hardware RAID

3ware controller

3ware controllers are supported in Vanilla kernel since 'ages'. A command line interface namend tw_cli is available on the download webpage at 3ware.com. A webinterface (providing remote access) is available through the debian-unofficial.org-project:

deb     http://ftp.debian-unofficial.org/debian sarge main contrib non-free restricted
deb-src http://ftp.debian-unofficial.org/debian sarge main contrib non-free restricted
There are two packages available: 3ware-3dm2-new-binary (for 3ware 9550SX) and 3ware-3dm2-old-binary (for 3ware 700x, 750x, 800x, 850x, 900xS, 950xS). 3ware-3dm2-old-binary is included in grml.

ICP Vortex

ICP Vortex should work as well and provides linux drivers as well, but I've no experience in using them yet...

'Fake' Hardware RAID

That's stuff like Intel ICHx, VIA, Silicon, Adaptec and Promise RAID. Accessing such a RAID is possible with kernel 2.6 using device mapper ('DM') and dmraid (both provided by grml) [kernel 2.4 requires ataraid].

Linux Software RAID

Important: there's a lot of documentation hanging around, describing how to use software raid with raidtools2. raidtools2 is not maintained by its upstream developers anymore and has been replaced by the package mdadm. The last debian package version of raidtools2 shipping the binaries is 1.00.3-17 (available on grml), afterwards it's just a dummy package with dependency on mdadm.

Things to take care of:

Installing grml using grml2hd on a bootable SW-RAID ('/' on RAID)

cfdisk /dev/hda                   # select type FD (Linux raid autodetect)
cfdisk /dev/hdc                   # select type FD (Linux raid autodetect)
mdadm --create --verbose /dev/md0 --level=raid1 --raid-devices=2 /dev/hda1 /dev/hdc1 # create raid
mdadm --detail /dev/md0           # show details of raid system
cat /proc/mdstat                  # now wait until raid sync has finished (otherwise performance sucks)
SWRAID='mbr-only' grml2hd /dev/md0 --mbr /dev/md0   # install grml to raid
cat /proc/mdstat                  # again wait until raid sync has finished

Often needed commands

mdadm --detail /dev/md0                        # show details of raid system
cat /proc/mdstat                               # details of mdstat
mdadm --fail /dev/md0 /dev/hdc1                # mark disk as faulty
mdadm -r /dev/md0 /dev/hdc1                    # remove disk from array
mdadm -a /dev/md0 /dev/hdc1                    # integrate disk into array
mdadm --manage --stop /dev/md0                 # stop multidevice
mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1  # start multidevice

Links

German

Jimmys slides from GLT05 talk: sw-raid.pdf

English

www.linux-magazine.com/issue/33/Software_RAID.pdf
http://www.gentoo.org/doc/en/gentoo-x86-tipsntricks.xml#software-raid
http://tldp.org/HOWTO/Software-RAID-HOWTO.html
http://www.devil-linux.org/documentation/1.0.x/ch01s05.html
http://lca2005.linux.org.au/Papers/Theodore%20Ts'o/Recovering%20from%20Hard%20Drive%20Disasters/slides.pdf
http://www.midhgard.it/docs/lvm/Root-on-LVM-on-RAID-HOWTO.pdf
http://www.fsugar.be/docu/fs-lvm-md.pdf
http://oxygen.chem.nthu.edu.tw/~jsyu/linux/debk26.pdf
http://datadisk.co.uk/doc/software_raid.pdf
http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/pdf/Software-RAID-HOWTO.pdf

Windows Software RAID

Notice: if you have any chance to boot Windows for accessing the SW-RAID this methode should be prefered. If you can't boot anymore try to boot with a Windows Live-CD (using BartPE). The command line tool diskpart is very useful (start using it via 'select disk $NUMBER', 'detail disk', 'list disk', 'list volume',...).

Links

German

Vergleich von dynamischem Speicher und Basisspeicher in Windows 2000 und Windows XP

English

Basic Storage Versus Dynamic Storage in Windows XP
DiskPart @ WinXP documentation

Terms