Updated on 03/08/2021

Due, in part, to the different views and opinions regarding the usage of hot spare disks in our previous post, we’ve decided to add an update for clarification. 

The Problematic Aspects of Using a Hot Spare Disk

As is said in almost every theory, using a hot spare disk with ZFS, Solaris FMA or in any other data storage environment is a good solution as it will automatically react to damage in a Redundant Array of Independent Disks (RAID) array and a hot spare disk indeed helps to minimize the duration of a degraded array state. 

That being said, our goal of creating a RAID is to continue operation and not lose data in the event of a disk failure. Anything that increases the risk of data loss could be a bad idea. Let’s have a look at some of these problematic aspects of hot spare disks.

Hot Spare Disks Add Stress to Vulnerable Systems

The main problem with hot spare disks is that they allow the rebuilding (resilvering) of a system that is still actively being used as a production server. This means that, while the resilvering process is taking place, the system will also still be occupied with the usual production data reads and writes. 

Resilvering is a process that needs a lot of server resources so when it’s executed while the server is still in use, it has to compete with the production loads. Since it’s a low-priority task, it can make the entire process of resilvering take very long (even up to a few weeks). This results in the server working at maximum achievable throughput for weeks, which can have dire consequences for the disks (especially HDDs).

Having decades worth of experience, we’ve realized that the use of hot spare disks in complex enterprise systems increases the probability of additional disks failing as the resilvering process starts to put more and more stress on the existing disks and the system itself

Problems in Overall Hot Spare Disk Design

The next flaw of a hot spare disk is that it degrades over time. From the moment it is connected to the system, it keeps on working. And when, eventually, it’s time for it to be used as a damaged disk’s replacement; the hot spare disk itself could simply not be in a good enough state to actually replace the damaged disk.

Another problematic aspect of hot spare disks is that they are used automatically once the disk failure is detected so the corrupted disk might still be connected to the system. It could still try to reconnect and start working again while the hot spare disk is trying to take over its role thus adding even more stress to the system. This is yet another factor that can affect the system’s overall performance and could potentially lead to data loss.  

Hot Spare Disks Create a Single Point of Failure

If you’re looking to create a system with no single point of failure, a hot spare disk will not provide you with much confidence given that the process of automatically replacing a failed disk has been known to occasionally fail, either partially or fully, and result in data loss. 

Having spent decades providing customers with data storage solutions, we’ve heard of a lot of examples where a hot spare disk was the reason for the entire server failure and even data loss occurring. Automation here is risky since it can start the domino effect, especially when the data storage infrastructure has been working for years and the hardware is worn out. 

Our Solution

These problematic aspects of hot spare disks are why our advice would be to not rely on hot spare disks in complex data storage architectures and to use other business continuity solutions instead like High Availability (HA) clusters, backups and On- & Off-site Data Protection (ideally all of the aforementioned). 

Using the ZFS file system, it’s much easier to monitor the system and create a proper backup, with that you have the ability to retrieve data from a damaged disk and write it onto a new one. In addition to that, when using a HA cluster, there is an option of manually switching the production from the affected node to a second one so that you could perform maintenance on the affected node. 

We’d advise following this procedure once the array shows that a degraded state has occurred as a result of a disk failure:

  1. Move resources to the second node in your HA cluster if possible.
  2. Run a full data backup.
  3. Verify the backed-up data for consistency, and verify whether the data restore mechanism works.
  4. Identify the problem source, i.e., find the erroneous hard disk. If possible, shut down the server and make sure the serial number of the hard disk matches the one that’s reported by the event viewer or system logs..
  5. Replace the hard disk identified as bad with a new, unused one. If the replacement hard disk had already been used within another RAID array; make sure that any residual RAID metadata on it has been deleted via the original RAID controller.
  6. Start a rebuild of the system.

So, if using this approach, the rebuild would consist of 6 steps! Using a hot spare disk, your RAID will skip the first four significant steps and then automatically run steps 5, and 6. Thus the rebuild will be completed before you can do these other critical steps; steps that could be the difference between your data being safe and lost.

Anyway, it’s still completely up to you as to how to build a proper system. However, we’d suggest not relying on hot spare disks in a ZFS RAID array due to the potential data loss it can cause. 

 

49 Comments

  • Matthias /

    16, 08 2013 02:08:49

    I disagree, too….
    In a “normal” productive environment, you HAVE to have a backup; most likely every day. So steps 1 & 2 should ALWAYS be set, no matter what the Admin or server does…

    I already had the issue, that 2 of my drives died in my RAID 5 (WITH HOT SPARE), so the hot spare saved me plenty of time not to have to recover all my data from backup.

    Another point of arguing could be the use of RAID 5 with hot spare or RAID 6.

    Greetings from Germany….

    Reply
  • Neil /

    09, 01 2015 07:22:04

    I have to disagree with the logic that says that hot adding a drive to a degraded RAID is a higher risk than doing a backup. Doing a backup causes writes to the disks that are still active in the array. The writes involve updating the access time of each file as well as usually the backup flag(s). Rebuilding the array only reads the active drives and writes to the new drive. Also the risk of failure goes up with drive seeks, not with reading or writing. Restoration of a RAID involves sequential seeking, which is the safest seeking that can be done. Data backup involves random seeking. Normally files are stored in one or more places, directory, metadata, and journaling all tend to be stored in certain areas which requires a large number of seeks, usually over one third of the travel of the heads.
    My experience has taught me that when I see multiple drive failures, it is usually environmental, the three top drive killers are: heat (improper cooling, failed fans, or dust clogging), smoke (cigarette or similar), faulty power supply (noise in the power from bad or poor capacitors in the power supply, or wrong voltages).

    Reply
  • Florian Manach /

    01, 04 2015 10:10:02

    Backup and RAID are two very different things and should not be faced against each other.

    RAID prevent hardware failure to impact the service availability.
    Backup prevents for data corruption or loss.

    RAID is not made to protect the loss of data. Backup is.
    RAIS is only there to ensure the service availability despite a disk failure.

    A degraded RAID array is a threat to the continuity of service. The sooner the RAID array is rebuild, the less this threat is important. This is why NOT HAVING A HOT SPARE IS A BAD IDEA. The only case where a hot spare is not mandatory is when a technician is 24/7 at the same place as the machine and can go replace the faulty disk minutes after the fault.

    A RAID array should ALWAYS be configured with a hot spare drive and with a notification mechanism so the fault unit can be replaced ASAP.

    This is totally uncorrelated with backups which must ABSOLUTELY made for EVERY piece of data that needs to be protected. If your RAID controller fails, or if you change host architecture, don’t count on the RAID for your data.

    Conclusion : ALWAYS use a hot spare. ALWAYS backup your data.

    Reply
  • Yowser /

    19, 01 2016 10:12:36

    Silly not to have a hot spare if you can. You should rebuild the array ASAP. Not only does a backup put more strain on the existing degraded array, but the backup process will likely take longer than the rebuild, meaning your data is actually more vulnerable. You’re not protecting your data by performing a backup first, you’re actually increasing the risk of a second drive failure as it will take so much longer to get a stable array again.

    Reply

Leave a Comment