Featured Post

Links library

2018/07/04

Virtual Disks resources are in No Redundancy or Detached status in a Storage Spaces Direct cluster

s2d.dk is not responsible for any errors, or for the results obtained from the use of this information on s2d.dk. All information in this site is provided as "draft notes" and "as is", with no guarantee of completeness, accuracy, timeliness or of the results obtained from the use of this information. Always test in a lab setup, before use any of the information in production environment. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

The following are done in S2D test/demo environment with 4 Cluster Nodes.

The notes shows some of the steps from the Microsoft Support Help
The vDisk4 is Offline/Detached and can not go online
(Conscious actions have been taken to bring the vDisk in this failed state for the Demo)



  1. The vDisk4 is offline (Detached)
  2. Move the Disk to local Host and remove Cluster Share Volume (Local Disk)
  3. Change the Settings for the vDisk to run chkdsk or recovery
  4. Bring the vDisk online (Local Disk)
  5. Check the Scheduler
  6. Start the Scheduler and check that it is running
  7. Check the Storage Job
  8. Check the Virtual Disk Status
    • Each picture show the process of Repair Job
      • Active
      • Stale Metadata
      • Need Realloaction
      • Need Regeneration
      • Regeneration
      • Pending Deletion
  9. After 1 hour and 10 minutes the disk is OK again all 600 Extents are Active
  10. The 3 Way Mirror (3x200 Extents) for more information see the XXX (Link will be added)
  11. Offline the disk (Local Disk)
  12. Change the Settings for the vDisk back (Disable the chkdsk/recovery)
  13. Status before online the disk again after add back to cluster Share Volume
  14. Disk is online again
PowerShell:

Remove-clustersharedvolume -name "vDisk4"
Get-ClusterResource -Name "vDisk4" | Set-ClusterParameter -Name diskrunchkdsk -Value 7
Get-ClusterResource -Name "vDisk4" | Set-ClusterParameter -Name DiskRecoveryAction -Value 1
Start-clusterresource -Name "vDisk4"
Get-ScheduledTask -TaskName "Data Integrity Scan for Crash Recovery"
Get-ScheduledTask -TaskName "Data Integrity Scan for Crash Recovery" | Start-ScheduledTask
Get-ScheduledTask -TaskName "Data Integrity Scan for Crash Recovery"
Stop-clusterresource -Name "vDisk4"
Get-ClusterResource -Name "vDisk4" | Set-ClusterParameter -Name diskrecoveryaction -Value 0
Get-clusterresource "vDisk4" | set-clusterparameter -name diskrunchkdsk -value 0
Add-clustersharedvolume -name "vDisk4"


Monitor the Storage job process:

Get-VirtualDisk "vDisk4"
Get-StorageJob
$VirtualDisk4 = Get-VirtualDisk "vDisk4"
$Extents4 = Get-VirtualDisk "vDisk4" | Get-PhysicalExtent | Where VirtualDiskUniqueId -Eq $VirtualDisk4.UniqueId

$Extents4 | Group OperationalStatus -NoElement



You can also use Get-VirtualDisk | Get-PhysicalExtent to see exactly every extent. For example:


Get-StoragePool S2D* | Get-PhysicalDisk | Sort Model, OperationalStatus
Get-VirtualDisk "vDisk1"
$VirtualDisk = Get-VirtualDisk "vDisk1"
$Extents = Get-VirtualDisk "vDisk1" | Get-PhysicalExtent | Where VirtualDiskUniqueId -Eq $VirtualDisk.UniqueId
$Extents | Group OperationalStatus -NoElement
$Extents | Group Size -NoElement
$Extents | Group CopyNumber -NoElement


Get-VirtualDisk "vDisk1" | Get-PhysicalExtent
(Note: If the size of the vDisk is over 2-3TB the PowerShell can not show the information)