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.6.1).

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.

password

string

Password for authentication. This is a required field.

username

string

Username for authentication. This is a required field.

spec

dictionary / required

Configuration parameters for the volume operation.

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 the Create volume with data reduction sharing enabled /Update the Volume saving settings and compression_acceleration of an existing volume tasks.

Choices:

  • "compression"

  • "deduplication_and_compression"

  • "disable"

compression_acceleration

boolean

Controls compression acceleration feature. Required for the Update the Volume saving settings and compression_acceleration of an existing volume task.

Choices:

  • false

  • true

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.

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 to add servers. Required for the Attach multiple volumes to a multiple servers in one operation task.

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.

state

string

Defines the volume operation type. Available options include present, absent, attach_server, and detach_server.

Choices:

  • "present" ← (default)

  • "absent"

  • "attach_server"

  • "detach_server"

  • "change_qos_settings"

  • "server_present"

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

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

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)