< Back
Set-iBMCDrive
Post
NAME Set-iBMCDrive
SYNOPSIS
Modify properties of the specified drive of a server.
SYNTAX
Set-iBMCDrive [-Session] <RedfishSession[]> [-DriveId] <String[]> [[-State] {Online | Offline | UnconfiguredGood |
UnconfigureBad | JBOD}] [[-LEDState] {Off | Blinking}] [[-HotSpareType] {None | Global | Dedicated}] [[-VolumeId]
<String[]>] [<CommonParameters>]
DESCRIPTION
Modify properties of the specified drive of a server.
PARAMETERS
-Session <RedfishSession[]>
iBMC redfish session object which is created by Connect-iBMC cmdlet.
A session object identifies an iBMC server to which this cmdlet will be executed.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-DriveId <String[]>
Indicates the identifier of the drive to modify.
The Id properties of "Get-iBMCDrives" cmdlet's return value represents Drive ID.
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-State
Indicates the state of a drive.
NOTE: Before setting the drive status to JBOD, need to enable JBOD for the RAID controller first.
Drive state can be alternated between the following status:
- Online and Offline
- UnconfiguredGood and JBOD
- UnconfigureBad and UnconfiguredGood
Required? false
Position? 3
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-LEDState
Indicates the location indicator state of a drive.
Support value set: Off, Blinking.
Required? false
Position? 4
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-HotSpareType
Indicates the hot spare state of a drive.
Support value set: None, Global, Dedicated.
Required? false
Position? 5
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-VolumeId <String[]>
Indicates the ID of the associated volume if the drive is a dedicated hot spare drive.
The Id properties of "Get-iBMCLogicDrive" cmdlet's return value represents volume ID, example: LogicalDrive.
NOTE:
- When HotSpareType is None or Global, VolumeId is redundant.
- When HotSpareType is Dedicated, VolumeId is mandatory.
Required? false
Position? 6
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Null
Returns null if cmdlet executes successfully.
In case of an error or warning, exception will be returned.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $Session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Set-iBMCDrive -Session $session -DriveId HDDPlaneDisk0 -State JBOD
This example shows how to set drive's state to "JBOD"
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $Session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Set-iBMCDrive -Session $session -DriveId HDDPlaneDisk0 -LEDState Blinking
This example shows how to blinking drive's led
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $Session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Set-iBMCDrive -Session $session -DriveId HDDPlaneDisk0 -HotSpareType Dedicated -VolumeId LogicalDrive0
This example shows how to set drive's hot-spare type to "Dedicated" to volume "LogicalDrive0"
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $Session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Set-iBMCDrive -Session $session -DriveId HDDPlaneDisk0 -HotSpareType Global
This example shows how to set drive's hot-spare type to "Global"
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $Session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Set-iBMCDrive -Session $session -DriveId HDDPlaneDisk0 -HotSpareType None
This example shows how to set drive's hot-spare type to "None"
RELATED LINKS
https://github.com/Huawei/Huawei-iBMC-Cmdlets
Get-iBMCDrives
Get-iBMCDrivesHealth
Connect-iBMC
Disconnect-iBMC
SYNOPSIS
Modify properties of the specified drive of a server.
SYNTAX
Set-iBMCDrive [-Session] <RedfishSession[]> [-DriveId] <String[]> [[-State] {Online | Offline | UnconfiguredGood |
UnconfigureBad | JBOD}] [[-LEDState] {Off | Blinking}] [[-HotSpareType] {None | Global | Dedicated}] [[-VolumeId]
<String[]>] [<CommonParameters>]
DESCRIPTION
Modify properties of the specified drive of a server.
PARAMETERS
-Session <RedfishSession[]>
iBMC redfish session object which is created by Connect-iBMC cmdlet.
A session object identifies an iBMC server to which this cmdlet will be executed.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-DriveId <String[]>
Indicates the identifier of the drive to modify.
The Id properties of "Get-iBMCDrives" cmdlet's return value represents Drive ID.
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-State
Indicates the state of a drive.
NOTE: Before setting the drive status to JBOD, need to enable JBOD for the RAID controller first.
Drive state can be alternated between the following status:
- Online and Offline
- UnconfiguredGood and JBOD
- UnconfigureBad and UnconfiguredGood
Required? false
Position? 3
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-LEDState
Indicates the location indicator state of a drive.
Support value set: Off, Blinking.
Required? false
Position? 4
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-HotSpareType
Indicates the hot spare state of a drive.
Support value set: None, Global, Dedicated.
Required? false
Position? 5
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-VolumeId <String[]>
Indicates the ID of the associated volume if the drive is a dedicated hot spare drive.
The Id properties of "Get-iBMCLogicDrive" cmdlet's return value represents volume ID, example: LogicalDrive.
NOTE:
- When HotSpareType is None or Global, VolumeId is redundant.
- When HotSpareType is Dedicated, VolumeId is mandatory.
Required? false
Position? 6
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Null
Returns null if cmdlet executes successfully.
In case of an error or warning, exception will be returned.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $Session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Set-iBMCDrive -Session $session -DriveId HDDPlaneDisk0 -State JBOD
This example shows how to set drive's state to "JBOD"
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $Session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Set-iBMCDrive -Session $session -DriveId HDDPlaneDisk0 -LEDState Blinking
This example shows how to blinking drive's led
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $Session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Set-iBMCDrive -Session $session -DriveId HDDPlaneDisk0 -HotSpareType Dedicated -VolumeId LogicalDrive0
This example shows how to set drive's hot-spare type to "Dedicated" to volume "LogicalDrive0"
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $Session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Set-iBMCDrive -Session $session -DriveId HDDPlaneDisk0 -HotSpareType Global
This example shows how to set drive's hot-spare type to "Global"
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $Session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> Set-iBMCDrive -Session $session -DriveId HDDPlaneDisk0 -HotSpareType None
This example shows how to set drive's hot-spare type to "None"
RELATED LINKS
https://github.com/Huawei/Huawei-iBMC-Cmdlets
Get-iBMCDrives
Get-iBMCDrivesHealth
Connect-iBMC
Disconnect-iBMC