< Back

Get-iBMCDrives

Tue Jan 14, 2020 2:47 am

NAME Get-iBMCDrives



SYNOPSIS

Query information about the drive resource collection of a server.





SYNTAX

Get-iBMCDrives [-Session] <RedfishSession[]> [[-StorageId] <String[]>] [<CommonParameters>]





DESCRIPTION

Query information about the drive resource collection of a server.

This cmdlet works only after BIOS boot is complete when the RAID controller card supports out-of-band management

or after iBMA 2.0 has been installed and started.





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



-StorageId <String[]>

Indicates the identifier of the storage which the drive belongs to.

If StorageId is not provided, will get all drives instead.

The Id properties of "Get-iBMCRAIDControllers" cmdlet's return value represents Storage ID.



Required? false

Position? 2

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

PSObject[][]

Returns an array of PSObject indicates all drive resources 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:\\> $Drives = Get-iBMCDrives -Session $Session

PS C:\\> $Drives



Host : 10.1.1.2

Id : HDDPlaneDisk0

Name : Disk0

Model : MG04ACA400N

Revision : FJ3J

Status : @{State=Enabled; Health=OK}

CapacityBytes : 3999999721472

FailurePredicted : False

Protocol : SATA

MediaType : HDD

Manufacturer : TOSHIBA

SerialNumber : 38DGK77LF77D

CapableSpeedGbs : 6

NegotiatedSpeedGbs : 12

PredictedMediaLifeLeftPercent :

IndicatorLED : Off

HotspareType : None

StatusIndicator : OK

Location : {@{Info=Disk0; InfoFormat=DeviceName}}

DriveID : 0

FirmwareStatus : Online

HoursOfPoweredUp : 6056

PatrolState : DoneOrNotPatrolled

Position : HDDPlane

RebuildProgress :

RebuildState : DoneOrNotRebuilt

SASAddress : {500e004aaaaaaa00, 0000000000000000}

SASSmartInformation :

SATASmartInformation : @{AttributeRevision=; AttributeRevisionNumber=; AttributeItemList=System.Object[]}

SpareforLogicalDrives : {}

TemperatureCelsius : 33

Type : Disk



Host : 10.1.1.2

Id : HDDPlaneDisk1

Name : Disk1

Model : MG04ACA400N

Revision : FJ3J

Status : @{State=Enabled; Health=OK}

CapacityBytes : 3999999721472

FailurePredicted : False

Protocol : SATA

MediaType : HDD

Manufacturer : TOSHIBA

SerialNumber : 38DFK62PF77D

CapableSpeedGbs : 6

NegotiatedSpeedGbs : 12

PredictedMediaLifeLeftPercent :

IndicatorLED : Off

HotspareType : None

StatusIndicator : OK

Location : {@{Info=Disk1; InfoFormat=DeviceName}}

DriveID : 1

FirmwareStatus : UnconfiguredGood

HoursOfPoweredUp : 6058

PatrolState : DoneOrNotPatrolled

Position : HDDPlane

RebuildProgress :

RebuildState : DoneOrNotRebuilt

SASAddress : {500e004aaaaaaa01, 0000000000000000}

SASSmartInformation :

SATASmartInformation : @{AttributeRevision=; AttributeRevisionNumber=; AttributeItemList=System.Object[]}

SpareforLogicalDrives : {}

TemperatureCelsius : 33

Type : Disk



This example shows how to get all drives.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>$credential = Get-Credential



PS C:\\> $Session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert

PS C:\\> $Drives = Get-iBMCDrives -Session $Session -StorageId RAIDStorage0

PS C:\\> $Drives



Host : 10.1.1.2

Id : HDDPlaneDisk0

Name : Disk0

Model : MG04ACA400N

Revision : FJ3J

Status : @{State=Enabled; Health=OK}

CapacityBytes : 3999999721472

FailurePredicted : False

Protocol : SATA

MediaType : HDD

Manufacturer : TOSHIBA

SerialNumber : 38DGK77LF77D

CapableSpeedGbs : 6

NegotiatedSpeedGbs : 12

PredictedMediaLifeLeftPercent :

IndicatorLED : Off

HotspareType : None

StatusIndicator : OK

Location : {@{Info=Disk0; InfoFormat=DeviceName}}

DriveID : 0

FirmwareStatus : Online

HoursOfPoweredUp : 6056

PatrolState : DoneOrNotPatrolled

Position : HDDPlane

RebuildProgress :

RebuildState : DoneOrNotRebuilt

SASAddress : {500e004aaaaaaa00, 0000000000000000}

SASSmartInformation :

SATASmartInformation : @{AttributeRevision=; AttributeRevisionNumber=; AttributeItemList=System.Object[]}

SpareforLogicalDrives : {}

TemperatureCelsius : 33

Type : Disk



This example shows how to get all drives belongs to Storage controller "RAIDStorage0".











RELATED LINKS

https://github.com/Huawei/Huawei-iBMC-Cmdlets



Get-iBMCDrivesHealth

Set-iBMCDrive

Connect-iBMC

Disconnect-iBMC