Featured Post

YouTube and link library for S2D.dk

2019/10/09

Retire, Remove, Reset or Add Disk to Storage Pool

Retire, Remove, Reset or Add Disk to Storage Pool


*** Disclaimer ***
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.
For any reference links to other websites we encourages you to read the privacy statements of the third-party websites.
The names of actual companies and products mentioned herein may be the trademarks of their respective owners.
***

Retire, Remove, Reset or Add Disk to Storage Pool

The following are done in a S2D test/demo environment with 6 Cluster Nodes. Each Node have 5 SSDs.


#List the physical disks in a specific Cluster Node
Get-StorageNode -Name S046033.contoso.com | Get-PhysicalDisk -PhysicallyConnected | sort PhysicalLocation | ft SerialNumber, PhysicalLocation, CanPool, Usage

#List more information as Firmware or reason why disk cannot be add to Pool
Get-StorageNode -Name S046033.contoso.com | Get-PhysicalDisk -PhysicallyConnected | sort PhysicalLocation | ft SerialNumber, PhysicalLocation, FirmwareVersion, HealthStatus, CanPool, CannotPoolReason, MediaType

#Retire Disk in Pool
Get-PhysicalDisk -SerialNumber 15291013E527 | Set-PhysicalDisk -Usage Retired

#Remove Disk from Pool
$Disk = Get-PhysicalDisk |? Usage -like Retired
Get-StoragePool *S2D* | Remove-PhysicalDisk -PhysicalDisks $Disk

#Reset Disk
Get-PhysicalDisk -SerialNumber 15291013E527 | Reset-PhysicalDisk

#AutoSelect
Get-PhysicalDisk -SerialNumber 15291013E527 | Set-PhysicalDisk -Usage AutoSelect

#Add Disk to Pool
$Disk = Get-PhysicalDisk |? CanPool -like True
Get-StoragePool *S2D* | Add-PhysicalDisk -PhysicalDisks $Disk

After the Disk is add to the Pool Again the disk show 0%, the optimize will start automatically after a few minutes or you can manually start it:

Optimize Storage Pool manually 
Get-StoragePool
Optimize-StoragePool "S2D on S2D01"
Get-StorageJob | ? JobState -Eq Running

Optimize Volume manually
Get-Volume
Optimize-Volume -FileSystemLabel "vDisk1"
Get-StorageJob | ? JobState -Eq Running