HBAs and RAID controllers

Video 052 of 140 in Virtualization Foundations, in the unit “Storage devices, buses and network cards”. 4:02, with English and Hindi audio.

Many servers reach their disks through an extra card called a controller. Two common kinds are the host bus adapter, or HBA, and the RAID controller. They sound alike, but they do different jobs. One passes disks through as they are. The other joins disks together so that the array can survive a failure. This article explains each one, and shows how a controller changes what Linux sees.

What you will learn

The host bus adapter passes disks through

A host bus adapter, or HBA, is a card that connects a server to storage. It does not hide the disks or join them together. In plain mode, each disk reaches Linux as it really is.

A Fibre Channel HBA reaches a storage area network, which is a separate network built for disks. A SAS HBA reaches disk shelves.

RAID joins disks into one logical disk

A RAID controller joins several disks into one logical disk, which is the single disk the system sees. Its aim is to survive a failure without losing data. Each RAID level trades some space for protection.

Parity is extra data, worked out from the rest, that lets lost data be rebuilt. The controller rebuilds it onto a new disk after a failure.

Check what Linux sees

Use lspci to find the storage controller cards in the server. The filter keeps only the lines for RAID, SAS and Fibre Channel cards. The make and model tell you which management tool to use.

Find the RAID, SAS and Fibre Channel controller cards
lspci | grep -i -E 'raid|serial attached|fibre'

Then list the disks. If the controller builds an array, Linux may show one large disk, sized as the whole array, and not the physical disks behind it.

List the disks Linux sees, with size, type and model
lsblk -d -o NAME,SIZE,TYPE,MODEL

Note: A failed physical disk can stay hidden from Linux. The controller's own management tool shows the status of each disk.

What goes wrong with RAID arrays

You notice a degraded array, a long rebuild, or controller alerts. Act on the first alert, not the last.

Note: RAID is not a backup. If data is deleted or corrupted, that damage is copied to every disk.

Try it yourself

You need a Linux server with storage controllers. You will find the controller cards, then list the disks Linux sees and their sizes.

  1. Find the RAID, SAS and Fibre Channel controller cards in the server.

    lspci | grep -i -E 'raid|serial attached|fibre'

    What you should see: Shows the controller card, with its make and model.

  2. List the disks and their sizes. A RAID array may appear as one large disk.

    lsblk -d -o NAME,SIZE,TYPE,MODEL

    What you should see: A RAID array can appear as one disk, sized as the whole array.

Terms

HBA
A host bus adapter, a card that connects a server to storage and passes disks through.
RAID
A way of joining several disks into one logical disk that can survive a failure.
Parity
Extra data, worked out from the rest, that lets lost data be rebuilt.
Degraded array
A RAID array that is running without one of its disks, while its data is rebuilt from parity or mirror copies.
Write cache
Memory that holds writes before they reach the disks.

Check yourself

What does a RAID controller give the system?

One logical disk that can survive a failure, using mirrors or parity.

Why is RAID not a backup?

Deleted or corrupted data is copied to every disk, so the damage spreads, and RAID cannot restore it.

Why might lsblk show one large disk for a RAID array?

The controller presents the whole array as one disk, so Linux does not see the physical disks behind it.

Previous: What a network card is. Next: What makes a server different from a PC?.