Operation
Use a PowerShell session as an administrator
Replace disk of storage pool
# check friendly name to add and delete
Get-PhysicalDisk -CanPool $True
$PDToAdd = Get-PhysicalDisk -FriendlyName $name
Add-PhysicalDisk -StoragePoolFriendlyName $poolname -PhysicalDisks $PDToAdd
Set-PhysicalDisk –FeiendlyName $name –Usage Retired
Repair-VirtualDisk -FriendlyName $vdiskname -Asjob
Then, a repair operation will run on the background. You can find the progress of jobs by Get-StorageJob.
PS C:\>Get-StorageJob
Name ElapsedTime JobState PercentComplete IsBackgroundTask
---- ----------- -------- --------------- ----------------
Regeneration 00:00:00 Running 50 True
After the repair operation will complete and the virtual disk status will become “Healthy”, the retired physical disk can be removed from the storage pool.
$PDToRemove = Get-PhysicalDisk -Friendlyname $name
Remove-PhysicalDisk -StoragePoolFriendlyName $poolname -PhysicalDisks $PDToRemove
Fix physical disk state OperationalStatus = Split
see Drive (physical disk) states
Reset-PhysicalDisk -FriendlyName $name
Repair-VirtualDisk -FriendlyName $vdiskname
Enable auto attach of virtual disks
Get-VirtualDisk | Set-VirtualDisk -ismanualattach $false
PowerShell Commands
- list physical disks
Get-PhysicalDisk Get-StoragePool -FrindlyName $poolname | Get-PhysicalDisk
- list virtual disks
Get-VirtualDisk
- list background storage jobs
Get-Storagejob