Storage Spaces Virtual Disk Monitor

Microsoft.SystemCenter.OperationsManager.Storage.StorageSpacesMonitor (UnitMonitor)

Storage spaces file share monitor based on virtual disk health

Knowledge Base article:

Summary

Storage Spaces File Share Virtual Disk Monitor generates an alert when the health of a virtual disk is unhealthy.

Causes

A virtual disk is spread out over several of the physical disks within a storage pool. If one or more of the physical disks associated with a virtual disk go unhealthy, attempts to rebuild data are made by reallocating data to other healthy disks. If that attempt fails due to a lack of free capacity or for any other reason, the virtual disk may become unhealthy.

Resolutions

In order to restore the health of your virtual disk, replace physical disks within the storage pool of this virtual disk which have failed, or add extra capacity to the storage pool. In order determine which physical disks in the storage pool are unhealthy, use the following PowerShell cmdlets, examples of which are shown below:

Remove disk from storage pool:

$storagePool = Get-VirtualDisk -FriendlyName "VirtualDiskName" | Get-StoragePool

Get unhealthy physical disks:

Get-PhysicalDisk –StoragePool $storagePool | Where-Object –FilterScript {$_.HealthStatus –ne “Healthy”}

Run below cmdlets for each unhealthy physical disk:

$PDToRemove = Get-PhysicalDisk –FriendlyName “PhysicalDiskName”

Remove-PhysicalDisk -PhysicalDisks $PDToRemove -StoragePool $storagePool

Add disk to storage pool:

$storagePool = Get-VirtualDisk -FriendlyName "VirtualDiskName" | Get-StoragePool

$PDToAdd = Get-PhysicalDisk -FriendlyName PhysicalDisk5

Add-PhysicalDisk -PhysicalDisks $PDToAdd –StoragePool $storagePool

Element properties:

TargetMicrosoft.SystemCenter.VirtualMachineManager.Storage.FileShare.Base
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.StorageSpaces.EventWatcher.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Storage Spaces Virtual Disk Unhealthy
The Storage Spaces Virtual Disk with Unique ID {0} hosting this file share is unhealthy. This can happen when a physical disk hosting the virtual disk fails, is disconnected, or experiences a write error. If this is a warning alert an automatic repair of the virtual disk will be attempted by Storage Spaces. This alert should be automatically resolved if the repair is successful and no further action is necessary. If this is a critical alert the automatic repair by Storage Spaces has failed and any physical hardware failures of disks or enclosures should be resolved with urgency.
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.OperationsManager.Storage.StorageSpacesMonitor" Accessibility="Public" Enabled="true" Target="SL!Microsoft.SystemCenter.VirtualMachineManager.Storage.FileShare.Base" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Microsoft.SystemCenter.StorageSpaces.EventWatcher.MonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.OperationsManager.Storage.StorageSpacesMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='VirtualDiskUniqueId']$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="SpacesHealthy" MonitorTypeStateID="Success" HealthState="Success"/>
<OperationalState ID="SpacesUnhealthy" MonitorTypeStateID="Warning" HealthState="Warning"/>
<OperationalState ID="SpacesCritical" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ComputerName>.</ComputerName>
<LogName>Microsoft-Windows-StorageSpaces-Driver/Operational</LogName>
<FileShareId>$Target/Property[Type="SL!Microsoft.SystemCenter.VirtualMachineManager.Storage.FileShare.Base"]/SharePath$</FileShareId>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>