What is the difference between RAID defined by host controller versus Linux RAID defined by software?

Often "hardware RAID controllers" are nothing more that a small embedded computer (with PowerPC or ARM cores) running a stripped-down Linux kernel. Being closely intergrated, the hardware cards can manage the chassis LED, removing/replacing a disk, etc without the intervention of external software. Moreover, many RAID controllers provide a dedicated, ECC-protected write cache which is critical to obtain good performance. In the past, the offloading capability of the integrated card cores were valuable; nowadays, the advantage is basically non-existant.

The Linux MDRAID drives is very fast and reliable; moreover, using ledmon you can have automatically managed chassis LED. However, it remain somewhat less integrated: you not only need to manually create the raid arrays using mdadm, but automatic disk replacement has to be configured using mdadm.conf POLICY section (alternatively, you need to manually reinclude the replaced disk with mdadm manage --add). Finally, being completely software-based, it clearly does not include any dedicated, powerloss-proteced writeback caching.

Read here for more details.

To directly answer you questions:

  • with hardware RAID card, the OS only see the array volume as a single disk;
  • if your server has an hardware RAID card with powerloss protected writeback cache, use it (some old controllers does not even support raw disk passthrough).