HPE OneView
1751843 Members
5685 Online
108782 Solutions
New Discussion юеВ

Re: Drive Report - Custom Report

 
ServerParrott
Advisor

Drive Report - Custom Report

Hi, 

I have found the inbuilt reports on OneView and the Global Dashboard to be sufficient enough so far, however, due to orders beyond my control, it's become necessary to create a report of what models of drives we have in all of our servers. Now obviously I don't want to click on each server in OneView and go to the hardware view, or even worse, go to every single iLO. 

Is it possible to create a custom report with the drive model/part number information?

If so, how?

Any specific powershell modules to install? 

Any help would be greatly appreciated. 

Thanks

7 REPLIES 7
ServerParrott
Advisor

Re: Drive Report - Custom Report

@ChrisLynch Sorry to tag you directly, any thoughts on this?

ChrisLynch
HPE Pro

Re: Drive Report - Custom Report

There are two requirements:

  1. You need to have HPE OneView 4.20 installed.
  2. Only Gen10 servers can report their drive inventory today.
  3. You can use any REST API client, including PowerShell to get server objects.

The Get-HPOVServer Cmdlet will return the server objects.  However, the returned object will not contain the local storage details.  So, if you have Gen10's, you can do something like:

(Get-HPOVServer | ? model -match 'Gen10' | select -fir 1 | % { sr -uri ($_.uri + '/localStorage' )
 }).Data

Which then returns something similar to:

AdapterType                                   : SmartArray
BackupPowerSourceStatus                       : Present
CacheMemorySizeMiB                            : 1024
CurrentOperatingMode                          : Mixed
EncryptionCryptoOfficerPasswordSet            : False
EncryptionCspTestPassed                       : False
EncryptionEnabled                             : False
EncryptionFwLocked                            : False
EncryptionHasLockedVolumesMissingBootPassword : False
EncryptionMixedVolumesEnabled                 : False
EncryptionSelfTestPassed                      : False
EncryptionStandaloneModeEnabled               : False
ExternalPortCount                             : 0
FirmwareVersion                               : @{Current=}
InternalPortCount                             : 2
Location                                      : Slot 0
LocationFormat                                : PCISlot
Model                                         : EMBEDDED CONTROLLER
Name                                          : HpSmartStorageArrayController
PhysicalDrives                                : {@{BlockSizeBytes=512; CapacityLogicalBlocks=286677120;
                                                CapacityMiB=139264; EncryptedDrive=False; FirmwareVersion=;
                                                Location=1I:1:1; Model=EH0146FCBVL; SerialNumber=SGH101X2RN; Status=},
                                                @{BlockSizeBytes=512; CapacityLogicalBlocks=286677120;
                                                CapacityMiB=139264; EncryptedDrive=False; FirmwareVersion=;
                                                Location=1I:1:2; Model=EH0146FCBVL; SerialNumber=SGH102X2RN; Status=}}
SerialNumber                                  : 0PR0X0E9T0
Status                                        : @{Health=Warning; State=Enabled}

The PhysicalDrives property will contain the drives for that server.  The inventory view is only as current as the last time the server was powered on.


I am an HPE employee

Accept or Kudo

Bruce_Lundeby
Frequent Advisor

Re: Drive Report - Custom Report

I cannot talk about product futures, but you might keep a lookout for features in Global Dashboard in the very near future.

ServerParrott
Advisor

Re: Drive Report - Custom Report

Hi Chris! Thanks for the reply! We do have a few G10's knocking around so this is helpful!

Thanks! 

ServerParrott
Advisor

Re: Drive Report - Custom Report

Sounds intriguing Bruce! Will do. Thanks.

ric9887
New Member

Re: Drive Report - Custom Report

These Powershell scripts produce a useful CSV of HDD/SSD s/n's from OV or just through ILO connectivity for Gen 10's.

https://github.com/HewlettPackard/oneview-powershell-samples/tree/master/OneView-Inventory-SAS-SSD

Am hoping this fuctionality will be added into OV reporting at some point.

Johannes_we
Frequent Advisor

Re: Drive Report - Custom Report

For anyone out there looking for a way to acheive this using PowerShell

 

$servers = (Get-OVServer | ? generation -like 'Gen1*' )

$list = foreach($server in $servers)
{
	Get-RSOVServerDiskInfo -Server $server
}

function Get-RSOVServerDiskInfo
{
	Param( $Server)

	foreach($disk in (Send-OVRequest -uri ($server.uri + '/localStorage' )).Data.PhysicalDrives)
	{
		$item = "" | select Name,Disk,Firmware,CapacityGB,Location,Health
		$item.Name = $server.name
		$item.Disk = $disk.model
		$item.Firmware = $disk.firmwareversion.current.VersionString
		$item.Location = $disk.location
		$item.CapacityGB = $disk.CapacityGB
		$item.Health = $disk.status.health
		$item
	}
}