Skip to content

Lesson 2 of 9 · 28m

RAID Controllers and Disk Layout Without Superstition

Choose RAID behavior based on failure domains and workload, configure it through controller tooling, and verify what Linux will actually see.

RAID is where provisioning projects accumulate folklore. Someone insists RAID5 is always evil, someone else disables the controller because they read that ZFS wants raw disks, and a third person leaves the vendor's default virtual disk in place because changing it feels dangerous. The correct answer is less mystical: know which layer owns redundancy, which failure you are protecting against, and what the installer will see when it boots.

Start with the workload and the failure domain

RAID is not backup. It protects availability during disk failure and sometimes improves performance. It does not protect against accidental deletion, firmware corruption, controller failure, theft, or a bad dd command. A practical layout starts from questions:

Is the OS stateless and disposable?      small RAID1 boot volume
Is the data volume large and local?      controller RAID, HBA+mdadm, or ZFS
Can the node be rebuilt from scratch?    prefer simplicity over heroics
Does the controller add value?           cache, battery, hot spare management
Does the filesystem need raw devices?    prefer HBA/JBOD mode

For hypervisors and database hosts, controller cache can matter enormously. For object storage nodes, raw disks often matter more. Do not cargo-cult either answer.

Configure the controller before the installer

Enterprise controllers usually expose a preboot utility, but automation uses vendor CLIs or Redfish. A Broadcom/LSI controller may be managed with storcli:

storcli /c0 show
storcli /c0/vall show all
storcli /c0 add vd type=r1 drives=252:0-1 name=os
storcli /c0/e252/s2 set good force

Dell systems often expose the same job through RACADM or Redfish storage volumes; HPE uses Smart Array tooling. The names differ, but the sequence is stable: inventory physical disks, clear foreign or stale configuration, create virtual disks intentionally, initialize them, then boot the installer.

Linux sees virtual disks, not your intentions

A virtual disk may appear as /dev/sda, while controller passthrough devices may appear individually. Enumerate what the OS sees before partitioning:

lsblk -o NAME,MODEL,SIZE,TYPE,MOUNTPOINTS
ls -l /dev/disk/by-path/ /dev/disk/by-id/
smartctl -a /dev/sda
smartctl -a -d megaraid,0 /dev/sda

Never write provisioning logic that assumes /dev/sda is forever the boot disk. Use stable identifiers or controller-assigned topology, and make the installer discover the target explicitly.

Firmware and metadata are part of the disk story

Disks carry old RAID metadata, partition tables, and filesystem signatures. Reusing a disk without cleaning it can produce ghost LVM volume groups, duplicate filesystem UUIDs, or installers that politely destroy the wrong thing. Use controlled wiping — wipefs, controller initialization, or full disk sanitization depending on the risk and reuse policy.

Hardware RAID versus software RAID

Hardware RAID hides complexity and can offer write-back cache, but it couples recovery to controller firmware and metadata formats. Linux software RAID (mdadm) is transparent and portable, while ZFS or btrfs integrate redundancy with checksumming. None is universally correct. The sin is mixing layers accidentally: controller RAID under mdadm under LVM because three generations of operators each added one abstraction.

Field notes

  • Write cache without a protected battery or supercapacitor is a data-loss feature.
  • A patrol read or consistency check can make provisioning benchmarks look terrible; know controller background jobs.
  • Hot spares are policy, not magic. Decide whether they are global, dedicated, or absent.
  • Record controller firmware versions next to server inventory. Weird boot failures often follow firmware boundaries.
  • Test disk replacement before production. RAID configuration you have never rebuilt is a hypothesis.

Was this lesson helpful?

Sign in to rate