dellemc.openmanage.redfish_storage_volume (9.1.0) — module

Manages the storage volume configuration

| "added in version" 2.1.0 of dellemc.openmanage"

Authors: Sajna Shetty(@Sajna-Shetty), Kritika Bhateja(@Kritika-Bhateja-03), Shivam Sharma(@ShivamSh3)

Install collection

Install with ansible-galaxy collection install dellemc.openmanage:==9.1.0


Add to requirements.yml

  collections:
    - name: dellemc.openmanage
      version: 9.1.0

Description

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


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Inputs

    
oem:
    description:
    - Includes OEM extended payloads.
    - Only applicable when I(state) is I(present).
    type: dict

name:
    aliases:
    - volume_name
    description:
    - Name of the volume to be created.
    - Only applicable when I(state) is C(present).
    type: str

state:
    choices:
    - present
    - absent
    description:
    - 'C(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".'
    - C(absent) deletes the volume for the specified I(volume_id).
    type: str

drives:
    description:
    - FQDD of the Physical disks.
    - For example- Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1.
    - Only applicable when I(state) is C(present) when creating a new volume.
    elements: str
    type: list

baseuri:
    description: IP address of the target out-of-band controller. For example- <ipaddress>:<port>.
    required: true
    type: str

ca_path:
    description:
    - The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for
      the validation.
    type: path
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

command:
    choices:
    - initialize
    description:
    - C(initialize) initializes an existing storage volume for a specified I(volume_id).
    type: str

timeout:
    default: 30
    description: The socket level timeout in seconds.
    type: int
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

job_wait:
    default: false
    description:
    - This parameter provides the option to wait for the job completion.
    - This is applicable when I(apply_time) is C(Immediate).
    - This is applicable when I(apply_time) is C(OnReset) and I(reboot_server) is C(true).
    type: bool
    version_added: 8.5.0
    version_added_collection: dellemc.openmanage

password:
    description:
    - Password of the target out-of-band controller.
    - If the password is not provided, then the environment variable C(IDRAC_PASSWORD)
      is used.
    - 'Example: export IDRAC_PASSWORD=password'
    required: true
    type: str

username:
    description:
    - Username of the target out-of-band controller.
    - If the username is not provided, then the environment variable C(IDRAC_USERNAME)
      is used.
    - 'Example: export IDRAC_USERNAME=username'
    required: true
    type: str

encrypted:
    description:
    - Indicates whether volume is currently utilizing encryption or not.
    - Only applicable when I(state) is C(present).
    type: bool

raid_type:
    choices:
    - RAID0
    - RAID1
    - RAID5
    - RAID6
    - RAID10
    - RAID50
    - RAID60
    description:
    - C(RAID0) to create a RAID0 type volume.
    - C(RAID1) to create a RAID1 type volume.
    - C(RAID5) to create a RAID5 type volume.
    - C(RAID6) to create a RAID6 type volume.
    - C(RAID10) to create a RAID10 type volume.
    - C(RAID50) to create a RAID50 type volume.
    - C(RAID60) to create a RAID60 type volume.
    - I(raid_type) is mutually exclusive with I(volume_type).
    type: str
    version_added: 8.3.0
    version_added_collection: dellemc.openmanage

volume_id:
    description:
    - FQDD of existing volume.
    - For example- Disk.Virtual.4:RAID.Slot.1-1.
    - This option is mandatory in the following scenarios,
    - I(state) is C(present), when updating a volume.
    - I(state) is C(absent), when deleting a volume.
    - I(command) is C(initialize), when initializing a volume.
    type: str

apply_time:
    choices:
    - Immediate
    - OnReset
    description:
    - Apply time of the Volume configuration.
    - C(Immediate) allows you to apply the volume configuration on the host server immediately
      and apply the changes. This is applicable for I(job_wait).
    - C(OnReset) allows you to apply the changes on the next reboot of the host server.
    - I(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 I(apply_time)
      as C(OnReset), and PERC controllers have a default value of I(apply_time) as C(Immediate).
    type: str
    version_added: 8.5.0
    version_added_collection: dellemc.openmanage

volume_type:
    choices:
    - NonRedundant
    - Mirrored
    - StripedWithParity
    - SpannedMirrors
    - SpannedStripesWithParity
    description:
    - One of the following volume types must be selected to create a volume.
    - C(NonRedundant) The volume is a non-redundant storage device.
    - C(Mirrored) The volume is a mirrored device.
    - C(StripedWithParity) The volume is a device which uses parity to retain redundant
      information.
    - C(SpannedMirrors) The volume is a spanned set of mirrored devices.
    - C(SpannedStripesWithParity) The volume is a spanned set of devices which uses parity
      to retain redundant information.
    - I(volume_type) is mutually exclusive with I(raid_type).
    type: str

force_reboot:
    default: false
    description:
    - Reboot the server forcefully to apply the changes when the normal reboot fails.
    - I(force_reboot) is applicable only when I(reboot_server) is C(true).
    type: bool
    version_added: 8.5.0
    version_added_collection: dellemc.openmanage

controller_id:
    description:
    - Fully Qualified Device Descriptor (FQDD) of the storage controller.
    - For example- RAID.Slot.1-1.
    - This option is mandatory when I(state) is C(present) while creating a volume.
    type: str

reboot_server:
    default: false
    description:
    - Reboot the server to apply the changes.
    - I(reboot_server) is applicable only when I(apply_timeout) is C(OnReset) or when
      the default value for the apply time of the controller is C(OnReset).
    type: bool
    version_added: 8.5.0
    version_added_collection: dellemc.openmanage

capacity_bytes:
    description:
    - Volume size in bytes.
    - Only applicable when I(state) is C(present).
    type: str

validate_certs:
    default: true
    description:
    - If C(false), the SSL certificates will not be validated.
    - Configure C(false) only on personally controlled sites where self-signed certificates
      are used.
    - Prior to collection version C(5.0.0), the I(validate_certs) is C(false) by default.
    type: bool
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

initialize_type:
    choices:
    - Fast
    - Slow
    default: Fast
    description:
    - Initialization type of existing volume.
    - Only applicable when I(command) is C(initialize).
    type: str

block_size_bytes:
    description:
    - Block size in bytes.Only applicable when I(state) is C(present).
    type: int

encryption_types:
    choices:
    - NativeDriveEncryption
    - ControllerAssisted
    - SoftwareAssisted
    description:
    - The following encryption types can be selected.
    - C(ControllerAssisted) The volume is encrypted by the storage controller entity.
    - C(NativeDriveEncryption) The volume utilizes the native drive encryption capabilities
      of the drive hardware.
    - C(SoftwareAssisted) The volume is encrypted by the software running on the system
      or the operating system.
    - Only applicable when I(state) is C(present).
    type: str

job_wait_timeout:
    default: 1200
    description:
    - This parameter is the maximum wait time of I(job_wait) in seconds.
    - This option is applicable when I(job_wait) is C(true).
    type: int
    version_added: 8.5.0
    version_added_collection: dellemc.openmanage

optimum_io_size_bytes:
    description:
    - Stripe size value must be in multiples of 64 * 1024.
    - Only applicable when I(state) is C(present).
    type: int

Outputs

error_info:
  description: 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
  type: dict
msg:
  description: Overall status of the storage configuration operation.
  returned: always
  sample: Successfully submitted create volume task.
  type: str
task:
  description: Returns ID and URI of the created task.
  returned: success
  sample:
    id: JID_XXXXXXXXXXXXX
    uri: /redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_XXXXXXXXXXXXX
  type: dict