# redfish_storage_volume Role to create, modify, initialize, or delete a single storage volume. ## Requirements ### Development Requirements to develop and contribute to the role. ``` ansible docker molecule python ``` ### Production Requirements to use the role. ``` ansible python ``` ### Ansible collections Collections required to use the role ``` dellemc.openmanage ``` ## Role Variables
Name Required Default Value Choices Type Description
hostname true str - iDRAC IP Address
username true str - iDRAC username
password true str - iDRAC user password.
https_port false 443 int - iDRAC port.
validate_certs false true bool - If C(false), the SSL certificates will not be validated.
- Configure C(false) only on personally controlled sites where self-signed certificates are used.
ca_path false path - The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.
https_timeout false 30 int - The HTTPS socket level timeout in seconds.
controller_id false str - 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.
volume_id false str - 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.
state false present [present, absent] str - 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).
command false [initialize] str - C(initialize) initializes an existing storage volume for a specified I(volume_id).
raid_type false str - One of the following raid types must be selected to create a volume.
- 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.
name false str - Name of the volume to be created.
- Only applicable when I(state) is C(present).
- This will be deprecated. Please use I(volume_name) for specifying the volume name.
volume_name false str - Name of the volume to be created.
- Only applicable when I(state) is C(present).
drives false list - 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.
block_size_bytes false int - Block size in bytes.Only applicable when I(state) is C(present).
capacity_bytes false str - Volume size in bytes.
- Only applicable when I(state) is C(present).
optimum_io_size_bytes false str - Stripe size value must be in multiples of 64 * 1024.
- Only applicable when I(state) is C(present).
encryption_types false [NativeDriveEncryption, ControllerAssisted, SoftwareAssisted] str - 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).
encrypted false bool - Indicates whether volume is currently utilizing encryption or not.
- Only applicable when I(state) is C(present).
oem false dict - Includes OEM extended payloads.
- Only applicable when I(state) is I(present).
initialize_type false Fast [Fast, Slow] str - Initialization type of existing volume.
Only applicable when I(command) is C(initialize).
job_wait false true bool - Determines whether to wait for the job completion or not.
job_wait_timeout false 300 int - The maximum wait time of I(job_wait) in seconds. The job is tracked only for this duration.
- This option is applicable when I(job_wait) is C(True).
apply_time false [Immediate, OnReset] str - 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).
- PERC controllers have a default value of I(apply_time) as C(Immediate).
reboot_server false bool - 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).
force_reboot false bool - 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).
## Fact variables
Name Sample Description
redfish_storage_volume_out {"changed": true, "failed": false, "msg": "Successfully submitted create volume task." } Module output of the redfish storage volume
## Examples --- ```yml - name: Create a volume with supported options ansible.builtin.include_role: name: redfish_storage_volume vars: hostname: "192.168.0.1" username: "username" password: "password" state: "present" raid_type: "RAID1" volume_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 ``` ```yml - name: Create a volume with apply time ansible.builtin.include_role: name: redfish_storage_volume vars: hostname: "192.168.0.1" username: "username" password: "password" state: "present" raid_type: "RAID6" volume_name: "Raid6_VD" controller_id: "RAID.Slot.1-1" drives: - Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1 - Disk.Bay.2:Enclosure.Internal.0-1:RAID.Slot.1-1 - Disk.Bay.5:Enclosure.Internal.0-1:RAID.Slot.1-1 - Disk.Bay.6:Enclosure.Internal.0-1:RAID.Slot.1-1 apply_time: OnReset reboot_server: true force_reboot: true ``` ```yml - name: Create a volume with minimum options ansible.builtin.include_role: name: redfish_storage_volume vars: hostname: "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 ``` ```yml - name: Modify a volume's encryption type settings ansible.builtin.include_role: name: redfish_storage_volume vars: hostname: "192.168.0.1" username: "username" password: "password" state: "present" volume_id: "Disk.Virtual.5:RAID.Slot.1-1" encryption_types: "ControllerAssisted" encrypted: true ``` ```yml - name: Delete an existing volume ansible.builtin.include_role: name: redfish_storage_volume vars: hostname: "192.168.0.1" username: "username" password: "password" state: "absent" volume_id: "Disk.Virtual.5:RAID.Slot.1-1" ``` ```yml - name: Initialize an existing volume ansible.builtin.include_role: name: redfish_storage_volume vars: hostname: "192.168.0.1" username: "username" password: "password" command: "initialize" volume_id: "Disk.Virtual.6:RAID.Slot.1-1" initialize_type: "Slow" ``` ## Author Information --- Dell Technologies
Kritika Bhateja (Kritika.Bhateja@Dell.com) 2023