Sub topic 14
Hot-swappable drives and hot spares
This chapter assumes you know what RAID 1, 5, 6, and 10 do and how a controller presents several drives as one volume. It covers how a failed drive gets replaced without taking the system down.
Hot-swappable drives
A hot-swappable drive can be removed and replaced while the system is powered on. You don't shut down, and users keep working.
Hot-swap needs support from the whole path:
- A drive bay or backplane (a board that connects drives to power and data) built for it.
- A controller that detects drive removal and insertion.
- Drives with connectors that make power and ground contact in the right order. Most servers use SAS or SATA drives in front-loading carriers.
A drive you have to open the case to reach is usually not hot-swappable, even if the interface technically allows hot plugging. Check the hardware documentation before pulling anything on a live system.
Hot spares
A hot spare is an extra drive installed in the system and assigned to an array, but holding no data. When a member drive fails, the controller automatically starts rebuilding the array onto the spare. Nobody has to be present.
Spares are classified by how ready they are:
| Type | State | Who acts |
|---|---|---|
| Hot spare | Powered on, assigned to the array | Controller rebuilds automatically |
| Warm spare | Powered on, not assigned | Technician starts the rebuild |
| Cold spare | On a shelf, not installed | Technician installs it, then rebuilds |
Why the rebuild window matters
While the array is degraded or rebuilding, it has lost some or all of its redundancy. A RAID 5 array that loses a second drive in this window loses all its data. Rebuilds also stress the surviving drives, and large drives take hours or days. A hot spare shortens the window because the rebuild starts immediately. RAID 6 and RAID 10 tolerate more failures, which makes this window less dangerous.
Common errors
- Confusing the two terms. Hot-swap describes how you replace a drive. A hot spare describes a standby drive that takes over automatically. A system can have one without the other.
- Expecting a spare to protect RAID 0. RAID 0 has no redundancy, so there is nothing to rebuild from. Its data is lost when any drive fails.
- Using a spare that is too small. The spare must be at least as large as the members it replaces.
- Pulling the wrong drive. Match the drive to the failure indicator or the controller's slot number. Pulling a healthy drive from a degraded RAID 5 destroys the array.
- Treating the array as backed up. Hot spares improve availability, but they don't replace backups.
Exercise
A server has a four-drive RAID 5 array and one unassigned drive installed and powered on. A member drive fails at 2 a.m. and nobody is on site. Is the extra drive a hot spare, and what happens at 2 a.m.?
Show answer
The extra drive is a warm spare, because it is powered on but not assigned to the array. The array becomes degraded and stays that way until a technician starts the rebuild. If the drive had been assigned as a hot spare, the controller would have started the rebuild automatically. The array stays exposed to a second failure until the rebuild finishes.