| 1 |
.. _redfish_storage_volume_module: |
| 2 |
|
| 3 |
|
| 4 |
redfish_storage_volume -- Manages the storage volume configuration |
| 5 |
================================================================== |
| 6 |
|
| 7 |
.. contents:: |
| 8 |
:local: |
| 9 |
:depth: 1 |
| 10 |
|
| 11 |
|
| 12 |
Synopsis |
| 13 |
-------- |
| 14 |
|
| 15 |
This module allows to create, modify, initialize, or delete a single storage volume. |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
Requirements |
| 20 |
------------ |
| 21 |
The below requirements are needed on the host that executes this module. |
| 22 |
|
| 23 |
- python \>= 3.9.6 |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
Parameters |
| 28 |
---------- |
| 29 |
|
| 30 |
controller_id (optional, str, None) |
| 31 |
Fully Qualified Device Descriptor (FQDD) of the storage controller. |
| 32 |
|
| 33 |
For example- RAID.Slot.1-1. |
| 34 |
|
| 35 |
This option is mandatory when :emphasis:`state` is :literal:`present` while creating a volume. |
| 36 |
|
| 37 |
|
| 38 |
volume_id (optional, str, None) |
| 39 |
FQDD of existing volume. |
| 40 |
|
| 41 |
For example- Disk.Virtual.4:RAID.Slot.1-1. |
| 42 |
|
| 43 |
This option is mandatory in the following scenarios, |
| 44 |
|
| 45 |
:emphasis:`state` is :literal:`present`\ , when updating a volume. |
| 46 |
|
| 47 |
:emphasis:`state` is :literal:`absent`\ , when deleting a volume. |
| 48 |
|
| 49 |
:emphasis:`command` is :literal:`initialize`\ , when initializing a volume. |
| 50 |
|
| 51 |
|
| 52 |
state (optional, str, None) |
| 53 |
:literal:`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". |
| 54 |
|
| 55 |
:literal:`absent` deletes the volume for the specified :emphasis:`volume\_id`. |
| 56 |
|
| 57 |
|
| 58 |
command (optional, str, None) |
| 59 |
:literal:`initialize` initializes an existing storage volume for a specified :emphasis:`volume\_id`. |
| 60 |
|
| 61 |
|
| 62 |
volume_type (optional, str, None) |
| 63 |
One of the following volume types must be selected to create a volume. |
| 64 |
|
| 65 |
:literal:`NonRedundant` The volume is a non-redundant storage device. |
| 66 |
|
| 67 |
:literal:`Mirrored` The volume is a mirrored device. |
| 68 |
|
| 69 |
:literal:`StripedWithParity` The volume is a device which uses parity to retain redundant information. |
| 70 |
|
| 71 |
:literal:`SpannedMirrors` The volume is a spanned set of mirrored devices. |
| 72 |
|
| 73 |
:literal:`SpannedStripesWithParity` The volume is a spanned set of devices which uses parity to retain redundant information. |
| 74 |
|
| 75 |
:emphasis:`volume\_type` is mutually exclusive with :emphasis:`raid\_type`. |
| 76 |
|
| 77 |
|
| 78 |
name (optional, str, None) |
| 79 |
Name of the volume to be created. |
| 80 |
|
| 81 |
Only applicable when :emphasis:`state` is :literal:`present`. |
| 82 |
|
| 83 |
|
| 84 |
drives (optional, list, None) |
| 85 |
FQDD of the Physical disks. |
| 86 |
|
| 87 |
For example- Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1. |
| 88 |
|
| 89 |
Only applicable when :emphasis:`state` is :literal:`present` when creating a new volume. |
| 90 |
|
| 91 |
|
| 92 |
block_size_bytes (optional, int, None) |
| 93 |
(deprecated) Block size in bytes.Only applicable when :emphasis:`state` is :literal:`present`. |
| 94 |
|
| 95 |
|
| 96 |
capacity_bytes (optional, str, None) |
| 97 |
Volume size in bytes. |
| 98 |
|
| 99 |
Only applicable when :emphasis:`state` is :literal:`present`. |
| 100 |
|
| 101 |
|
| 102 |
optimum_io_size_bytes (optional, int, None) |
| 103 |
Stripe size value must be in multiples of 64 \* 1024. |
| 104 |
|
| 105 |
Only applicable when :emphasis:`state` is :literal:`present`. |
| 106 |
|
| 107 |
|
| 108 |
encryption_types (optional, str, None) |
| 109 |
(deprecated) The following encryption types can be selected. |
| 110 |
|
| 111 |
:literal:`ControllerAssisted` The volume is encrypted by the storage controller entity. |
| 112 |
|
| 113 |
:literal:`NativeDriveEncryption` The volume utilizes the native drive encryption capabilities of the drive hardware. |
| 114 |
|
| 115 |
:literal:`SoftwareAssisted` The volume is encrypted by the software running on the system or the operating system. |
| 116 |
|
| 117 |
Only applicable when :emphasis:`state` is :literal:`present`. |
| 118 |
|
| 119 |
|
| 120 |
encrypted (optional, bool, None) |
| 121 |
Indicates whether volume is currently utilizing encryption or not. |
| 122 |
|
| 123 |
Only applicable when :emphasis:`state` is :literal:`present`. |
| 124 |
|
| 125 |
|
| 126 |
oem (optional, dict, None) |
| 127 |
Includes OEM extended payloads. |
| 128 |
|
| 129 |
Only applicable when :emphasis:`state` is :emphasis:`present`. |
| 130 |
|
| 131 |
|
| 132 |
initialize_type (optional, str, Fast) |
| 133 |
Initialization type of existing volume. |
| 134 |
|
| 135 |
Only applicable when :emphasis:`command` is :literal:`initialize`. |
| 136 |
|
| 137 |
|
| 138 |
raid_type (optional, str, None) |
| 139 |
:literal:`RAID0` to create a RAID0 type volume. |
| 140 |
|
| 141 |
:literal:`RAID1` to create a RAID1 type volume. |
| 142 |
|
| 143 |
:literal:`RAID5` to create a RAID5 type volume. |
| 144 |
|
| 145 |
:literal:`RAID6` to create a RAID6 type volume. |
| 146 |
|
| 147 |
:literal:`RAID10` to create a RAID10 type volume. |
| 148 |
|
| 149 |
:literal:`RAID50` to create a RAID50 type volume. |
| 150 |
|
| 151 |
:literal:`RAID60` to create a RAID60 type volume. |
| 152 |
|
| 153 |
:emphasis:`raid\_type` is mutually exclusive with :emphasis:`volume\_type`. |
| 154 |
|
| 155 |
|
| 156 |
apply_time (optional, str, None) |
| 157 |
Apply time of the Volume configuration. |
| 158 |
|
| 159 |
:literal:`Immediate` allows you to apply the volume configuration on the host server immediately and apply the changes. This is applicable for :emphasis:`job\_wait`. |
| 160 |
|
| 161 |
:literal:`OnReset` allows you to apply the changes on the next reboot of the host server. |
| 162 |
|
| 163 |
:emphasis:`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 :emphasis:`apply\_time` as :literal:`OnReset`\ , and PERC controllers have a default value of :emphasis:`apply\_time` as :literal:`Immediate`. |
| 164 |
|
| 165 |
|
| 166 |
reboot_server (optional, bool, False) |
| 167 |
Reboot the server to apply the changes. |
| 168 |
|
| 169 |
:emphasis:`reboot\_server` is applicable only when :emphasis:`apply\_timeout` is :literal:`OnReset` or when the default value for the apply time of the controller is :literal:`OnReset`. |
| 170 |
|
| 171 |
|
| 172 |
force_reboot (optional, bool, False) |
| 173 |
Reboot the server forcefully to apply the changes when the normal reboot fails. |
| 174 |
|
| 175 |
:emphasis:`force\_reboot` is applicable only when :emphasis:`reboot\_server` is :literal:`true`. |
| 176 |
|
| 177 |
|
| 178 |
job_wait (optional, bool, False) |
| 179 |
This parameter provides the option to wait for the job completion. |
| 180 |
|
| 181 |
This is applicable when :emphasis:`apply\_time` is :literal:`Immediate`. |
| 182 |
|
| 183 |
This is applicable when :emphasis:`apply\_time` is :literal:`OnReset` and :emphasis:`reboot\_server` is :literal:`true`. |
| 184 |
|
| 185 |
|
| 186 |
job_wait_timeout (optional, int, 1200) |
| 187 |
This parameter is the maximum wait time of :emphasis:`job\_wait` in seconds. |
| 188 |
|
| 189 |
This option is applicable when :emphasis:`job\_wait` is :literal:`true`. |
| 190 |
|
| 191 |
|
| 192 |
baseuri (True, str, None) |
| 193 |
IP address of the target out-of-band controller. For example- \<ipaddress\>:\<port\>. |
| 194 |
|
| 195 |
|
| 196 |
username (False, str, None) |
| 197 |
Username of the target out-of-band controller. |
| 198 |
|
| 199 |
If the username is not provided, then the environment variable :envvar:`IDRAC\_USERNAME` is used. |
| 200 |
|
| 201 |
Example: export IDRAC\_USERNAME=username |
| 202 |
|
| 203 |
|
| 204 |
password (False, str, None) |
| 205 |
Password of the target out-of-band controller. |
| 206 |
|
| 207 |
If the password is not provided, then the environment variable :envvar:`IDRAC\_PASSWORD` is used. |
| 208 |
|
| 209 |
Example: export IDRAC\_PASSWORD=password |
| 210 |
|
| 211 |
|
| 212 |
x_auth_token (False, str, None) |
| 213 |
Authentication token. |
| 214 |
|
| 215 |
If the x\_auth\_token is not provided, then the environment variable :envvar:`IDRAC\_X\_AUTH\_TOKEN` is used. |
| 216 |
|
| 217 |
Example: export IDRAC\_X\_AUTH\_TOKEN=x\_auth\_token |
| 218 |
|
| 219 |
|
| 220 |
validate_certs (optional, bool, True) |
| 221 |
If :literal:`false`\ , the SSL certificates will not be validated. |
| 222 |
|
| 223 |
Configure :literal:`false` only on personally controlled sites where self-signed certificates are used. |
| 224 |
|
| 225 |
Prior to collection version :literal:`5.0.0`\ , the :emphasis:`validate\_certs` is :literal:`false` by default. |
| 226 |
|
| 227 |
|
| 228 |
ca_path (optional, path, None) |
| 229 |
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
| 230 |
|
| 231 |
|
| 232 |
timeout (optional, int, 30) |
| 233 |
The socket level timeout in seconds. |
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
Notes |
| 240 |
----- |
| 241 |
|
| 242 |
.. note:: |
| 243 |
- Run this module from a system that has direct access to Redfish APIs. |
| 244 |
- This module supports :literal:`check\_mode`. |
| 245 |
- This module always reports changes when :emphasis:`name` and :emphasis:`volume\_id` are not specified. Either :emphasis:`name` or :emphasis:`volume\_id` is required to support :literal:`check\_mode`. |
| 246 |
- This module does not support the create operation of RAID6 and RAID60 storage volume on iDRAC8 |
| 247 |
- This module supports IPv4 and IPv6 addresses. |
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
Examples |
| 253 |
-------- |
| 254 |
|
| 255 |
.. code-block:: yaml+jinja |
| 256 |
|
| 257 |
|
| 258 |
--- |
| 259 |
- name: Create a volume with supported options |
| 260 |
dellemc.openmanage.redfish_storage_volume: |
| 261 |
baseuri: "192.168.0.1" |
| 262 |
username: "username" |
| 263 |
password: "password" |
| 264 |
ca_path: "/path/to/ca_cert.pem" |
| 265 |
state: "present" |
| 266 |
volume_type: "Mirrored" |
| 267 |
name: "VD0" |
| 268 |
controller_id: "RAID.Slot.1-1" |
| 269 |
drives: |
| 270 |
- Disk.Bay.5:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 271 |
- Disk.Bay.6:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 272 |
capacity_bytes: 299439751168 |
| 273 |
optimum_io_size_bytes: 65536 |
| 274 |
encrypted: true |
| 275 |
|
| 276 |
- name: Create a volume with minimum options |
| 277 |
dellemc.openmanage.redfish_storage_volume: |
| 278 |
baseuri: "192.168.0.1" |
| 279 |
username: "username" |
| 280 |
password: "password" |
| 281 |
ca_path: "/path/to/ca_cert.pem" |
| 282 |
state: "present" |
| 283 |
controller_id: "RAID.Slot.1-1" |
| 284 |
volume_type: "NonRedundant" |
| 285 |
drives: |
| 286 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 287 |
|
| 288 |
- name: Create a RAID0 on PERC controller on reset |
| 289 |
dellemc.openmanage.redfish_storage_volume: |
| 290 |
baseuri: "192.168.0.1" |
| 291 |
username: "username" |
| 292 |
password: "password" |
| 293 |
state: "present" |
| 294 |
controller_id: "RAID.Slot.1-1" |
| 295 |
raid_type: "RAID0" |
| 296 |
drives: |
| 297 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 298 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2 |
| 299 |
apply_time: OnReset |
| 300 |
|
| 301 |
- name: Create a RAID0 on BOSS controller with restart |
| 302 |
dellemc.openmanage.redfish_storage_volume: |
| 303 |
baseuri: "192.168.0.1" |
| 304 |
username: "username" |
| 305 |
password: "password" |
| 306 |
state: "present" |
| 307 |
controller_id: "RAID.Slot.1-1" |
| 308 |
raid_type: "RAID0" |
| 309 |
drives: |
| 310 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 311 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2 |
| 312 |
apply_time: OnReset |
| 313 |
reboot_server: true |
| 314 |
|
| 315 |
- name: Create a RAID0 on BOSS controller with force restart |
| 316 |
dellemc.openmanage.redfish_storage_volume: |
| 317 |
baseuri: "192.168.0.1" |
| 318 |
username: "username" |
| 319 |
password: "password" |
| 320 |
state: "present" |
| 321 |
controller_id: "RAID.Slot.1-1" |
| 322 |
raid_type: "RAID0" |
| 323 |
drives: |
| 324 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 325 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2 |
| 326 |
reboot_server: true |
| 327 |
force_reboot: true |
| 328 |
|
| 329 |
- name: Modify a volume's encryption type settings |
| 330 |
dellemc.openmanage.redfish_storage_volume: |
| 331 |
baseuri: "192.168.0.1" |
| 332 |
username: "username" |
| 333 |
password: "password" |
| 334 |
ca_path: "/path/to/ca_cert.pem" |
| 335 |
state: "present" |
| 336 |
volume_id: "Disk.Virtual.5:RAID.Slot.1-1" |
| 337 |
encrypted: true |
| 338 |
|
| 339 |
- name: Delete an existing volume |
| 340 |
dellemc.openmanage.redfish_storage_volume: |
| 341 |
baseuri: "192.168.0.1" |
| 342 |
username: "username" |
| 343 |
password: "password" |
| 344 |
ca_path: "/path/to/ca_cert.pem" |
| 345 |
state: "absent" |
| 346 |
volume_id: "Disk.Virtual.5:RAID.Slot.1-1" |
| 347 |
|
| 348 |
- name: Initialize an existing volume |
| 349 |
dellemc.openmanage.redfish_storage_volume: |
| 350 |
baseuri: "192.168.0.1" |
| 351 |
username: "username" |
| 352 |
password: "password" |
| 353 |
ca_path: "/path/to/ca_cert.pem" |
| 354 |
command: "initialize" |
| 355 |
volume_id: "Disk.Virtual.6:RAID.Slot.1-1" |
| 356 |
initialize_type: "Slow" |
| 357 |
|
| 358 |
- name: Create a RAID6 volume |
| 359 |
dellemc.openmanage.redfish_storage_volume: |
| 360 |
baseuri: "192.168.0.1" |
| 361 |
username: "username" |
| 362 |
password: "password" |
| 363 |
state: "present" |
| 364 |
controller_id: "RAID.Slot.1-1" |
| 365 |
raid_type: "RAID6" |
| 366 |
drives: |
| 367 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 368 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2 |
| 369 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-3 |
| 370 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-4 |
| 371 |
|
| 372 |
- name: Create a RAID60 volume |
| 373 |
dellemc.openmanage.redfish_storage_volume: |
| 374 |
baseuri: "192.168.0.1" |
| 375 |
username: "username" |
| 376 |
password: "password" |
| 377 |
state: "present" |
| 378 |
controller_id: "RAID.Slot.1-1" |
| 379 |
raid_type: "RAID60" |
| 380 |
drives: |
| 381 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 382 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2 |
| 383 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-3 |
| 384 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-4 |
| 385 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-5 |
| 386 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-6 |
| 387 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-7 |
| 388 |
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-8 |
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
Return Values |
| 393 |
------------- |
| 394 |
|
| 395 |
msg (always, str, Successfully submitted create volume task.) |
| 396 |
Overall status of the storage configuration operation. |
| 397 |
|
| 398 |
|
| 399 |
task (success, dict, {'id': 'JID_XXXXXXXXXXXXX', 'uri': '/redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_XXXXXXXXXXXXX'}) |
| 400 |
Returns ID and URI of the created task. |
| 401 |
|
| 402 |
|
| 403 |
error_info (on http error, dict, {'error': {'@Message.ExtendedInfo': [{'Message': 'Unable to perform configuration operations because a configuration job for the device already exists.', 'MessageArgs': [], '[email protected]': 0, 'MessageId': 'IDRAC.1.6.STOR023', 'RelatedProperties': [], '[email protected]': 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'}}) |
| 404 |
Details of a http error. |
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
Status |
| 411 |
------ |
| 412 |
|
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
Authors |
| 418 |
~~~~~~~ |
| 419 |
|
| 420 |
- Sajna Shetty(@Sajna-Shetty) |
| 421 |
- Kritika Bhateja(@Kritika-Bhateja-03) |
| 422 |
- Shivam Sharma(@ShivamSh3) |
| 423 |
|