Windows Server 2016 Storage Spaces How to Replace a Failed Hard Drive

11
Windows Storage Server 2016 Storage Spaces Remove Failed Drive 1
Windows Storage Server 2016 Storage Spaces Remove Failed Drive 1

Windows Storage Spaces is a great software-defined solution that has been part of the Microsoft stack since Window Server 2012. It provides enterprise storage features such as tiering storage (SSD with Hard Drive) and a resilient file system such as ReFS. It is a very powerful solution combined with SMB 3 and RDMA which deliver great performance even when compared to other software-defined storage solutions. One of the major complaints against the Windows Server 2012 iteration was complicated hardware replacement procedures which require PowerShell functions. These procedures can be an issue with complex arrays and admin who are not familiar with PowerShell. Windows Server 2016 Storage Spaces addressed some of the complex issues and simplified the procedures. Today we are going to cover how to replace a failed hard drive in Windows Server 2016 Storage Spaces.

How to Replace a Failed Hard Drive in Windows Server 2016 Storage Spaces

The following procedure was based on Windows Server 2016 DataCenter Edition Build 1607 to demonstrate how to replace a failed hard drive. The procedure is not as straightforward as some other software-defined storage solutions, so we wanted to show the procedure.

From Windows Event Viewer, there are system logs indicate bad block from hard drive.

Windows Storage Server 2016 Storage Spaces Bad Hard Drive Logs
Windows Storage Server 2016 Storage Spaces Bad Hard Drive Logs

In order to find out the actual hard drive info, we need to run the following command to identify the hard drive from the server:

Get-PhysicalDisk | select deviceid,friendlyname,serialnumber,size,physicallocation | sort -Property deviceid

Windows Storage Server 2016 Storage Spaces Identify Bad Hard Drive
Windows Storage Server 2016 Storage Spaces Identify Bad Hard Drive

From this output, we can identify the failed drive 9 is in slot 12. Note, this is working on a SATA hard drive sitting on a SAS infrastructure.

Windows Storage Server 2016 Storage Spaces Bad Hard Drive Identified
Windows Storage Server 2016 Storage Spaces Bad Hard Drive Identified

We need to locate the physical drive. The easiest way is to go to Server Manager, Storage Pool, Physical Disk then select the hard drive in slot 12. Choose Toggle Drive Light (if your system supports this feature):

Windows Storage Server 2016 Storage Spaces Locate Drive Toggle Drive Light
Windows Storage Server 2016 Storage Spaces Locate Drive Toggle Drive Light

Before we remove the drive, we need to place the same size hard drive in the system, join to the pool and set to automatic mode. If you fail to do this, as many do during their first replacements, you will get the following warning.

Windows Storage Server 2016 Storage Spaces Before Removal Need Replacement
Windows Storage Server 2016 Storage Spaces Before Removal Need Replacement

Instead, you need to add the new hard drive to the system. Then you will need to rescan storage:

Windows Storage Server 2016 Storage Spaces Rescan Storage
Windows Storage Server 2016 Storage Spaces Rescan Storage
Windows Storage Server 2016 Storage Spaces Rescan Storage 2
Windows Storage Server 2016 Storage Spaces Rescan Storage 2

Once this is done, you can add the new hard drive to the Storage Pool.

Windows Storage Server 2016 Storage Spaces Newly Added Hard Drive To Pool
Windows Storage Server 2016 Storage Spaces Newly Added Hard Drive To Pool

You will want to add the drive as Automatic for allocation.

Windows Storage Server 2016 Storage Spaces Newly Added HD As Automatic For Allocation
Windows Storage Server 2016 Storage Spaces Newly Added HD As Automatic For Allocation

After the new drive is in the Storage Pool, then remove failed hard drive.

Windows Storage Server 2016 Storage Spaces Remove Failed Drive 1
Windows Storage Server 2016 Storage Spaces Remove Failed Drive 1
Windows Storage Server 2016 Storage Spaces Before Removal Need Replacement
Windows Storage Server 2016 Storage Spaces Before Removal Need Replacement

