Last active
September 6, 2021 20:37
-
-
Save mczerniawski/2cab3e52f745d932461034d428521a80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$disks=Get-PhysicalDisk | where {$_.operationalstatus -eq 'Transient Error'} | |
#Set disks to retired state | |
$disks | Select-Object UniqueId | ForEach-Object { | |
Set-PhysicalDisk -UniqueId $PSItem.UniqueId -Usage Retired | |
} | |
#remove disks from pool | |
$disks | ForEach-Object { | |
Remove-PhysicalDisk -PhysicalDisks $PSItem -StoragePoolFriendlyName 'S2D on HVCL0' -Confirm:$false | |
} | |
Get-PhysicalDisk -CanPool $true | ForEach-Object{ | |
Add-PhysicalDisk -StoragePool 'S2D on HVCL0' -PhysicalDisks $PSItem | |
} | |
#add all nvme drives to the pool (wasn't added before) | |
Add-PhysicalDisk -PhysicalDisks (Get-PhysicalDisk -CanPool $True) -StoragePoolFriendlyName 'S2D on HVCL0' | |
#set nvme as journal | |
Set-PhysicalDisk -FriendlyName 'NVMe INTEL SSDPECME02' -Usage Journal | |
#verify | |
Get-PhysicalDisk -FriendlyName 'NVMe INTEL SSDPECME02' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment