bcthomas.com-scripts icon indicating copy to clipboard operation
bcthomas.com-scripts copied to clipboard

Only considering StorageScaleUnit as Fault Domain Type

Open DarrylvanderPeijl opened this issue 5 years ago • 4 comments

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 avatar Sep 30 '19 08:09 DarrylvanderPeijl

@DarrylvanderPeijl Does a storage node have a type other than StorageScaleUnit?

comnam90 avatar Oct 04 '19 22:10 comnam90

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

comnam90 avatar Oct 04 '19 23:10 comnam90

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.

DarrylvanderPeijl avatar Oct 06 '19 19:10 DarrylvanderPeijl

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.

comnam90 avatar Oct 07 '19 20:10 comnam90