| 1 |
.. _dellemc_idrac_storage_volume_module: |
| 2 |
|
| 3 |
|
| 4 |
dellemc_idrac_storage_volume -- Configures the RAID configuration attributes |
| 5 |
============================================================================ |
| 6 |
|
| 7 |
.. contents:: |
| 8 |
:local: |
| 9 |
:depth: 1 |
| 10 |
|
| 11 |
|
| 12 |
Synopsis |
| 13 |
-------- |
| 14 |
|
| 15 |
This module is responsible for configuring the RAID attributes. |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
Requirements |
| 20 |
------------ |
| 21 |
The below requirements are needed on the host that executes this module. |
| 22 |
|
| 23 |
- omsdk >= 1.2.488 |
| 24 |
- python >= 3.9.6 |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
Parameters |
| 29 |
---------- |
| 30 |
|
| 31 |
state (optional, str, view) |
| 32 |
``create``, performs create volume operation. |
| 33 |
|
| 34 |
``delete``, performs remove volume operation. |
| 35 |
|
| 36 |
``view``, returns storage view. |
| 37 |
|
| 38 |
|
| 39 |
span_depth (optional, int, 1) |
| 40 |
Number of spans in the RAID configuration. |
| 41 |
|
| 42 |
*span_depth* is required for ``create`` and its value depends on *volume_type*. |
| 43 |
|
| 44 |
|
| 45 |
span_length (optional, int, 1) |
| 46 |
Number of disks in a span. |
| 47 |
|
| 48 |
*span_length* is required for ``create`` and its value depends on *volume_type*. |
| 49 |
|
| 50 |
|
| 51 |
number_dedicated_hot_spare (optional, int, 0) |
| 52 |
Number of Dedicated Hot Spare. |
| 53 |
|
| 54 |
|
| 55 |
volume_type (optional, str, RAID 0) |
| 56 |
Provide the the required RAID level. |
| 57 |
|
| 58 |
|
| 59 |
disk_cache_policy (optional, str, Default) |
| 60 |
Disk Cache Policy. |
| 61 |
|
| 62 |
|
| 63 |
write_cache_policy (optional, str, WriteThrough) |
| 64 |
Write cache policy. |
| 65 |
|
| 66 |
|
| 67 |
read_cache_policy (optional, str, NoReadAhead) |
| 68 |
Read cache policy. |
| 69 |
|
| 70 |
|
| 71 |
stripe_size (optional, int, 65536) |
| 72 |
Stripe size value to be provided in multiples of 64 * 1024. |
| 73 |
|
| 74 |
|
| 75 |
controller_id (optional, str, None) |
| 76 |
Fully Qualified Device Descriptor (FQDD) of the storage controller, for example 'RAID.Integrated.1-1'. Controller FQDD is required for ``create`` RAID configuration. |
| 77 |
|
| 78 |
|
| 79 |
media_type (optional, str, None) |
| 80 |
Media type. |
| 81 |
|
| 82 |
|
| 83 |
protocol (optional, str, None) |
| 84 |
Bus protocol. |
| 85 |
|
| 86 |
|
| 87 |
volume_id (optional, str, None) |
| 88 |
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. |
| 89 |
|
| 90 |
|
| 91 |
volumes (optional, list, None) |
| 92 |
A list of virtual disk specific iDRAC attributes. This is applicable for ``create`` and ``delete`` operations. |
| 93 |
|
| 94 |
For ``create`` operation, name and drives are applicable options, other volume options can also be specified. |
| 95 |
|
| 96 |
The drives is a required option for ``create`` operation and accepts either location (list of drive slot) or id (list of drive fqdd). |
| 97 |
|
| 98 |
For ``delete`` operation, only name option is applicable. |
| 99 |
|
| 100 |
See the examples for more details. |
| 101 |
|
| 102 |
|
| 103 |
capacity (optional, float, None) |
| 104 |
Virtual disk size in GB. |
| 105 |
|
| 106 |
|
| 107 |
raid_reset_config (optional, str, False) |
| 108 |
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. |
| 109 |
|
| 110 |
|
| 111 |
raid_init_operation (optional, str, None) |
| 112 |
This option represents initialization configuration operation to be performed on the virtual disk. |
| 113 |
|
| 114 |
|
| 115 |
idrac_ip (True, str, None) |
| 116 |
iDRAC IP Address. |
| 117 |
|
| 118 |
|
| 119 |
idrac_user (True, str, None) |
| 120 |
iDRAC username. |
| 121 |
|
| 122 |
|
| 123 |
idrac_password (True, str, None) |
| 124 |
iDRAC user password. |
| 125 |
|
| 126 |
|
| 127 |
idrac_port (optional, int, 443) |
| 128 |
iDRAC port. |
| 129 |
|
| 130 |
|
| 131 |
validate_certs (optional, bool, True) |
| 132 |
If ``false``, the SSL certificates will not be validated. |
| 133 |
|
| 134 |
Configure ``false`` only on personally controlled sites where self-signed certificates are used. |
| 135 |
|
| 136 |
Prior to collection version ``5.0.0``, the *validate_certs* is ``false`` by default. |
| 137 |
|
| 138 |
|
| 139 |
ca_path (optional, path, None) |
| 140 |
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
| 141 |
|
| 142 |
|
| 143 |
timeout (optional, int, 30) |
| 144 |
The socket level timeout in seconds. |
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
Notes |
| 151 |
----- |
| 152 |
|
| 153 |
.. note:: |
| 154 |
- Run this module from a system that has direct access to Dell iDRAC. |
| 155 |
- This module supports both IPv4 and IPv6 address for *idrac_ip*. |
| 156 |
- This module supports ``check_mode``. |
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
Examples |
| 162 |
-------- |
| 163 |
|
| 164 |
.. code-block:: yaml+jinja |
| 165 |
|
| 166 |
|
| 167 |
--- |
| 168 |
- name: Create single volume |
| 169 |
dellemc.openmanage.dellemc_idrac_storage_volume: |
| 170 |
idrac_ip: "192.168.0.1" |
| 171 |
idrac_user: "username" |
| 172 |
idrac_password: "password" |
| 173 |
ca_path: "/path/to/ca_cert.pem" |
| 174 |
state: "create" |
| 175 |
controller_id: "RAID.Slot.1-1" |
| 176 |
volumes: |
| 177 |
- drives: |
| 178 |
location: [5] |
| 179 |
|
| 180 |
- name: Create multiple volume |
| 181 |
dellemc.openmanage.dellemc_idrac_storage_volume: |
| 182 |
idrac_ip: "192.168.0.1" |
| 183 |
idrac_user: "username" |
| 184 |
idrac_password: "password" |
| 185 |
ca_path: "/path/to/ca_cert.pem" |
| 186 |
raid_reset_config: "True" |
| 187 |
state: "create" |
| 188 |
controller_id: "RAID.Slot.1-1" |
| 189 |
volume_type: "RAID 1" |
| 190 |
span_depth: 1 |
| 191 |
span_length: 2 |
| 192 |
number_dedicated_hot_spare: 1 |
| 193 |
disk_cache_policy: "Enabled" |
| 194 |
write_cache_policy: "WriteBackForce" |
| 195 |
read_cache_policy: "ReadAhead" |
| 196 |
stripe_size: 65536 |
| 197 |
capacity: 100 |
| 198 |
raid_init_operation: "Fast" |
| 199 |
volumes: |
| 200 |
- name: "volume_1" |
| 201 |
drives: |
| 202 |
id: ["Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1", "Disk.Bay.2:Enclosure.Internal.0-1:RAID.Slot.1-1"] |
| 203 |
- name: "volume_2" |
| 204 |
volume_type: "RAID 5" |
| 205 |
span_length: 3 |
| 206 |
span_depth: 1 |
| 207 |
drives: |
| 208 |
location: [7, 3, 5] |
| 209 |
disk_cache_policy: "Disabled" |
| 210 |
write_cache_policy: "WriteBack" |
| 211 |
read_cache_policy: "NoReadAhead" |
| 212 |
stripe_size: 131072 |
| 213 |
capacity: "200" |
| 214 |
raid_init_operation: "None" |
| 215 |
|
| 216 |
- name: View all volume details |
| 217 |
dellemc.openmanage.dellemc_idrac_storage_volume: |
| 218 |
idrac_ip: "192.168.0.1" |
| 219 |
idrac_user: "username" |
| 220 |
idrac_password: "password" |
| 221 |
ca_path: "/path/to/ca_cert.pem" |
| 222 |
state: "view" |
| 223 |
|
| 224 |
- name: View specific volume details |
| 225 |
dellemc.openmanage.dellemc_idrac_storage_volume: |
| 226 |
idrac_ip: "192.168.0.1" |
| 227 |
idrac_user: "username" |
| 228 |
idrac_password: "password" |
| 229 |
ca_path: "/path/to/ca_cert.pem" |
| 230 |
state: "view" |
| 231 |
controller_id: "RAID.Slot.1-1" |
| 232 |
volume_id: "Disk.Virtual.0:RAID.Slot.1-1" |
| 233 |
|
| 234 |
- name: Delete single volume |
| 235 |
dellemc.openmanage.dellemc_idrac_storage_volume: |
| 236 |
idrac_ip: "192.168.0.1" |
| 237 |
idrac_user: "username" |
| 238 |
idrac_password: "password" |
| 239 |
ca_path: "/path/to/ca_cert.pem" |
| 240 |
state: "delete" |
| 241 |
volumes: |
| 242 |
- name: "volume_1" |
| 243 |
|
| 244 |
- name: Delete multiple volume |
| 245 |
dellemc.openmanage.dellemc_idrac_storage_volume: |
| 246 |
idrac_ip: "192.168.0.1" |
| 247 |
idrac_user: "username" |
| 248 |
idrac_password: "password" |
| 249 |
ca_path: "/path/to/ca_cert.pem" |
| 250 |
state: "delete" |
| 251 |
volumes: |
| 252 |
- name: "volume_1" |
| 253 |
- name: "volume_2" |
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
Return Values |
| 258 |
------------- |
| 259 |
|
| 260 |
msg (always, str, Successfully completed the view storage volume operation) |
| 261 |
Overall status of the storage configuration operation. |
| 262 |
|
| 263 |
|
| 264 |
storage_status (success, dict, {'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', 'Status': 'Success', 'TargetSettingsURI': None, 'retval': True}) |
| 265 |
Storage configuration job and progress details from the iDRAC. |
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
Status |
| 272 |
------ |
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
Authors |
| 279 |
~~~~~~~ |
| 280 |
|
| 281 |
- Felix Stephen (@felixs88) |
| 282 |
|