Removing a disk from Storage Pool is hanging, why?

Find out the right way to replace a disk in a Storage Pool

John Savill

August 4, 2016

3 Min Read
Removing a disk from Storage Pool is hanging, why?

Q. I'm trying to remove a disk in my Storage Pool that I've replaced with another but it is hanging, why?
Dept - File Systems

A. Storage Spaces is present in both the client and server versions of Windows. You likely have the Storage Space (virtual disk) using Mirroring which means every block of data on one disk is also written to another disk. If you want to replace a disk you would shutdown the machine, replace the disk with a new disk then in Storage Spaces control panel applet add the new disk into the pool at which point Storage Spaces will use the disk as a replacement for the old and the option to remove the old disk will become available however when you do the Remove action it will just stay hung as shown.

The reason for this is that behind the scenes even though you have replaced the disk the repair process which triggers a regeneration action that has to copy all the blocks to the new disk has not completed. You will be able to see this if you run the PowerShell Get-StorageJob cmdlet.

PS C:WINDOWSsystem32> get-storagejobName     ElapsedTime JobState PercentComplete IsBackgroundTask----     ----------- -------- --------------- ----------------Repair       03:26:57    Running  60          FalseRegeneration 03:27:00    Running  60          True

Until the regeneration and repair is complete you cannot remove the disk which is why the removal appears to hang. I actually prefer to perform the whole process using PowerShell instead of the Storage Spaces control panel applet. For example I view the storage pools, add my new disk to the pool, make the old disk as retired and trigger a repair. Once the repair is complete I remove the disk. If you are unsure of the serial number of the virtual disk to add run the Get-PhysicalDisk cmdlet.

PS C:WINDOWSsystem32> Get-StoragePoolFriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly------------ ----------------- ------------ ------------ ----------Primordial   OK        Healthy      True     False     Storage pool OK        Healthy      False    False    PS C:WINDOWSsystem32> Get-StoragePool -FriendlyName "Storage Pool" | Add-PhysicalDisk -PhysicalDisks (Get-PhysicalDisk -SerialNumber WD-WX11D26H4PJX)PS C:WINDOWSsystem32> Get-PhysicalDiskFriendlyName       SerialNumber     CanPool OperationalStatus  HealthStatus Usage        Size------------       ------------     ------- -----------------  ------------ -----        ----WDC WD6001FZWX-00A2VA0 WD-WX11D26H4E14      False   OK         Healthy      Auto-Select   5.46 TBNVMe Samsung SSD 950   1E15_B061_5338_2500. False   OK         Healthy      Auto-Select 476.94 GBWDC WD60EFRX-68MYMN1            False   Lost Communication Warning      Auto-Select   5.46 TBWDC WD6001FZWX-00A2VA0 WD-WX11D26H4PJX      False   OK         Healthy      Auto-Select   5.46 TBPS C:WINDOWSsystem32> Set-PhysicalDisk -FriendlyName "WDC WD60EFRX-68MYMN1" -Usage RetiredPS C:WINDOWSsystem32> Get-StorageJobName        ElapsedTime JobState  PercentComplete IsBackgroundTask----        ----------- --------  --------------- ----------------AddPhysicalDisk 00:00:00    Completed 100         False       Repair      00:00:00    Completed 100         False       PS C:WINDOWSsystem32> Get-VirtualDiskFriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach    Size------------ --------------------- ----------------- ------------ --------------    ----Data     Mirror        Incomplete    Warning      False      5.45 TBPS C:WINDOWSsystem32> Repair-VirtualDisk -FriendlyName DataPS C:WINDOWSsystem32> get-storagejobName     ElapsedTime JobState PercentComplete IsBackgroundTask----     ----------- -------- --------------- ----------------Repair       04:52:51    Running  82          FalseRegeneration 04:52:53    Running  82          TruePS C:WINDOWSsystem32> Remove-PhysicalDisk -PhysicalDisks (Get-PhysicalDisk -FriendlyName "WDC WD60EFRX-68MYMN1") -StoragePoolFriendlyName "Storage Pool"PS C:WINDOWSsystem32> Get-PhysicalDiskFriendlyName     SerialNumber     CanPool OperationalStatus HealthStatus Usage        Size------------     ------------     ------- ----------------- ------------ -----        ----WD6001FZWX Top       WD-WX11D26H4E14      False   OK        Healthy      Auto-Select   5.46 TBNVMe Samsung SSD 950 1E15_B061_5338_2500. False   OK        Healthy      Auto-Select 476.94 GBWD6001FZWX Bottom    WD-WX11D26H4PJX      False   OK        Healthy      Auto-Select   5.46 TB

Note that the removal uses the friendly name. If you have multiple disks with the SAME friendly name then change the friendly name of the disks still present in the system via the serial number. For example below I view the disks then change the friendly name using the serial number. Note I CANNOT do this on a removed disk sinces its serial number is not available:

PS C:WINDOWSsystem32> get-physicaldiskFriendlyName       SerialNumber     CanPool OperationalStatus  HealthStatus Usage        Size------------       ------------     ------- -----------------  ------------ -----        ----WDC WD6001FZWX-00A2VA0 WD-WX11D26H4E14      False   OK         Healthy      Auto-Select   5.46 TBNVMe Samsung SSD 950   1E15_B061_5338_2500. False   OK         Healthy      Auto-Select 476.94 GBWDC WD60EFRX-68MYMN1            False   Lost Communication Warning      Retired       5.46 TBWDC WD6001FZWX-00A2VA0 WD-WX11D26H4PJX      False   OK         Healthy      Auto-Select   5.46 TBPS C:WINDOWSsystem32> get-physicaldisk -serialnumber WD-WX11D26H4E14 | set-physicaldisk -NewFriendlyName "WD6001FZWX Top"PS C:WINDOWSsystem32> get-physicaldiskFriendlyName       SerialNumber     CanPool OperationalStatus  HealthStatus Usage        Size------------       ------------     ------- -----------------  ------------ -----        ----WD6001FZWX Top     WD-WX11D26H4E14      False   OK         Healthy      Auto-Select   5.46 TBNVMe Samsung SSD 950   1E15_B061_5338_2500. False   OK         Healthy      Auto-Select 476.94 GBWDC WD60EFRX-68MYMN1            False   Lost Communication Warning      Retired       5.46 TBWDC WD6001FZWX-00A2VA0 WD-WX11D26H4PJX      False   OK         Healthy      Auto-Select   5.46 TB

 

 

 

 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like