hitachivantara.vspone_block.vsp.hv_vsp_one_volume module – Manages volumes on VSP E series, VSP One Block 20 series, and VSP One Block 80 series storage systems.
Note
This module is part of the hitachivantara.vspone_block collection (version 4.9.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 hitachivantara.vspone_block.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: hitachivantara.vspone_block.vsp.hv_vsp_one_volume.
New in hitachivantara.vspone_block 4.2.0
Synopsis
This module enables creation, modification, and deletion of volumes, as well as attaching and detaching to servers.
Supports various volume operations depending on the specified state parameter.
Utilizes the Hitachi Virtual Storage Platform One Simple API for volume management across VSP One B20 series, VSP One B80 series, and VSP E series models.
For usage examples, visit https://github.com/hitachi-vantara/vspone-block-ansible/blob/main/playbooks/vsp_direct/vsp_one_volume.yml
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9
Parameters
Parameter |
Comments |
|---|---|
Information required to establish a connection to the storage system. |
|
IP address or hostname of the storage system. |
|
Token used to operate on locked resources. |
|
Path to a CA certificate file or directory on the Ansible control node used to verify the storage system SSL certificate. Required when Accepts a PEM file path or a directory of hashed CA certificates. |
|
Path to client SSL certificate file or CA certificate directory for mutual TLS authentication. Must be provided together with |
|
Path to the client private key file for mutual TLS authentication. Must be provided together with |
|
Password for authentication. This is a required field. |
|
Whether to suppress the SSL certificate validation warning. When set to Set to Choices:
|
|
Username for authentication. This is a required field. |
|
Whether to validate the storage system SSL certificate. When set to Set to Note: Starting with major version 5.0, the default value will change to Choices:
|
|
Configuration parameters for the volume operation. |
|
ALUA mode to apply to all volumes in the batch. Required for Choices:
|
|
Volume size specification. Required for the Create a volume with capacity and pool ID /Create volume with data reduction sharing enabled /Create a single volume with QoS threshold settings (threshold) /Expand the volume size of an existing volume tasks. |
|
Data reduction function configuration. Required for Required for Choices:
|
|
Controls compression acceleration feature. Used with Choices:
|
|
List of volume-server pairs to disconnect. Required for |
|
ID of the server to disconnect from. |
|
ID of the volume to disconnect. |
|
Activates data reduction sharing functionality. Required for the Create volume with data reduction sharing enabled task. Choices:
|
|
Quantity of volumes to create. Required for the Create multiple volumes with custom nickname sequence task. Default: |
|
Storage pool identifier. Required for the Create a volume with capacity and pool ID /Create multiple volumes with custom nickname sequence /Create volume with data reduction sharing enabled /Create a single volume with QoS threshold settings (threshold) tasks. |
|
Quality of service configuration for the volume. Required for the Create a single volume with QoS threshold settings (threshold) /Change the threshold QoS settings of an existing volume /Change the alert QoS settings of an existing volume tasks. |
|
QoS alert configuration. Required for the Change the alert QoS settings of an existing volume task. |
|
Activates lower threshold alerts. Required for the Change the alert QoS settings of an existing volume task. Choices:
|
|
Activates response time alerts. Required for the Change the alert QoS settings of an existing volume task. Choices:
|
|
Activates upper threshold alerts. Required for the Change the alert QoS settings of an existing volume task. Choices:
|
|
Permitted duration for lower threshold alerts. Required for the Change the alert QoS settings of an existing volume task. |
|
Permitted duration for response time alerts. Required for the Change the alert QoS settings of an existing volume task. |
|
Permitted duration for upper threshold alerts. Required for the Change the alert QoS settings of an existing volume task. |
|
QoS threshold configuration. Required for the Create a single volume with QoS threshold settings (threshold) /Change the threshold QoS settings of an existing volume tasks. |
|
Activates minimum IOPS restriction. Required for the Create a single volume with QoS threshold settings (threshold) /Change the threshold QoS settings of an existing volume tasks. Choices:
|
|
Activates minimum transfer rate restriction. Required for the Create a single volume with QoS threshold settings (threshold) /Change the threshold QoS settings of an existing volume tasks. Choices:
|
|
Activates response priority setting. Required for the Create a single volume with QoS threshold settings (threshold) /Change the threshold QoS settings of an existing volume tasks. Choices:
|
|
Activates maximum IOPS restriction. Required for the Create a single volume with QoS threshold settings (threshold) /Change the threshold QoS settings of an existing volume tasks. Choices:
|
|
Activates maximum transfer rate restriction. Required for the Create a single volume with QoS threshold settings (threshold) /Change the threshold QoS settings of an existing volume tasks. Choices:
|
|
Minimum IOPS threshold. Required for the Create a single volume with QoS threshold settings (threshold) /Change the threshold QoS settings of an existing volume tasks. |
|
Minimum transfer rate threshold. Required for the Create a single volume with QoS threshold settings (threshold) /Change the threshold QoS settings of an existing volume tasks. |
|
Response priority level. Required for the Create a single volume with QoS threshold settings (threshold) /Change the threshold QoS settings of an existing volume tasks. |
|
Maximum IOPS threshold. Required for the Create a single volume with QoS threshold settings (threshold) /Change the threshold QoS settings of an existing volume tasks. |
|
Maximum transfer rate threshold. Required for the Create a single volume with QoS threshold settings (threshold) /Change the threshold QoS settings of an existing volume tasks. |
|
Collection of server identifiers for volume attachment. Required for the Attach volume to servers /Detach volume from servers /Attach multiple volumes to a multiple servers in one operation tasks. |
|
Controls how virtual volume IDs are cleared when deleting volumes. Optional for Choices:
|
|
Volume identifier. Required for the Attach volume to servers /Detach volume from servers /Change the threshold QoS settings of an existing volume /Change the alert QoS settings of an existing volume /Expand the volume size of an existing volume /Change the nickname the Volume settings of an existing volume /Update the Volume saving settings and compression_acceleration of an existing volume /Delete volume by volume ID tasks. |
|
Collection of volume identifiers for batch operations. Required for Required for Required for Required for |
|
Naming configuration for the volume. Required for the Create a volume with capacity and pool ID /Create multiple volumes with custom nickname sequence /Create volume with data reduction sharing enabled /Create a single volume with QoS threshold settings (threshold) /Change the nickname the Volume settings of an existing volume tasks. |
|
Foundation name for volume naming. Required for the Create a volume with capacity and pool ID /Create multiple volumes with custom nickname sequence /Create volume with data reduction sharing enabled /Create a single volume with QoS threshold settings (threshold) /Change the nickname the Volume settings of an existing volume tasks. |
|
Digit count for the numerical portion of volume names. Required for the Create multiple volumes with custom nickname sequence task. |
|
Initial number for volume name sequencing. Required for the Create multiple volumes with custom nickname sequence task. |
|
List of volume ID and new nickname pairs for bulk rename. Required for |
|
New nickname to assign to the volume (max 32 characters). |
|
ID of the volume to rename. |
|
Defines the volume operation type.
Choices:
|
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: none |
Specifies whether the module operates in check mode. |
Examples
- name: Create a volume with capacity and pool_id
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
capacity: 1GB
pool_id: 1
- name: Create multiple volumes with custom nickname sequence
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
number: 3
volume_name:
base_name: "DataVol"
start_number: 10
number_of_digits: 3
pool_id: 2
- name: Create volume with data reduction sharing enabled
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
capacity: 200MB
is_data_reduction_share_enabled: true
pool_id: 3
- name: Update volume with QoS threshold settings
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
volume_id: 12
qos_settings:
threshold:
is_upper_iops_enabled: true
upper_iops: 5000
is_lower_iops_enabled: true
lower_iops: 1000
is_upper_transfer_rate_enabled: true
upper_transfer_rate: 200
is_lower_transfer_rate_enabled: false
is_response_priority_enabled: true
response_priority: 2
- name: Attach volume to servers
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: attach_server
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
volume_id: 1234
server_ids:
- "server-01"
- "server-02"
- name: Detach volume from servers
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: detach_server
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
volume_id: 1234
server_ids:
- "server-01"
- name: Create volume with data reduction setting
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
capacity: 120GB
pool_id: 5
capacity_saving: "deduplication_and_compression"
- name: Delete volume by volume_id
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: absent
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
volume_id: 1234
- name: Bulk delete multiple volumes
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: delete_volumes_bulk
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
volume_ids:
- "100"
- "101"
- "102"
- name: Bulk rename multiple volumes
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: edit_volume_nicknames_bulk
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
volumes:
- volume_id: "100"
nickname: "prod-vol-100"
- volume_id: "101"
nickname: "prod-vol-101"
- volume_id: "102"
nickname: "prod-vol-102"
- name: Bulk enable ALUA mode on multiple volumes
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: edit_volume_alua_settings_bulk
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
alua_setting: "ENABLED"
volume_ids:
- "100"
- "101"
- "102"
- name: Bulk change capacity saving settings on multiple volumes
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: edit_volume_saving_settings_bulk
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
capacity_saving: "deduplication_and_compression"
volume_ids:
- "100"
- "101"
- "102"
- name: Bulk detach multiple volume-server connections
hitachivantara.vspone_block.vsp.hv_vsp_one_volume:
state: disconnect_volume_server_connections_bulk
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
connections:
- server_id: 10
volume_id: "100"
- server_id: 10
volume_id: "101"
- server_id: 11
volume_id: "102"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Information of the volume object. Returned: always |
|
Capacity saving setting (e.g., DISABLE). Returned: success |
|
Capacity saving status. Returned: success |
|
Whether compression acceleration is enabled. Returned: success |
|
Compression acceleration status. Returned: success |
|
Free capacity of the volume. Returned: success |
|
Free capacity in MB. Returned: success |
|
ID of the volume. Returned: success |
|
ID of the volume in hexadecimal. Returned: success |
|
Whether data reduction share is enabled. Returned: success |
|
List of LUNs associated with the volume. Returned: success |
|
Nickname of the volume. Returned: success |
|
Number of servers connected to the volume. Returned: success |
|
Number of snapshots for the volume. Returned: success |
|
ID of the pool. Returned: success |
|
Name of the pool. Returned: success |
|
QoS settings for the volume. Returned: success |
|
Reserved capacity of the volume. Returned: success |
|
Deprecated. Use Returned: success |
|
Total capacity of the volume. Returned: success |
|
Total capacity in MB. Returned: success |
|
Used capacity of the volume. Returned: success |
|
Used capacity in MB. Returned: success |
|
List of volume types. Returned: success |