#Physical drive location

1 messages · Page 1 of 1 (latest)

graceful bane
#

I'm curious how you can map the physical location (shelf, drawer, bay) to a system using 'GET /storage-systems/{system-id}/drives' API.

when clicking the drive settings you can see the physical location in the GUI however the API does not present the same physical location (you see trayRef, slot and symbolRef. How can you map these back to the physical location showed in the GUI?

grand ice
#

I think you can get most of the info from this part.

"physicalLocation": {
  "trayRef": "0E500A098AFC8E20000000000000000000000000",
  "slot": 14,
  "locationParent": {
    "refType": "genericTyped",
    "controllerRef": null,
    "symbolRef": null,
    "typedReference": {
      "componentType": "drawer",
      "symbolRef": "2900500A098AFC8E200002000000000000000000"
    }
  },
  "locationPosition": 2,
  "label": "1"

First, you can see that this is a drawer type shelf and we know that it has twelve disks per drawer. The slot mentioned is 14, so based on that we know that the disk is in the second drawer. LocationPosition then tells you the physical location, but we also print out 1 for label (since we start counting at 0). The thing that remains then is to find the shelf number in case you have multiple shelves. The only way I know how to do that is through '/devmgr/v2/storage-systems/{system-id}/hardware-inventory' where you have a 'trays' section. There you should be able to match the trayRef with trayId.

        "type": "de460c",
        "orientation": "horizontal",
        "numControllerSlots": 0,
        "numDriveSlots": 60,
        "trayId": 3,
        "trayRef": "0E500A098AFC8E20000000000000000000000000",

In all honesty, I think you can get all of the information straight from '/devmgr/v2/storage-systems/{system-id}/hardware-inventory' in case you want to limit the number of API calls.