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 insights useful? Looking for a cost-effective, high-performance, and easy-to-use hyperconverged platform?
Taras Shved
Taras Shved StarWind HCI Appliance Product Manager
Look no further! StarWind HCI Appliance (HCA) is a plug-and-play solution that combines compute, storage, networking, and virtualization software into a single easy-to-use hyperconverged platform. It's designed to significantly trim your IT costs and save valuable time. Interested in learning more? Book your StarWind HCA demo now to see it in action!