02-27-2017 09:43 AM
Hi all! Hope everyone is doing well.
Does anyone have a command that will inventory either UCSM, or UCS Central physical server local storage hardware? FlexFlash, SSD, or No Local Storage...?
Or perhaps export a server pool qualification policy...
One of our engineers decided to update some SP's to point to a new SPT that references a local boot policy..., though they did NOT add the required local SD cards... SMDH... Pulling my hair out!
Any help would be GREATLY appreciated!
Cheers!
03-01-2017 02:11 PM
Hi David,
There is not one command that I am aware of that will get all the storage or tell you if there is none. You would have to put something together with UCS PowerTool, UCS Python SDK, or XML API. With PowerTool there are a number of cmdlets that retrieve storage objects. To find all the storage cmdlets, use this PowerShell cmdlet
Get-Command -Module Cisco.UCSManager | Select-String Get-UcsStorage
Get-UcsStorageConnectionDef
Get-UcsStorageConnectionPolicy
Get-UcsStorageController
Get-UcsStorageControllerEp
Get-UcsStorageControllerRef
Get-UcsStorageDrive
Get-UcsStorageEmbeddedStorage
Get-UcsStorageEnclosure
Get-UcsStorageEnclosureCap
Get-UcsStorageEnclosureDiskSlotEp
Get-UcsStorageFcTargetEp
Get-UcsStorageFlexFlashCard
Get-UcsStorageFlexFlashController
Get-UcsStorageFlexFlashDrive
Get-UcsStorageFlexFlashVirtualDrive
Get-UcsStorageHddMotherBoardTempStats
Get-UcsStorageHddMotherBoardTempStatsHist
Get-UcsStorageIniGroup
Get-UcsStorageInitiator
Get-UcsStorageItem
Get-UcsStorageLocalDisk
Get-UcsStorageLocalDiskConfigDef
Get-UcsStorageLocalDiskEp
Get-UcsStorageLocalDiskPartition
Get-UcsStorageLocalDiskSlotEp
Get-UcsStorageLocalLun
Get-UcsStorageLunDisk
Get-UcsStorageMezzFlashLife
Get-UcsStorageNvmeStats
Get-UcsStorageNvmeStatsHist
Get-UcsStorageQualification
Get-UcsStorageRaidBattery
Get-UcsStorageSasLinkDescriptor
Get-UcsStorageSasPort
Get-UcsStorageSasPortDescriptor
Get-UcsStorageSasUpLink
Get-UcsStorageVDMemberEp
Get-UcsStorageVirtualDriveContainer
Get-UcsStorageVirtualDriveEp
Get-UcsStorageVirtualDriveRef
Get-UcsStorageVsanRef
Of course thats a lot of cmdlets, some can be taken off the list right off the bat, like Get-UcsStorageRaidBattery (but a good one to know for monitoring purposes)
Ones to utilize
PowerTool C:\> Get-UcsStorageLocalDisk | Select-Object dn
Dn
--
sys/chassis-1/blade-1/board/storage-SAS-1/disk-1
sys/chassis-1/blade-1/board/storage-SAS-1/disk-2
sys/chassis-1/blade-2/board/storage-SAS-1/disk-1
sys/chassis-1/blade-2/board/storage-SAS-1/disk-2
.
.
.
sys/rack-unit-7/board/storage-SAS-1/disk-2
sys/rack-unit-7/board/storage-SAS-1/disk-3
sys/rack-unit-7/board/storage-SAS-1/disk-4
PowerTool C:\> Get-UcsStorageFlexFlashDrive | Select-Object dn
Dn
--
sys/chassis-1/blade-1/board/storage-flexflash-1/card-2/drive-Drivers
sys/chassis-1/blade-1/board/storage-flexflash-1/card-2/drive-HUU
sys/chassis-1/blade-1/board/storage-flexflash-1/card-2/drive-HV
sys/chassis-1/blade-1/board/storage-flexflash-1/card-2/drive-SCU
sys/chassis-1/blade-2/board/storage-flexflash-1/card-2/drive-Drivers
sys/chassis-1/blade-2/board/storage-flexflash-1/card-2/drive-HUU
sys/chassis-1/blade-2/board/storage-flexflash-1/card-2/drive-HV
sys/chassis-1/blade-2/board/storage-flexflash-1/card-2/drive-SCU
.
.
.
sys/rack-unit-6/board/storage-flexflash-1/card-1/drive-Drivers
sys/rack-unit-6/board/storage-flexflash-1/card-1/drive-HUU
sys/rack-unit-6/board/storage-flexflash-1/card-1/drive-HV
sys/rack-unit-6/board/storage-flexflash-1/card-1/drive-SCU
sys/rack-unit-6/board/storage-flexflash-1/card-2/drive-Drivers
sys/rack-unit-6/board/storage-flexflash-1/card-2/drive-HUU
sys/rack-unit-6/board/storage-flexflash-1/card-2/drive-HV
sys/rack-unit-6/board/storage-flexflash-1/card-2/drive-SCU
sys/rack-unit-7/board/storage-flexflash-1/card-1/drive-Hypervisor
sys/rack-unit-7/board/storage-flexflash-1/card-2/drive-Hypervisor
Hope that helps, of course you could wrap them up in a script and add logic to really pull out just the info that you want.
Regards,
John
07-03-2017 04:04 AM
Thanks John! This will work!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide