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

Requirements

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

  • python >= 3.9

Parameters

Parameter

Comments

connection_info

dictionary / required

Information required to establish a connection to the storage system.

address

string / required

IP address or hostname of the storage system.

api_token

string

Token used to operate on locked resources.

ca_cert

string

Path to a CA certificate file or directory on the Ansible control node used to verify the storage system SSL certificate.

Required when connection_info.validate_cert is true and the storage system uses a self-signed or privately issued certificate.

Accepts a PEM file path or a directory of hashed CA certificates.

client_cert

string

Path to client SSL certificate file or CA certificate directory for mutual TLS authentication.

Must be provided together with connection_info.client_key.

client_key

string

Path to the client private key file for mutual TLS authentication.

Must be provided together with connection_info.client_cert.

password

string

Password for authentication. This is a required field.

suppress_validate_cert_warning

boolean

Whether to suppress the SSL certificate validation warning.

When set to false (default), a warning is displayed if certificate validation is disabled.

Set to true to suppress the warning.

Choices:

  • false ← (default)

  • true

username

string

Username for authentication. This is a required field.

validate_cert

boolean

Whether to validate the storage system SSL certificate.

When set to false (default), certificate validation is disabled. A security warning will be displayed unless connection_info.suppress_validate_cert_warning is true.

Set to true to enable certificate validation. When true, provide connection_info.ca_cert if the storage system uses a self-signed certificate.

Note: Starting with major version 5.0, the default value will change to true. It is strongly recommended to enable certificate validation in production environments.

Choices:

  • false ← (default)

  • true

spec

dictionary / required

Configuration parameters for the volume operation.

alua_setting

string

ALUA mode to apply to all volumes in the batch.

Required for edit_volume_alua_settings_bulk.

Choices:

  • "ENABLED"

  • "DISABLED"

capacity

string

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.

capacity_saving

aliases: saving_setting

string

Data reduction function configuration.

Required for present when creating/updating a volume with capacity saving.

Required for edit_volume_saving_settings_bulk to change saving settings on multiple volumes.

Choices:

  • "compression"

  • "deduplication_and_compression"

  • "disable"

compression_acceleration

boolean

Controls compression acceleration feature.

Used with present or edit_volume_saving_settings_bulk.

Choices:

  • false

  • true

connections

list / elements=dictionary

List of volume-server pairs to disconnect.

Required for disconnect_volume_server_connections_bulk. Maximum 1000 pairs.

server_id

integer / required

ID of the server to disconnect from.

volume_id

string / required

ID of the volume to disconnect.

is_data_reduction_share_enabled

boolean

Activates data reduction sharing functionality. Required for the Create volume with data reduction sharing enabled task.

Choices:

  • false ← (default)

  • true

number_of_volumes

integer

Quantity of volumes to create. Required for the Create multiple volumes with custom nickname sequence task.

Default: 1

pool_id

integer

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.

qos_settings

dictionary

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.

alert_setting

dictionary

QoS alert configuration. Required for the Change the alert QoS settings of an existing volume task.

is_lower_alert_enabled

boolean

Activates lower threshold alerts. Required for the Change the alert QoS settings of an existing volume task.

Choices:

  • false

  • true

is_response_alert_enabled

boolean

Activates response time alerts. Required for the Change the alert QoS settings of an existing volume task.

Choices:

  • false

  • true

is_upper_alert_enabled

boolean

Activates upper threshold alerts. Required for the Change the alert QoS settings of an existing volume task.

Choices:

  • false

  • true

lower_alert_allowable_time

integer

Permitted duration for lower threshold alerts. Required for the Change the alert QoS settings of an existing volume task.

response_alert_allowable_time

integer

Permitted duration for response time alerts. Required for the Change the alert QoS settings of an existing volume task.

upper_alert_allowable_time

integer

Permitted duration for upper threshold alerts. Required for the Change the alert QoS settings of an existing volume task.

threshold

dictionary

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.

is_lower_iops_enabled

boolean

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:

  • false

  • true

is_lower_transfer_rate_enabled

boolean

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:

  • false

  • true

is_response_priority_enabled

boolean

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:

  • false

  • true

is_upper_iops_enabled

boolean

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:

  • false

  • true

is_upper_transfer_rate_enabled

boolean

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:

  • false

  • true

lower_iops

integer

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.

lower_transfer_rate

integer

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

