dellemc.powerflex.device module – Manage device on Dell PowerFlex
Note
This module is part of the dellemc.powerflex collection (version 2.6.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.device
.
New in dellemc.powerflex 1.1.0
Synopsis
Managing device on PowerFlex storage system includes adding new device, getting details of device, and removing a device.
Requirements
The below requirements are needed on the host that executes this module.
A Dell PowerFlex storage system version 3.6 or later.
PyPowerFlex 1.14.0.
Parameters
Parameter |
Comments |
---|---|
Acceleration Pool ID. Used while adding an acceleration device. Media type supported are Mutually exclusive with acceleration_pool_name, storage_pool_name and storage_pool_id. |
|
Acceleration Pool Name. Used while adding an acceleration device. Media type supported are Mutually exclusive with storage_pool_id, storage_pool_name and acceleration_pool_name. |
|
Full path of the device to be added. Required while adding a device. |
|
Device ID. Mutually exclusive with device_name. |
|
Device name. Mutually exclusive with device_id. |
|
Device external acceleration types. Used while adding a device. Choices:
|
|
Using the Force flag to add a device. Use this flag, to overwrite existing data on the device. Use this flag with caution, because all data on the device will be destroyed. Choices:
|
|
IP or FQDN of the PowerFlex host. |
|
Device media types. Required while adding a device. Choices:
|
|
The password of the PowerFlex host. |
|
Port number through which communication happens with PowerFlex host. Default: |
|
Protection domain ID. Used while identifying a storage pool along with storage_pool_name. Mutually exclusive with protection_domain_name. |
|
Protection domain name. Used while identifying a storage pool along with storage_pool_name. Mutually exclusive with protection_domain_id. |
|
The ID of the SDS. Required while adding a device. Mutually exclusive with sds_name. |
|
The name of the SDS. Required while adding a device. Mutually exclusive with sds_id. |
|
State of the device. Choices:
|
|
Storage Pool ID. Used while adding a storage device. Media type supported are Mutually exclusive with storage_pool_name, acceleration_pool_id and acceleration_pool_name. |
|
Storage Pool name. Used while adding a storage device. Mutually exclusive with storage_pool_id, acceleration_pool_id and acceleration_pool_name. |
|
Time after which connection will get terminated. It is to be mentioned in seconds. Default: |
|
The username of the PowerFlex host. |
|
Boolean variable to specify whether or not to validate SSL certificate.
Choices:
|
Notes
Note
The value for device_id is generated only after successful addition of the device.
To uniquely identify a device, either device_id can be passed or one of current_pathname or device_name must be passed with sds_id or sds_name.
It is recommended to install Rfcache driver for SSD device on SDS in order to add it to an acceleration pool.
The check_mode is not supported.
The modules present in the collection named as ‘dellemc.powerflex’ are built to support the Dell PowerFlex storage platform.
Examples
- name: Add a device
dellemc.powerflex.device:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
current_pathname: "/dev/sdb"
sds_name: "node1"
media_type: "HDD"
device_name: "device2"
storage_pool_name: "pool1"
protection_domain_name: "domain1"
external_acceleration_type: "ReadAndWrite"
state: "present"
- name: Add a device with force flag
dellemc.powerflex.device:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
current_pathname: "/dev/sdb"
sds_name: "node1"
media_type: "HDD"
device_name: "device2"
storage_pool_name: "pool1"
protection_domain_name: "domain1"
external_acceleration_type: "ReadAndWrite"
force: true
state: "present"
- name: Get device details using device_id
dellemc.powerflex.device:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
device_id: "d7fe088900000000"
state: "present"
- name: Get device details using (current_pathname, sds_name)
dellemc.powerflex.device:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
current_pathname: "/dev/sdb"
sds_name: "node0"
state: "present"
- name: Get device details using (current_pathname, sds_id)
dellemc.powerflex.device:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
current_pathname: "/dev/sdb"
sds_id: "5717d71800000000"
state: "present"
- name: Remove a device using device_id
dellemc.powerflex.device:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
device_id: "76eb7e2f00010000"
state: "absent"
- name: Remove a device using (current_pathname, sds_id)
dellemc.powerflex.device:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
current_pathname: "/dev/sdb"
sds_name: "node1"
state: "absent"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Whether or not the resource has changed. Returned: always Sample: |
|
Details of the device. Returned: When device exists Sample: |
|
Acceleration pool ID. Returned: success |
|
Acceleration pool name. Returned: success |
|
Indicates acceleration props. Returned: success |
|
Indicates aggregated state. Returned: success |
|
Indicates ATA security active state. Returned: success |
|
Indicates auto detection of media type. Returned: success |
|
Indicates cache look ahead active state. Returned: success |
|
Device capacity. Returned: success |
|
Device capacity limit in KB. Returned: success |
|
Device current path name. Returned: success |
|
Device original path name. Returned: success |
|
Indicates device state. Returned: success |
|
Indicates device type. Returned: success |
|
Indicates error state. Returned: success |
|
Indicates external acceleration type. Returned: success |
|
Indicates FGL NVDIMM meta data amortization value. Returned: success |
|
Indicates FGL NVDIMM write cache size. Returned: success |
|
Indicates firmware version. Returned: success |
|
Device ID. Returned: success |
|
Indicates LED setting. Returned: success |
|
Device links. Returned: success |
|
Device instance URL. Returned: success |
|
Relationship of device with different entities. Returned: success |
|
Logical sector size in bytes. Returned: success |
|
Indicates long successful IOs. Returned: success |
|
Maximum device capacity limit in KB. Returned: success |
|
Indicates media failing. Returned: success |
|
Indicates media type. Returned: success |
|
Indicates model name. Returned: success |
|
Device name. Returned: success |
|
Indicates persistent checksum state. Returned: success |
|
Physical sector size in bytes. Returned: success |
|
Protection domain ID. Returned: success |
|
Protection domain name. Returned: success |
|
RAID controller serial number. Returned: success |
|
Indicates RF cache error device does not exist. Returned: success |
|
RF cache props. Returned: success |
|
SDS ID. Returned: success |
|
SDS name. Returned: success |
|
Indicates Serial number. Returned: success |
|
Indicates SPs SDS ID. Returned: success |
|
Indicates SSD end of life state. Returned: success |
|
Storage Pool ID. Returned: success |
|
Storage Pool name. Returned: success |
|
Storage props. Returned: success |
|
Indicates temperature state. Returned: success |
|
Indicates vendor name. Returned: success |
|
Indicates write cache active. Returned: success |