dellemc.openmanage.idrac_storage_volume module – Configures the RAID configuration attributes

Note

This module is part of the dellemc.openmanage collection (version 9.2.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.idrac_storage_volume.

New in dellemc.openmanage 9.1.0

Synopsis

  • This module is responsible for configuring the RAID attributes.

Aliases: dellemc_idrac_storage_volume

Requirements

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

  • python >= 3.9.6

Parameters

Parameter

Comments

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

float

Virtual disk size in GB.

controller_id

string

Fully Qualified Device Descriptor (FQDD) of the storage controller, for example ‘RAID.Integrated.1-1’. Controller FQDD is required for create RAID configuration.

disk_cache_policy

string

Disk Cache Policy.

Choices:

  • "Default" ← (default)

  • "Enabled"

  • "Disabled"

idrac_ip

string / required

iDRAC IP Address.

idrac_password

aliases: idrac_pwd

string / required

iDRAC user password.

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

Example: export IDRAC_PASSWORD=password

idrac_port

integer

iDRAC port.

Default: 443

idrac_user

string / required

iDRAC username.

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

Example: export IDRAC_USERNAME=username

job_wait

boolean

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

This is applicable when state is create or delete.

Choices:

  • false

  • true ← (default)

job_wait_timeout

integer

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

This option is applicable when job_wait is true.

Default: 900

media_type

string

Media type.

Choices:

  • "HDD"

  • "SSD"

number_dedicated_hot_spare

integer

Number of Dedicated Hot Spare.

Default: 0

protocol

string

Bus protocol.

Choices:

  • "SAS"

  • "SATA"

  • "PCIE"

raid_init_operation

string

This option represents initialization configuration operation to be performed on the virtual disk.

Choices:

  • "None"

  • "Fast"

raid_reset_config

string

This option represents whether a reset config operation needs to be performed on the RAID controller. Reset Config operation deletes all the virtual disks present on the RAID controller.

Choices:

  • "true"

  • "false" ← (default)

read_cache_policy

string

Read cache policy.

Choices:

  • "NoReadAhead" ← (default)

  • "ReadAhead"

  • "AdaptiveReadAhead"

span_depth

integer

Number of spans in the RAID configuration.

span_depth is required for create and its value depends on volume_type.

Default: 1

span_length

integer

Number of disks in a span.

span_length is required for create and its value depends on volume_type.

Default: 1

state

string

create, performs create volume operation.

delete, performs remove volume operation.

view, returns storage view.

Choices:

  • "create"

  • "delete"

  • "view" ← (default)

stripe_size

integer

Stripe size value to be provided in multiples of 64 * 1024.

Default: 65536

timeout

integer

added in dellemc.openmanage 5.0.0

The socket level timeout in seconds.

Default: 30

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

Fully Qualified Device Descriptor (FQDD) of the virtual disk, for example ‘Disk.virtual.0:RAID.Slot.1-1’. This option is used to get the virtual disk information.

volume_type

string

Provide the the required RAID level.

Choices:

  • "RAID 0" ← (default)

  • "RAID 1"

  • "RAID 5"

  • "RAID 6"

  • "RAID 10"

  • "RAID 50"

  • "RAID 60"

volumes

list / elements=dictionary

A list of virtual disk specific iDRAC attributes. This is applicable for create and delete operations.

For create operation, name and drives are applicable options, other volume options can also be specified.

The drives is a required option for create operation and accepts either location (list of drive slot) or id (list of drive fqdd).

In iDRAC8, there is no pre-validation for the state of drives. The disk ID or slot number of the drive provided may or may not be in Ready state. Enter the disk ID or slot number of the drive that is already in Ready state.

For delete operation, only name option is applicable.

See the examples for more details.

write_cache_policy

string

Write cache policy.

Choices:

  • "WriteThrough" ← (default)

  • "WriteBack"

  • "WriteBackForce"

Notes

Note

  • Run this module from a system that has direct access to Integrated Dell Remote Access Controller.

  • This module supports both IPv4 and IPv6 address for idrac_ip.

  • This module supports check_mode.

  • This module does not display the controller battery details for the view operation of the storage in iDRAC8.

Examples

---
- name: Create single volume
  dellemc.openmanage.idrac_storage_volume:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "create"
    controller_id: "RAID.Slot.1-1"
    volumes:
      - drives:
        location: [5]

- name: Create multiple volume
  dellemc.openmanage.idrac_storage_volume:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    raid_reset_config: "True"
    state: "create"
    controller_id: "RAID.Slot.1-1"
    volume_type: "RAID 1"
    span_depth: 1
    span_length: 2
    number_dedicated_hot_spare: 1
    disk_cache_policy: "Enabled"
    write_cache_policy: "WriteBackForce"
    read_cache_policy: "ReadAhead"
    stripe_size: 65536
    capacity: 100
    raid_init_operation: "Fast"
    volumes:
      - name: "volume_1"
        drives:
          id: ["Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1", "Disk.Bay.2:Enclosure.Internal.0-1:RAID.Slot.1-1"]
      - name: "volume_2"
        volume_type: "RAID 5"
        span_length: 3
        span_depth: 1
        drives:
          location: [7, 3, 5]
        disk_cache_policy: "Disabled"
        write_cache_policy: "WriteBack"
        read_cache_policy: "NoReadAhead"
        stripe_size: 131072
        capacity: "200"
        raid_init_operation: "None"

- name: View all volume details
  dellemc.openmanage.idrac_storage_volume:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "view"

- name: View specific volume details
  dellemc.openmanage.idrac_storage_volume:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "view"
    controller_id: "RAID.Slot.1-1"
    volume_id: "Disk.Virtual.0:RAID.Slot.1-1"

- name: Delete single volume
  dellemc.openmanage.idrac_storage_volume:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "delete"
    volumes:
      - name: "volume_1"

- name: Delete multiple volume
  dellemc.openmanage.idrac_storage_volume:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "delete"
    volumes:
      - name: "volume_1"
      - name: "volume_2"

Return Values

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

Key

Description

error_info

dictionary

Details of the HTTP Error.

Returned: on HTTP error

Sample: {"error": {"@Message.ExtendedInfo": [{"Message": "Unable to process the request because an error occurred.", "MessageArgs": [], "MessageId": "GEN1234", "RelatedProperties": [], "Resolution": "Retry the operation. If the issue persists, contact your system administrator.", "Severity": "Critical"}], "code": "Base.1.0.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 completed the view storage volume operation"

storage_status

dictionary

Storage configuration job and progress details from the iDRAC.

Returned: success

Sample: {"Id": "JID_XXXXXXXXX", "JobState": "Completed", "JobType": "ImportConfiguration", "Message": "Successfully imported and applied Server Configuration Profile.", "MessageId": "XXX123", "Name": "Import Configuration", "PercentComplete": 100, "StartTime": "TIME_NOW", "TargetSettingsURI": null}

Authors

  • Felix Stephen (@felixs88)

  • Kritika Bhateja (@Kritika-Bhateja-03)

  • Abhishek Sinha(@ABHISHEK-SINHA10)