Do not make any changes to the Storage Pool while repair operation is going on.

Windows Storage Server 2016 Storage Spaces Repair Operation 1
Windows Storage Server 2016 Storage Spaces Repair Operation 1
Windows Storage Server 2016 Storage Spaces Repair Operation 2
Windows Storage Server 2016 Storage Spaces Repair Operation 2

After some time, the old hard drive will be removed from the pool and the new drive will be assimilated. For the PowerShell fans, you can use get-storagejob to follow the progress of the repair.

Windows Storage Server 2016 Storage Spaces Repair Status
Windows Storage Server 2016 Storage Spaces Repair Status

After the operation is completed you can safely remove the failed hard drive.

Final Words

From the procedure above you can see the Microsoft made replace failed hard drive very easy in Windows Server 2016. People with minimum PowerShell knowledge should be able to perform the task without any issues.

Software-defined storage has come a long way in the past couple of years. Hyper-converged storage has become mature with solutions like VMware vSAN, Microsoft Storage Spaces Direct, and Nutanix. We also see how those solution combined with “traditional” software-defined storage such as ZFS and Microsoft Storage Spaces could give the performance, flexibility and reliability to customers who prefer alternative flexible storage solutions from the traditional vendors such as Dell EMC, HPE, and NetApp.

We hope this guide helps a new Microsoft Windows Server 2016 Storage Spaces admin replace a failed hard drive. If you try removing the drive first and get the error shown above it can be an understandably frustrating experience.

11 COMMENTS

  1. Hmm. So this essentially requires a hot spare, or a free slot to be left in your system.

    What happens if I remove the physical drive and install a replacement without selecting “remove disk”? What if I have a 24-bay server with all bays filled?

  2. How about using NFS instead of SMB? It should be quite a bit faster. Can you guys do a perf comparison between the protocols?

  3. Andrew:

    Have the design with residency in software defined storage is a key element. For example, if the server has 24 bays, then I assume OS will take 2 of them (mirror) and you will have 22 bays available. If this is in a datacenter, then one or two spare drive will be highly recommended. (no different than standard RAID configuration)

    Software defined storage does free us from traditional storage vendors but we need to follow some of the best practice.

    Hopefully this helps.

  4. Scott:

    In the Windows environment, RDMA based SMB 3 has the best performance. NFS is not quite there yet. In a none Windows environment, it will be an interesting comparison. There is RDMA support for NFS, instead of SMB maybe block based iSER.

  5. I’d typically want to run at least one hot spare, but lets try another tack – 8-bay 1U server, boot from internal SATADOM or similar. Two SSDs for cache tier, six spinners in RAID6 for capacity.

    Let’s say I’m running three identical nodes with 3-way mirroring via S2D – sufficient cross-node hardware redundancy that I don’t really want to lose 25% of my capacity tier to a hot spare. With a hardware RAID setup, this isn’t an issue – if a drive fails, I pull the drive and slot in a new one. If Storage Spaces _requires_ that a new drive be installed before the old one can be removed, I’m effectively forced to either run RAID5 with a hot spare, or throw caution to the wind entirely and rely solely on node mirroring to protect against drive failures.

    Not… super helpful. I suppose the question I’d like answered is “will storage spaces throw a hissyfit and trash my entire array if I pull the failed drive and slot in a new one”…

  6. @Andrew:

    This looks like a very good conversation to start at the forum so you could get feedback from the STH community.

  7. The next question for me would be….. “Do not make any changes to the Storage Pool while repair operation is going on.”

    Does that mean no data writes? or does that mean no configuration changes?

  8. @Joswa:

    The normal operation such as data writes are fine, but please be caution of pool configuration changes. It will be a good idea to verify backup status as well.

LEAVE A REPLY

Please enter your comment!
Please enter your name here