dellemc.powerflex.storagepool_v2 module – Managing storage pool on Dell PowerFlex 5.x

Note

This module is part of the dellemc.powerflex collection (version 3.0.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.powerflex. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: dellemc.powerflex.storagepool_v2.

New in dellemc.powerflex 3.0.0

Synopsis

  • Dell PowerFlex storage pool module includes getting the details of storage pool, creating a new storage pool, and modifying the attribute of a storage pool.

Requirements

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

  • A Dell PowerFlex storage system version 5.0 or later.

  • PyPowerFlex 2.0.0

Parameters

Parameter

Comments

cap_alert_thresholds

dictionary

The capacity alert thresholds.

critical_threshold

integer

The critical threshold.

high_threshold

integer

The high threshold.

compression_method

string

The compression method.

Choices:

  • "None"

  • "Normal"

device_group_id

string

The ID of the device group.

device_group_name

string

The name of the device group.

hostname

aliases: gateway_host

string / required

IP or FQDN of the PowerFlex host.

over_provisioning_factor

integer

The over-provisioning factor.

password

string / required

The password of the PowerFlex host.

physical_size_gb

integer

The physical size in GB.

If ‘use_all_available_capacity’ is set to true, this parameter cannot be specified.

If ‘use_all_available_capacity’ is set to false, this parameter is required.

port

integer

Port number through which communication happens with PowerFlex host.

Default: 443

protection_domain_id

string

The id of the protection domain.

During creation of a pool, either protection domain name or id must be mentioned.

Mutually exclusive with protection_domain_name.

protection_domain_name

string

The name of the protection domain.

During creation of a pool, either protection domain name or id must be mentioned.

Mutually exclusive with protection_domain_id.

protection_scheme

string

The protection scheme.

Choices:

  • "TwoPlusTwo"

  • "EightPlusTwo"

state

string / required

The state of the storage pool. Can be ‘present’ or ‘absent’.

Choices:

  • "present"

  • "absent"

storage_pool_id

string

The id of the storage pool.

It is auto generated, hence should not be provided during creation of a storage pool.

Mutually exclusive with storage_pool_name.

storage_pool_name

string

The name of the storage pool.

If more than one storage pool is found with the same name then protection domain id/name is required to perform the task.

Mutually exclusive with storage_pool_id.

storage_pool_new_name

string

New name for the storage pool can be provided.

This parameter is used for renaming the storage pool.

timeout

integer

Time after which connection will get terminated.

It is to be mentioned in seconds.

Default: 120

use_all_available_capacity

boolean

Whether to use all available capacity for storage pool.

When set to true, the ‘physical_size_gb’ parameter cannot be specified.

When set to false, the ‘physical_size_gb’ parameter is required.

Choices:

  • false

  • true

username

string / required

The username of the PowerFlex host.

validate_certs

aliases: verifycert

boolean

Boolean variable to specify whether or not to validate SSL certificate.

true - Indicates that the SSL certificate should be verified.

false - Indicates that the SSL certificate should not be verified.

Choices:

  • false

  • true ← (default)

Notes

Note

  • This module is supported on Dell PowerFlex 5.x and later versions.

  • The check_mode is supported.

  • The modules present in the collection named as ‘dellemc.powerflex’ are built to support the Dell PowerFlex storage platform.

Examples

- name: Get the details of storage pool by name
  dellemc.powerflex.storagepool_v2:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    storage_pool_name: "sample_pool_name"
    protection_domain_name: "sample_protection_domain"
    state: "present"

- name: Get the details of storage pool by id
  dellemc.powerflex.storagepool_v2:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    storage_pool_id: "abcd1234ab12r"
    state: "present"

- name: Create a new Storage pool
  dellemc.powerflex.storagepool_v2:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: "{{ validate_certs }}"
    storage_pool_name: "{{ pool_name }}"
    protection_domain_name: "{{ protection_domain_name }}"
    device_group_name: "{{ device_group_name }}"
    cap_alert_thresholds:
      high_threshold: 80
      critical_threshold: 90
    compression_method: Normal
    over_provisioning_factor: 2
    physical_size_gb: 100
    protection_scheme: TwoPlusTwo
    state: "present"

- name: Modify a Storage pool by name
  dellemc.powerflex.storagepool_v2:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: "{{ validate_certs }}"
    storage_pool_name: "{{ pool_name }}"
    protection_domain_name: "{{ protection_domain_name }}"
    storage_pool_new_name: "pool_name_new"
    cap_alert_thresholds:
      high_threshold: 85
      critical_threshold: 95
    compression_method: None
    state: "present"

Return Values

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

Key

Description

changed

boolean

Whether or not the resource has changed.

Returned: always

Sample: false

storage_pool_details

dictionary

Details of the storage pool.

Returned: When storage pool exists

Sample: {"addressSpaceUsage": "Normal", "addressSpaceUsageType": "TypeHardLimit", "backgroundScannerBWLimitKBps": null, "backgroundScannerMode": null, "bgScannerCompareErrorAction": "Invalid", "bgScannerReadErrorAction": "Invalid", "capacityAlertCriticalThreshold": 90, "capacityAlertHighThreshold": 80, "capacityUsageState": "Normal", "capacityUsageType": "NetCapacity", "checksumEnabled": false, "compressionMethod": "Normal", "dataLayout": "ErasureCoding", "deviceGroupId": "39a898be00000000", "deviceGroupName": "DG1", "externalAccelerationType": "None", "fglAccpId": null, "fglExtraCapacity": null, "fglMaxCompressionRatio": null, "fglMetadataSizeXx100": null, "fglNvdimmMetadataAmortizationX100": null, "fglNvdimmWriteCacheSizeInMb": null, "fglOverProvisioningFactor": null, "fglPerfProfile": null, "fglWriteAtomicitySize": null, "fragmentationEnabled": false, "genType": "EC", "id": "5dabf3f800000000", "links": [{"href": "/api/instances/StoragePool::5dabf3f800000000", "rel": "self"}, {"body": {"ids": ["5dabf3f800000000"], "resource_type": "storage_pool"}, "href": "/dtapi/rest/v1/metrics/query", "rel": "/dtapi/rest/v1/metrics/query"}, {"href": "/api/instances/StoragePool::5dabf3f800000000/relationships/SpSds", "rel": "/api/StoragePool/relationship/SpSds"}, {"href": "/api/instances/StoragePool::5dabf3f800000000/relationships/Volume", "rel": "/api/StoragePool/relationship/Volume"}, {"href": "/api/instances/StoragePool::5dabf3f800000000/relationships/Device", "rel": "/api/StoragePool/relationship/Device"}, {"href": "/api/instances/StoragePool::5dabf3f800000000/relationships/VTree", "rel": "/api/StoragePool/relationship/VTree"}, {"href": "/api/instances/ProtectionDomain::f3d03dcf00000000", "rel": "/api/parent/relationship/protectionDomainId"}, {"href": "/api/instances/DeviceGroup::39a898be00000000", "rel": "/api/parent/relationship/deviceGroupId"}, {"href": "/api/instances/WrcDeviceGroup::39a898be00000000", "rel": "/api/parent/relationship/wrcDeviceGroupId"}], "mediaType": null, "name": "SP_EC", "numOfParallelRebuildRebalanceJobsPerDevice": null, "overProvisioningFactor": 0, "persistentChecksumBuilderLimitKb": null, "persistentChecksumEnabled": false, "persistentChecksumState": "StateInvalid", "persistentChecksumValidateOnRead": null, "physicalSizeGB": 5120, "protectedMaintenanceModeIoPriorityAppBwPerDeviceThresholdInKbps": null, "protectedMaintenanceModeIoPriorityAppIopsPerDeviceThreshold": null, "protectedMaintenanceModeIoPriorityBwLimitPerDeviceInKbps": null, "protectedMaintenanceModeIoPriorityNumOfConcurrentIosPerDevice": null, "protectedMaintenanceModeIoPriorityPolicy": null, "protectedMaintenanceModeIoPriorityQuietPeriodInMsec": null, "protectionDomainId": "f3d03dcf00000000", "protectionDomainName": "PD_EC", "protectionScheme": "TwoPlusTwo", "rawSizeGB": 10240, "rebalanceEnabled": null, "rebalanceIoPriorityAppBwPerDeviceThresholdInKbps": null, "rebalanceIoPriorityAppIopsPerDeviceThreshold": null, "rebalanceIoPriorityBwLimitPerDeviceInKbps": null, "rebalanceIoPriorityNumOfConcurrentIosPerDevice": null, "rebalanceIoPriorityPolicy": null, "rebalanceIoPriorityQuietPeriodInMsec": null, "rebuildEnabled": null, "rebuildIoPriorityAppBwPerDeviceThresholdInKbps": null, "rebuildIoPriorityAppIopsPerDeviceThreshold": null, "rebuildIoPriorityBwLimitPerDeviceInKbps": null, "rebuildIoPriorityNumOfConcurrentIosPerDevice": null, "rebuildIoPriorityPolicy": null, "rebuildIoPriorityQuietPeriodInMsec": null, "replicationCapacityMaxRatio": null, "rmcacheWriteHandlingMode": "Invalid", "spClass": "Default", "spHealthState": "Protected", "sparePercentage": null, "statistics": {"format": "ID_TIMESTAMP_METRIC", "resource_type": "storage_pool", "resources": [{"id": "5dabf3f800000000", "metrics": [{"name": "physical_free", "values": [5443871047680]}, {"name": "logical_provisioned", "values": [0]}, {"name": "raw_used", "values": [10995116277760]}, {"name": "logical_used", "values": [0]}, {"name": "physical_total", "values": [5497558138880]}, {"name": "physical_used", "values": [0]}, {"name": "over_provisioning_limit", "values": [4611686017353646080]}]}], "timestamps": ["2025-08-25T05:24:06Z"]}, "useRfcache": false, "useRmcache": false, "vtreeMigrationIoPriorityAppBwPerDeviceThresholdInKbps": null, "vtreeMigrationIoPriorityAppIopsPerDeviceThreshold": null, "vtreeMigrationIoPriorityBwLimitPerDeviceInKbps": null, "vtreeMigrationIoPriorityNumOfConcurrentIosPerDevice": null, "vtreeMigrationIoPriorityPolicy": null, "vtreeMigrationIoPriorityQuietPeriodInMsec": null, "wrcDeviceGroupId": "39a898be00000000", "zeroPaddingEnabled": true}

addressSpaceUsage

string

Current address space usage state.

Returned: success

addressSpaceUsageType

string

Type of address space usage limit.

Returned: success

capacityAlertCriticalThreshold

integer

Critical threshold for capacity alert (percentage).

Returned: success

capacityAlertHighThreshold

integer

High threshold for capacity alert (percentage).

Returned: success

capacityUsageState

string

Current capacity usage state of the storage pool.

Returned: success

capacityUsageType

string

Type of capacity usage being monitored.

Returned: success

compressionMethod

string

Compression method used in the storage pool.

Returned: success

deviceGroupId

string

ID of the device group associated with the storage pool.

Returned: success

fragmentationEnabled

boolean

Indicates whether fragmentation is enabled for the storage pool.

Returned: success

genType

string

Data protection generation type of the storage pool.

Returned: success

id

string

ID of the storage pool.

Returned: success

inflightBandwidthFactor

integer

In-flight bandwidth factor for performance tuning.

Returned: success

inflightRequestsFactor

integer

In-flight requests factor for performance tuning.

Returned: success

name

string

Name of the storage pool.

Returned: success

numDataSlices

integer

Number of data slices used in erasure coding.

Returned: success

numProtectionSlices

integer

Number of protection slices used in erasure coding.

Returned: success

overProvisioningFactor

integer

Over-provisioning factor for the storage pool.

Returned: success

physicalSizeGb

integer

Physical size of the storage pool in GB.

Returned: success

protectionDomainId

string

ID of the protection domain in which the storage pool resides.

Returned: success

protectionScheme

string

Data protection scheme used in the storage pool.

Returned: success

rawSizeGb

integer

Raw size of the storage pool in GB.

Returned: success

spClass

string

Class of the storage pool.

Returned: success

spHealthState

string

Health state of the storage pool.

Returned: success

statistics

dictionary

Statistics details of the storage pool.

Returned: success

capacityInUseInKb

string

Total capacity of the storage pool.

Returned: success

deviceIds

list / elements=string

Device Ids of the storage pool.

Returned: success

unusedCapacityInKb

string

Unused capacity of the storage pool.

Returned: success

wrcDeviceGroupId

string

ID of the WRC device group.

Returned: success

zeroPaddingEnabled

boolean

Indicates whether zero padding is enabled for the storage pool.

Returned: success

Authors

  • Luis Liu (@vangork)

  • Yiming Bao (@baoy1)