bcthomas.com-scripts
bcthomas.com-scripts copied to clipboard
Only considering StorageScaleUnit as Fault Domain Type
S2D-Maintenance.ps1 does not consider other fault domain types then 'StorageScaleUnit'
$ScaleUnit = Get-StorageFaultDomain -Type StorageScaleUnit -CimSession $Name | Where-Object { $_.FriendlyName -eq $Name }
@DarrylvanderPeijl Does a storage node have a type other than StorageScaleUnit?
Alternative code would be to put the enclosure related to the storage node into maintenance mode, but that assumes anyone using the script has hardware that supports SES.
Code:
$Enclosure = Get-StorageNode -CimSession $Name | `
Where-Object {$_.Name -ilike "$Name*"} | `
Get-StorageEnclosure -PhysicallyConnected
$Enclosure | Enable-StorageMaintenanceMode
I get what you're saying. In theory, if fault domains is configured as "Rack", you can put all nodes in a rack in maintenance. (and update them all at once) That was what I was targeting.
Ah right, compromise then, I'll build a different command like Enable-S2DFDMaintenance
It'll have a parameter for FaultDomainType like Rack, Enclosure, Site, Etc, and the Name of the Fault Domain they want to put into maintenance mode.