HPE OneView
1822712 Members
3848 Online
109644 Solutions
New Discussion

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

14 REPLIES 14
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=confidential info erased; 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 work at HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
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
	}
}
NJK-Work1
Advisor

Re: Drive Report - Custom Report

Is there an updated version of this script that supports the Gen11 model?  The "Data" property for localstorage at that URI is blank for all Gen11 servers that I tested.  The Gen10 servers, it works great...but Ge11 I get nada.  All our Gen11 servers have SSD drives, whereas the Gen10 servers are all old-school mechanical drives - does that matter?

Thanks.

ChrisLynch
HPE Pro

Re: Drive Report - Custom Report

The data is likely within localStorageV2 endpoint.  The different controllers across Gen10 and Gen11 provide different Redfish endpoints, which in turn is just pass-through data from the iLO. The following modified script should provide what you are looking for:

 

(Get-OVServer | ? generation -like 'Gen1*' ) | ForEach {

	foreach ($disk in (Send-OVRequest -uri ($_.uri + '/localStorageV2' )).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
	}

}

 

I work at HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
NJK-Work1
Advisor

Re: Drive Report - Custom Report

Excellent - I will try it out.  Thank you.

 

NJK-Work1
Advisor

Re: Drive Report - Custom Report

FYI...looks like it is "data.drives" now and not "data.physicaldrives" for the gen11 at the "/localStorageV2" uri.  But, does appears to be working.

Thanks again.

NJK-Work1
Advisor

Re: Drive Report - Custom Report

@ChrisLynch One more question...looks like firmware is not available for the Gen11 version of the data, but I do see something called "Revision".  Would "Revision" represent the same thing as "Firmware"?

Thanks.

ChrisLynch
HPE Pro

Re: Drive Report - Custom Report

Can you provide a sample output from what you get?  I don't have a Gen11 server at the moment to verify.  Keep in mind that the data here is passed-through from the iLO in its native Redfish format.  So any changes to the format and data is controlled by the iLO.

I work at HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
DaveMorris
Occasional Advisor

Re: Drive Report - Custom Report

I have a quick script to pull from OneView. It's a bit rough but works.

You'll need to have a connection open first to OV, then run it.

https://github.com/dmorriselc/hponeview/tree/main