How to Diagnose Storage Pool Health Problems in Storage Spaces Direct
Here's a rundown on the cmdlets that can help you assess Windows Storage Spaces Direct disk health.
August 30, 2021
![How to Diagnose Storage Pool Health Problems in Storage Spaces Direct How to Diagnose Storage Pool Health Problems in Storage Spaces Direct](https://eu-images.contentstack.com/v3/assets/blt07f68461ccd75245/blt756305b46a37faec/662772a2c9f64f3eef8b407b/storage_20spaces_20direct_204_0.jpg?width=1280&auto=webp&quality=95&format=jpg&disable=upscale)
Although Windows Storage Spaces Direct is generally reliable, things can and sometimes do go wrong. Fortunately, Microsoft supplies some PowerShell cmdlets that you can use to help diagnose the problem.
The first cmdlet that you should know about is Get-StoragePool. You can use this cmdlet to determine whether a storage pool is healthy. You can see what this command looks like in Figure 1.
storage spaces direct 1
Figure 1
This is what happens when you use the Get-StoragePool cmdlet.
As you can see in the figure, my S2D storage pools are healthy, and they have an operational status of OK. Something else that you might have noticed is that IsReadOnly is set to False for each of the storage pools. A storage pool can become flagged as read only for any number of reasons, but PowerShell can give you a bit of insight into the reason. Just use this command:
Get-StoragePool | Select-Object FriendlyName, IsReadOnly, ReadOnlyReason
storage spaces direct 2
Figure 2
PowerShell can give you a reason for a storage pool being read only.
In this case, the Read Only Reason displays as None because the pools have not become read only. If a pool is flagged as read only, it will usually be because an administrator has configured it to be read only. If this is the case, then the ReadOnlyReason column will show a status of “By Policy.” You can see what this looks like in Figure 3.
storage spaces direct 3
Figure 3
The storage pool has become read only as a result of an administrative action.
If you find that your storage pool is read only as a matter of policy, you can usually remove the read-only flag and restore the storage pool to normal operations by using the Set-StoragePool cmdlet. Here is the command for doing so:
Get-StoragePool | Set-StoragePool -IsReadOnly $False
As an alternative, you may have to open the Failover Cluster Manager, select the Pools container, right click on the storage pool and then select the Bring Online command from the shortcut menu. You can see what this looks like in Figure 4.
storage spaces direct 4
Figure 4
Right click on the storage pool within the Failover Cluster Manager and select the Bring Online option from the shortcut menu.
On occasion, a storage pool that has become read only might list the word Starting as its read-only reason. In the vast majority of circumstances, this reflects a temporary condition. It simply means that Storage Spaces Direct is in the process of starting up and that not everything is online just yet. If you check the storage pool again in a few minutes, the Read Only flag will most likely have gone away. It is worth noting, however, that in rare circumstances connectivity issues with disks in the pool can cause a storage pool to get stuck in the Starting state.
The third reason why a storage pool may be listed as read-only is because the pool loses quorum. This essentially means that the storage pool cannot function because too many disks are either off-line or disconnected. When this happens, PowerShell will display a read-only reason of Incomplete.
If you see a reason of Incomplete then it’s a good idea to begin checking to make sure that your disks are still online and available. You can validate the health of both physical and virtual disks through PowerShell by using the Get-PhysicalDisk and Get-VirtualDisk cmdlets.
Interestingly, there is another thing that can happen if the storage pool loses quorum. If the majority of the nodes within the Storage Spaces Direct cluster unexpectedly go off-line, then the Get-StoragePool cmdlet may make it appear as though the storage pools have simply disappeared. If this happens, you should still be able to see the primordial pool, but you won’t be able to see any of the other pools that may exist. You can see what this looks like in Figure 5.
storage spaces direct 5
Figure 5
The complete absence of your storage pools is often an indication that some of your cluster nodes have failed.
As you can see, there are several different things that can cause a storage pool to fall into a read-only state. One last bit of advice that I would give you is that if you have corrected the problem but the storage pool remains in a read-only state, then go ahead and use PowerShell to try to change the state by using this command:
Get-StoragePool | Set-StoragePool -IsReadOnly $False
About the Author
You May Also Like