integer

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.

upper_iops

integer

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.

upper_transfer_rate

integer

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.

server_ids

list / elements=integer

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.

virtual_volume_id_clear_option

string

Controls how virtual volume IDs are cleared when deleting volumes.

Optional for delete_volumes_bulk. If RESET, virtual IDs are reset to defaults.

Choices:

  • "RESET"

volume_id

string

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.

volume_ids

list / elements=string

Collection of volume identifiers for batch operations.

Required for server_present to attach multiple volumes to multiple servers.

Required for delete_volumes_bulk to delete multiple volumes (max 1000).

Required for edit_volume_alua_settings_bulk to set ALUA mode on multiple volumes (max 64).

Required for edit_volume_saving_settings_bulk to change saving settings on multiple volumes (max 1000).

volume_name

dictionary

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.

base_name

string / required

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.

number_of_digits

integer

Digit count for the numerical portion of volume names. Required for the Create multiple volumes with custom nickname sequence task.

start_number

integer

Initial number for volume name sequencing. Required for the Create multiple volumes with custom nickname sequence task.

volumes

list / elements=dictionary

List of volume ID and new nickname pairs for bulk rename.

Required for edit_volume_nicknames_bulk. Maximum 32 entries.

nickname

string / required

New nickname to assign to the volume (max 32 characters).

volume_id

string / required

ID of the volume to rename.

state

string

Defines the volume operation type.

present creates or updates a volume.

absent deletes a single volume.

attach_server attaches a volume to one or more servers.

detach_server detaches a volume from one or more servers.

server_present attaches multiple volumes to multiple servers in one call.

change_qos_settings updates QoS settings for a volume.

delete_volumes_bulk deletes up to 1000 volumes in a single API call.

edit_volume_nicknames_bulk renames up to 32 volumes in a single synchronous API call.

edit_volume_alua_settings_bulk changes the ALUA mode for up to 64 volumes in a single synchronous API call.

edit_volume_saving_settings_bulk changes capacity saving settings for up to 1000 volumes in a single API call.

disconnect_volume_server_connections_bulk detaches up to 1000 volume-server pairs in a single API call.

Choices:

  • "present" ← (default)

  • "absent"

  • "attach_server"

  • "detach_server"

  • "change_qos_settings"

  • "server_present"

  • "delete_volumes_bulk"

  • "edit_volume_nicknames_bulk"

  • "edit_volume_alua_settings_bulk"

  • "edit_volume_saving_settings_bulk"

  • "disconnect_volume_server_connections_bulk"

Attributes

Attribute

Support

Description

check_mode

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

volume

list / elements=dictionary

Information of the volume object.

Returned: always

capacity_saving

string

Capacity saving setting (e.g., DISABLE).

Returned: success

capacity_saving_status

string

Capacity saving status.

Returned: success

compression_acceleration

boolean

Whether compression acceleration is enabled.

Returned: success

compression_acceleration_status

string

Compression acceleration status.

Returned: success

free_capacity

integer

Free capacity of the volume.

Returned: success

free_capacity_in_mb

integer

Free capacity in MB.

Returned: success

id

integer

ID of the volume.

Returned: success

id_hex

string

ID of the volume in hexadecimal.

Returned: success

is_data_reduction_share_enabled

boolean

Whether data reduction share is enabled.

Returned: success

luns

list / elements=dictionary

List of LUNs associated with the volume.

Returned: success

nickname

string

Nickname of the volume.

Returned: success

number_of_connecting_servers

integer

Number of servers connected to the volume.

Returned: success

number_of_snapshots

integer

Number of snapshots for the volume.

Returned: success

pool_id

integer

ID of the pool.

Returned: success

pool_name

string

Name of the pool.

Returned: success

qos_settings

dictionary

QoS settings for the volume.

Returned: success

reserved_capacity

integer

Reserved capacity of the volume.

Returned: success

saving_setting

string

Deprecated. Use capacity_saving instead.

Returned: success

total_capacity

integer

Total capacity of the volume.

Returned: success

total_capacity_in_mb

integer

Total capacity in MB.

Returned: success

used_capacity

integer

Used capacity of the volume.

Returned: success

used_capacity_in_mb

integer

Used capacity in MB.

Returned: success

volume_types

list / elements=string

List of volume types.

Returned: success

Authors

  • Hitachi Vantara LTD (@hitachi-vantara)