Example Redfish REST calls: Create RAID volume

Prerequisites:

  • PowerEdge Gen 14 server (R740, M640, etc)
  • iDRAC 9 with firmware version: 3.21.21.21 or above

Create RAID volume (virtual disk)

Method: POST

URI: https://<idrac ip>/redfish/v1/Systems/System.Embedded.1/Storage/<CONTROLLER>/Volumes

BODY / Payload:

The following is an example of creating a RAID1 (mirror) volume on the RAID.Slot.6-1 controller using two disks (bay 2 and bay 3):

{
    "VolumeType": "Mirrored",
    "Name": "VOL02-R1",
    "Drives": [
        {
            "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Storage/Drives/Disk.Bay.2:Enclosure.Internal.0-1:RAID.Slot.6-1"
        },
        {
            "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Storage/Drives/Disk.Bay.3:Enclosure.Internal.0-1:RAID.Slot.6-1"
        }
    ]
}

For RAID1 the VolumeType is “Mirrored”. For other RAID types please use the below:

  • RAID 0: “NonRedundant”
  • RAID 1: “Mirrored”
  • RAID 5: “StripedWithParity”
  • RAID 10: “SpannedMirrors”
  • RAID 50: “SpannedStripesWithParity”

HTTP status 202 will be returned if creation is successful.

Also see the following scripts on GitHub:

  1. https://github.com/dell/iDRAC-Redfish-Scripting/blob/master/Redfish%20Python/CreateVirtualDiskREDFISH.py
  2. https://github.com/dell/iDRAC-Redfish-Scripting/blob/master/Redfish%20Python/DeleteVirtualDiskREDFISH.py



Example Redfish REST calls: Attach / Detach ISO file

Assumptions:

  • PowerEdge Gen 14 server (R740, M640, etc)
  • iDRAC 9 with firmware version: 3.30.30.30 or above
  • The ISO file is hosted on a web server and can be reached via HTTP

Attach:

Method: POST
URI: https://<idrac_ip_address>/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD/Actions/VirtualMedia.InsertMedia

BODY:

{
     "Image": "http://<web_server>/<iso_file>.iso"
}

Detach

Method: POST
URI: https://<idrac_ip_address>/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD/Actions/VirtualMedia.EjectMedia

BODY:

{}

Yes, for the detach the BODY of the request is an empty pair of curly braces “{}”.

If all goes well, each REST call will return a “204 No Content” in response.

Redfish tutorial videos for beginners

I recently made a collection of videos for people to get started with Redfish on iDRAC using either PowerShell or Python. Hopefully they’ll be helpful for those starting out with the Redfish API on Dell EMC servers (or in general).

For scripts, please refer to the Dell EMC Github page here:

https://github.com/dell/iDRAC-Redfish-Scripting

 

Redfish with Python: Getting started with the environment

Redfish with Python: Basic scripts

Redfish with Python: Modifying server settings with SCP (Server Configuration Profiles)

 

Redfish with PowerShell: Setting up the environment

Redfish with PowerShell: Modifying server settings

Redfish with PowerShell: Modifying server settings with SCP (Server Configuration Profiles)

Redfish Whitepaper

Finally there is a modern replacement for IPMI. There is a new systems management standard called Redfish which is now available on Dell servers in the form of the 2.30.30.30 firmware update for iDRAC and LC. Redfish makes use of a REST API interface and employs JSON as its data format. Now it’s possible for anyone to programmatically control servers via Python or Java and to do so without having to care which brand the server is – yes, it’s vendor neutral. Other vendors will release (or already have released) their own versions, but since it’s a standard the implementations all work the same way.

I was the co-author on a whitepaper for the Redfish API and anyone interested can download the document here.