dellemc.openmanage.redfish_storage_volume module – Manages the storage volume configuration

Note

This module is part of the dellemc.openmanage collection (version 8.7.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install dellemc.openmanage. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: dellemc.openmanage.redfish_storage_volume.

New in dellemc.openmanage 2.1.0

Synopsis

  • This module allows to create, modify, initialize, or delete a single storage volume.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.9.6

Parameters

Parameter

Comments

apply_time

string

added in dellemc.openmanage 8.5.0

Apply time of the Volume configuration.

Immediate allows you to apply the volume configuration on the host server immediately and apply the changes. This is applicable for job_wait.

OnReset allows you to apply the changes on the next reboot of the host server.

apply_time has a default value based on the different types of the controller. For example, BOSS-S1 and BOSS-N1 controllers have a default value of apply_time as OnReset, and PERC controllers have a default value of apply_time as Immediate.

Choices:

  • "Immediate"

  • "OnReset"

baseuri

string / required

IP address of the target out-of-band controller. For example- <ipaddress>:<port>.

block_size_bytes

integer

Block size in bytes.Only applicable when state is present.

ca_path

path

added in dellemc.openmanage 5.0.0

The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.

capacity_bytes

string

Volume size in bytes.

Only applicable when state is present.

command

string

initialize initializes an existing storage volume for a specified volume_id.

Choices:

  • "initialize"

controller_id

string

Fully Qualified Device Descriptor (FQDD) of the storage controller.

For example- RAID.Slot.1-1.

This option is mandatory when state is present while creating a volume.

drives

list / elements=string

FQDD of the Physical disks.

For example- Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1.

Only applicable when state is present when creating a new volume.

encrypted

boolean

Indicates whether volume is currently utilizing encryption or not.

Only applicable when state is present.

Choices:

  • false

  • true

encryption_types

string

The following encryption types can be selected.

ControllerAssisted The volume is encrypted by the storage controller entity.

NativeDriveEncryption The volume utilizes the native drive encryption capabilities of the drive hardware.

SoftwareAssisted The volume is encrypted by the software running on the system or the operating system.

Only applicable when state is present.

Choices:

  • "NativeDriveEncryption"

  • "ControllerAssisted"

  • "SoftwareAssisted"

force_reboot

boolean

added in dellemc.openmanage 8.5.0

Reboot the server forcefully to apply the changes when the normal reboot fails.

force_reboot is applicable only when reboot_server is true.

Choices:

  • false ← (default)

  • true

initialize_type

string

Initialization type of existing volume.

Only applicable when command is initialize.

Choices:

  • "Fast" ← (default)

  • "Slow"

job_wait

boolean

added in dellemc.openmanage 8.5.0

This parameter provides the option to wait for the job completion.

This is applicable when apply_time is Immediate.

This is applicable when apply_time is OnReset and reboot_server is true.

Choices:

  • false ← (default)

  • true

job_wait_timeout

integer

added in dellemc.openmanage 8.5.0

This parameter is the maximum wait time of job_wait in seconds.

This option is applicable when job_wait is true.

Default: 1200

name

aliases: volume_name

string

Name of the volume to be created.

Only applicable when state is present.

oem

dictionary

Includes OEM extended payloads.

Only applicable when state is present.

optimum_io_size_bytes

integer

Stripe size value must be in multiples of 64 * 1024.

Only applicable when state is present.

password

string / required

Password of the target out-of-band controller.

If the password is not provided, then the environment variable IDRAC_PASSWORD is used.

Example: export IDRAC_PASSWORD=password

raid_type

string

added in dellemc.openmanage 8.3.0

RAID0 to create a RAID0 type volume.

RAID1 to create a RAID1 type volume.

RAID5 to create a RAID5 type volume.

RAID6 to create a RAID6 type volume.

RAID10 to create a RAID10 type volume.

RAID50 to create a RAID50 type volume.

RAID60 to create a RAID60 type volume.

raid_type is mutually exclusive with volume_type.

Choices:

  • "RAID0"

  • "RAID1"

  • "RAID5"

  • "RAID6"

  • "RAID10"

  • "RAID50"

  • "RAID60"

reboot_server

boolean

added in dellemc.openmanage 8.5.0

Reboot the server to apply the changes.

reboot_server is applicable only when apply_timeout is OnReset or when the default value for the apply time of the controller is OnReset.

Choices:

  • false ← (default)

  • true

state

string

present creates a storage volume for the specified I (controller_id), or modifies the storage volume for the specified I (volume_id). “Note: Modification of an existing volume properties depends on drive and controller capabilities”.

absent deletes the volume for the specified volume_id.

Choices:

  • "present"

  • "absent"

timeout

integer

added in dellemc.openmanage 5.0.0

The socket level timeout in seconds.

Default: 30

username

string / required

Username of the target out-of-band controller.

If the username is not provided, then the environment variable IDRAC_USERNAME is used.

Example: export IDRAC_USERNAME=username

validate_certs

boolean

added in dellemc.openmanage 5.0.0

If false, the SSL certificates will not be validated.

Configure false only on personally controlled sites where self-signed certificates are used.

Prior to collection version 5.0.0, the validate_certs is false by default.

Choices:

  • false

  • true ← (default)

volume_id

string

FQDD of existing volume.

For example- Disk.Virtual.4:RAID.Slot.1-1.

This option is mandatory in the following scenarios,

state is present, when updating a volume.

state is absent, when deleting a volume.

command is initialize, when initializing a volume.

volume_type

string

One of the following volume types must be selected to create a volume.

NonRedundant The volume is a non-redundant storage device.

Mirrored The volume is a mirrored device.

StripedWithParity The volume is a device which uses parity to retain redundant information.

SpannedMirrors The volume is a spanned set of mirrored devices.

SpannedStripesWithParity The volume is a spanned set of devices which uses parity to retain redundant information.

volume_type is mutually exclusive with raid_type.

Choices:

  • "NonRedundant"

  • "Mirrored"

  • "StripedWithParity"

  • "SpannedMirrors"

  • "SpannedStripesWithParity"

Notes

Note

  • Run this module from a system that has direct access to Redfish APIs.

  • This module supports check_mode.

  • This module always reports changes when name and volume_id are not specified. Either name or volume_id is required to support check_mode.

  • This module supports IPv4 and IPv6 addresses.

Examples

---
- name: Create a volume with supported options
  dellemc.openmanage.redfish_storage_volume:
    baseuri: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "present"
    volume_type: "Mirrored"
    name: "VD0"
    controller_id: "RAID.Slot.1-1"
    drives:
      - Disk.Bay.5:Enclosure.Internal.0-1:RAID.Slot.1-1
      - Disk.Bay.6:Enclosure.Internal.0-1:RAID.Slot.1-1
    block_size_bytes: 512
    capacity_bytes: 299439751168
    optimum_io_size_bytes: 65536
    encryption_types: NativeDriveEncryption
    encrypted: true

- name: Create a volume with minimum options
  dellemc.openmanage.redfish_storage_volume:
    baseuri: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "present"
    controller_id: "RAID.Slot.1-1"
    volume_type: "NonRedundant"
    drives:
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1

- name: Create a RAID0 on PERC controller on reset
  dellemc.openmanage.redfish_storage_volume:
    baseuri: "192.168.0.1"
    username: "username"
    password: "password"
    state: "present"
    controller_id: "RAID.Slot.1-1"
    raid_type: "RAID0"
    drives:
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2
    apply_time: OnReset

- name: Create a RAID0 on BOSS controller with restart
  dellemc.openmanage.redfish_storage_volume:
    baseuri: "192.168.0.1"
    username: "username"
    password: "password"
    state: "present"
    controller_id: "RAID.Slot.1-1"
    raid_type: "RAID0"
    drives:
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2
    apply_time: OnReset
    reboot_server: true

- name: Create a RAID0 on BOSS controller with force restart
  dellemc.openmanage.redfish_storage_volume:
    baseuri: "192.168.0.1"
    username: "username"
    password: "password"
    state: "present"
    controller_id: "RAID.Slot.1-1"
    raid_type: "RAID0"
    drives:
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2
    reboot_server: true
    force_reboot: true

- name: Modify a volume's encryption type settings
  dellemc.openmanage.redfish_storage_volume:
    baseuri: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "present"
    volume_id: "Disk.Virtual.5:RAID.Slot.1-1"
    encryption_types: "ControllerAssisted"
    encrypted: true

- name: Delete an existing volume
  dellemc.openmanage.redfish_storage_volume:
    baseuri: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "absent"
    volume_id: "Disk.Virtual.5:RAID.Slot.1-1"

- name: Initialize an existing volume
  dellemc.openmanage.redfish_storage_volume:
    baseuri: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    command: "initialize"
    volume_id: "Disk.Virtual.6:RAID.Slot.1-1"
    initialize_type: "Slow"

- name: Create a RAID6 volume
  dellemc.openmanage.redfish_storage_volume:
    baseuri: "192.168.0.1"
    username: "username"
    password: "password"
    state: "present"
    controller_id: "RAID.Slot.1-1"
    raid_type: "RAID6"
    drives:
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-3
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-4

- name: Create a RAID60 volume
  dellemc.openmanage.redfish_storage_volume:
    baseuri: "192.168.0.1"
    username: "username"
    password: "password"
    state: "present"
    controller_id: "RAID.Slot.1-1"
    raid_type: "RAID60"
    drives:
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-3
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-4
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-5
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-6
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-7
      - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-8

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

error_info

dictionary

Details of a http error.

Returned: on http error

Sample: {"error": {"@Message.ExtendedInfo": [{"Message": "Unable to perform configuration operations because a configuration job for the device already exists.", "MessageArgs": [], "MessageArgs@odata.count": 0, "MessageId": "IDRAC.1.6.STOR023", "RelatedProperties": [], "RelatedProperties@odata.count": 0, "Resolution": "Wait for the current job for the device to complete or cancel the current job before attempting more configuration operations on the device.", "Severity": "Informational"}], "code": "Base.1.2.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information"}}

msg

string

Overall status of the storage configuration operation.

Returned: always

Sample: "Successfully submitted create volume task."

task

dictionary

Returns ID and URI of the created task.

Returned: success

Sample: {"id": "JID_XXXXXXXXXXXXX", "uri": "/redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_XXXXXXXXXXXXX"}

Authors

  • Sajna Shetty(@Sajna-Shetty)

  • Kritika Bhateja(@Kritika-Bhateja-03)