Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

How Can I Replace a Failed Physical Disk on Storage Spaces Direct in Windows Server 2016?

  • February 22, 2018
  • 7 min read
IT and Virtualization Consultant. Dmitriy is specializing in Microsoft technologies, with a focus on storage, networking, and IT infrastructure architecture.
IT and Virtualization Consultant. Dmitriy is specializing in Microsoft technologies, with a focus on storage, networking, and IT infrastructure architecture.

First, just a few words about Storage Spaces Direct (S2D) fault tolerance levels. S2D allows building a mirrored spaces array. There are two flavors of mirroring: “two-way” and “three-way” mirroring. The former, tolerates one hardware failure (drive or server) at a time, while the latter can withstand two hardware problems (drive or server).Two-way mirroring creates two copies of data. Its storage efficiency reaches 50% – to write 1TB you need 2TB of storage. Three-way mirror, in its turn, keeps three copies of everything. It is 33 % efficient (you need 3 TB storage to write 1TB of data). There are also other options (parity, mirror-accelerated parity, etc.), but I’m not here to talk about S2D fault tolerance levels, and moreover, Microsoft recommends using just mirroring for most performance-sensitive workloads. So, if you want to learn more, just look through materials Microsoft has on this topic.

But what exactly should you do to resolve the failed disk problem?

First, let’s find that guy

If your disk goes into “Unhealthy” state and has the transient error status, that may be the high time to replace it. Type the following command to check cluster health:

Malfunction of a single disk is displayed in Failover Cluster Manager (access by Storage -> Pools) just as in the screenshot below.

Pools

Also, you can gain all the necessary information about the storage pool health using PowerShell:

You can gain all the necessary information about the storage pool health using PowerShell

Next, to manipulate the disk, add the physical disk object as a PowerShell variable. For that purpose, use:

Add the physical disk object as a PowerShell variable

Retire and pinpoint the disk physically

Now, let’s stop any write operations on the disk to prevent possible data loss. Run:

Enclosures

Remove the failed disk from the storage pool with the following cmdlet:

There may be the warning, telling that the device is not responding. Well, but did you expect something else?

In order to identify that disk quickly, turn on its LED:

Note: You can switch on LEDs only in Windows Server 2016. The physical server, in its turn, should support SES Enclosure Storage protocol.

Now, have a walk to the server room, and find the failed disk. Obviously, it will be the only one that has its LED on.

You can switch on LEDs only in Windows Server 2016

Once you replace it, don’t forget to switch off the LED:

Add the disk to the storage pool

If you connect a new disk, don’t forget to initialize it. Make sure the disk is online and formatted as GPT. Now, check whether OS has detected the disk as suitable for joining the S2D pool. Type the following cmdlet for that purpose:

Add the disk to the storage pool

Note: Sometimes you may need to reboot the server to ensure the proper disk identification.

Add the new disk to the pool with the following command:

Add the new disk to the pool with the following command

Afterwards, S2D spreads data automatically across all disks. In order to check the progress of rebalancing run the following command:

Well, that’s it!

Conclusion

As you can see, changing a failed physical disk on Storage Spaces Direct in Windows Server 2016 is usually not a big deal but needs some decent PowerShell skills. Fortunately, Microsoft makes it fairly simple in S2D with only three steps: set it physically as retired, remove it from your server, and join the new one. Enjoy!

Hey! Found Dmitriy’s article helpful? Looking to deploy a new, easy-to-manage, and cost-effective hyperconverged infrastructure?
Alex Bykovskyi
Alex Bykovskyi StarWind Virtual HCI Appliance Product Manager
Well, we can help you with this one! Building a new hyperconverged environment is a breeze with StarWind Virtual HCI Appliance (VHCA). It’s a complete hyperconverged infrastructure solution that combines hypervisor (vSphere, Hyper-V, Proxmox, or our custom version of KVM), software-defined storage (StarWind VSAN), and streamlined management tools. Interested in diving deeper into VHCA’s capabilities and features? Book your StarWind Virtual HCI Appliance demo today!