Context: I am trying to automated a preseeded Linux installation on a Redfish-capable server. Ideally I want to keep this as vendor-agnostic as possible so I can support multiple types of servers (i.e. Dell, HP, Cisco, etc.), but I am working on a Dell R430 (iDRAC 8 with the latest firmware).
Description: I'm trying to find some reliable way to take information on a storage volume from Redfish and map this to a block device that Linux can understand so I can tell my installer what device to install to.
Example: I take two drives and using Redfish create myself a RAID-1 array. I now have this "Volume" object:
{
"@Redfish.Settings": {
"@odata.context": "/redfish/v1/$metadata#Settings.Settings",
"@odata.type": "#Settings.v1_1_0.Settings",
"SettingsObject": {
"@odata.id": "/redfish/v1/Systems/System.Embedded.1/Storage/Volumes/Disk.Virtual.0:RAID.Integrated.1-1/Settings"
},
"SupportedApplyTimes": [
"Immediate",
"OnReset",
"AtMaintenanceWindowStart",
"InMaintenanceWindowOnReset"
]
},
"@odata.context": "/redfish/v1/$metadata#Volume.Volume",
"@odata.id": "/redfish/v1/Systems/System.Embedded.1/Storage/Volumes/Disk.Virtual.0:RAID.Integrated.1-1",
"@odata.type": "#Volume.v1_0_3.Volume",
"Actions": {
"#Volume.CheckConsistency": {
"target": "/redfish/v1/Systems/System.Embedded.1/Storage/Volumes/Disk.Virtual.0:RAID.Integrated.1-1/Actions/Volume.CheckConsistency"
},
"#Volume.Initialize": {
"[email protected]": [
"Fast",
"Slow"
],
"target": "/redfish/v1/Systems/System.Embedded.1/Storage/Volumes/Disk.Virtual.0:RAID.Integrated.1-1/Actions/Volume.Initialize"
}
},
"BlockSizeBytes": 512,
"CapacityBytes": 199447543808,
"Description": "Virtual Disk 0",
"Encrypted": false,
"EncryptionTypes": [
"NativeDriveEncryption"
],
"Id": "Disk.Virtual.0:RAID.Integrated.1-1",
"Identifiers": [],
"Links": {
"Drives": [
{
"@odata.id": "/redfish/v1/Systems/System.Embedded.1/Storage/Drives/Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1"
},
{
"@odata.id": "/redfish/v1/Systems/System.Embedded.1/Storage/Drives/Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1"
}
],
"[email protected]": 2
},
"Name": "Virtual Disk 0",
"Operations": [],
"OptimumIOSizeBytes": 65536,
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"VolumeType": "Mirrored"
}
Is there anything here that I can reliably use to figure out what the block device path will be in Linux? In this case, I know it is:
$ lsblk /dev/sdc
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdc 8:32 0 185.8G 0 disk
$ ls -al /dev/disk/by-id/ | grep sdc
scsi-361866da08170ff0026091a95033dd20a
wwn-0x61866da08170ff0026091a95033dd20a
$ ls -al /dev/disk/by-path/ | grep sdc
pci-0000:01:00.0-scsi-0:2:0:0
But so far I see no obvious way to get from the Redfish output to any of those values. Is there perhaps some other identifier on the Linux side that might get me closer so I can work backwards? Or somewhere else in Redfish I can query for the PCIe path? I do know iDRAC 9 can provide PCIe paths at the Chassis level but iDRAC 8 can't, but even then they do not seem to map in any way to these in-Linux paths.
First Edit: I have looked into using various tools on the Linux side to interrogate the RAID controller (megacli, perccli, several wrapper Python scripts to these like megaclisas.py
), but so far nothing here helps with the mapping problem.