dellemc.unity.volume module – Manage volume on Unity storage system
Note
This module is part of the dellemc.unity collection (version 1.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.unity
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: dellemc.unity.volume
.
New in dellemc.unity 1.1.0
Synopsis
Managing volume on Unity storage system includes- Create new volume, Modify volume attributes, Map Volume to host, Unmap volume to host, Display volume details, Delete volume.
Requirements
The below requirements are needed on the host that executes this module.
A Dell Unity Storage device version 5.1 or later.
Ansible-core 2.12 or later.
Python 3.9, 3.10 or 3.11.
Storops Python SDK 1.2.11.
Parameters
Parameter |
Comments |
---|---|
Boolean variable, Indicates whether or not to enable advanced deduplication. Compression should be enabled to enable advanced deduplication. It can only be enabled on the all flash high end platforms. Deduplicated data will remain as is even after advanced deduplication is disabled. Choices:
|
|
The unit of the volume size. It defaults to Choices:
|
|
Boolean variable, Specifies whether or not to enable compression. Compression is supported only for thin volumes. Choices:
|
|
Description about the volume. Description can be removed by passing empty string (“”). |
|
Host Lun Unit to be mapped/unmapped with this volume. It is an optional parameter, hlu can be specified along with host_name or host_id and mapping_state. If hlu is not specified, unity will choose it automatically. The maximum value supported is |
|
ID of the host to be mapped/unmapped with this volume. Either host_name or host_id can be specified in one task along with mapping_state. |
|
Name of the host to be mapped/unmapped with this volume. Either host_name or host_id can be specified in one task along with mapping_state. |
|
Name of hosts for mapping to a volume. |
|
Host Lun Unit to be mapped/unmapped with this volume. It is an optional parameter, hlu can be specified along with host_name or host_id and mapping_state. If hlu is not specified, unity will choose it automatically. The maximum value supported is |
|
ID of the host. |
|
Name of the host. |
|
IO limit policy associated with this volume. Once it is set, it cannot be removed through ansible module but it can be changed. |
|
Boolean variable, Specifies whether or not it is a thin volume. The value is set as Choices:
|
|
State of host access for volume. Choices:
|
|
New name of the volume for rename operation. |
|
The password of the Unity management server. |
|
This is the id of the pool where the volume will be created. Either the pool_name or pool_id must be provided to create a new volume. |
|
This is the name of the pool where the volume will be created. Either the pool_name or pool_id must be provided to create a new volume. |
|
Port number through which communication happens with Unity management server. Default: |
|
The size of the volume. |
|
Snapshot schedule assigned to the volume. Add/Remove/Modify the snapshot schedule for the volume. |
|
Storage Processor for this volume. Choices:
|
|
State variable to determine whether volume will exist or not. Choices:
|
|
Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool. Choices:
|
|
IP or FQDN of the Unity management server. |
|
The username of the Unity management server. |
|
Boolean variable to specify whether or not to validate SSL certificate.
Choices:
|
|
The id of the volume. It can be used only for get, modify, map/unmap host, or delete operation. |
|
The name of the volume. Mandatory only for create operation. |
Notes
Note
The check_mode is not supported.
The modules present in this collection named as ‘dellemc.unity’ are built to support the Dell Unity storage platform.
Examples
- name: Create Volume
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
vol_name: "{{vol_name}}"
description: "{{description}}"
pool_name: "{{pool}}"
size: 2
cap_unit: "{{cap_GB}}"
is_thin: True
compression: True
advanced_dedup: True
state: "{{state_present}}"
- name: Expand Volume by volume id
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
vol_id: "{{vol_id}}"
size: 5
cap_unit: "{{cap_GB}}"
state: "{{state_present}}"
- name: Modify Volume, map host by host_name
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
vol_name: "{{vol_name}}"
host_name: "{{host_name}}"
hlu: 5
mapping_state: "{{state_mapped}}"
state: "{{state_present}}"
- name: Modify Volume, unmap host mapping by host_name
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
vol_name: "{{vol_name}}"
host_name: "{{host_name}}"
mapping_state: "{{state_unmapped}}"
state: "{{state_present}}"
- name: Map multiple hosts to a Volume
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
vol_id: "{{vol_id}}"
hosts:
- host_name: "10.226.198.248"
hlu: 1
- host_id: "Host_929"
hlu: 2
mapping_state: "mapped"
state: "present"
- name: Modify Volume attributes
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
vol_name: "{{vol_name}}"
new_vol_name: "{{new_vol_name}}"
tiering_policy: "AUTOTIER"
compression: True
is_thin: True
advanced_dedup: True
state: "{{state_present}}"
- name: Delete Volume by vol name
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
vol_name: "{{vol_name}}"
state: "{{state_absent}}"
- name: Delete Volume by vol id
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
vol_id: "{{vol_id}}"
state: "{{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 volume. Returned: When volume exists Sample: |
|
Current storage processor for this volume. Returned: success |
|
Description about the volume. Returned: success |
|
Host mapped to this volume. Returned: success |
|
The system generated ID given to the volume. Returned: success |
|
IO limit policy associated with this volume. Returned: success |
|
Whether or not compression enabled on this volume. Returned: success |
|
Indicates whether thin provisioning is enabled for this volume. Returned: success |
|
Name of the volume. Returned: success |
|
The pool in which this volume is allocated. Returned: success |
|
Size of the volume with actual unit. Returned: success |
|
Snapshot schedule applied to this volume. Returned: success |
|
Tiering policy applied to this volume. Returned: success |
|
The world wide name of this volume. Returned: success |