hitachivantara.vspone_block.vsp.hv_vsp_one_volume module – Manages volumes on Hitachi VSP One storage systems.

Note

This module is part of the hitachivantara.vspone_block collection (version 4.2.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.

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.

compression_acceleration

boolean

Controls compression acceleration feature.

Choices:

  • false

  • true

is_data_reduction_share_enabled

boolean

Activates data reduction sharing functionality.

Choices:

  • false ← (default)

  • true

number_of_volumes

integer

Quantity of volumes to create.

Default: 1

pool_id

integer

Storage pool identifier.

qos_settings

dictionary

Quality of service configuration for the volume.

alert_setting

dictionary

QoS alert configuration.

is_lower_alert_enabled

boolean

Activates lower threshold alerts.

Choices:

  • false

  • true

is_response_alert_enabled

boolean

Activates response time alerts.

Choices:

  • false

  • true

is_upper_alert_enabled

boolean

Activates upper threshold alerts.

Choices:

  • false

  • true

lower_alert_allowable_time

integer

Permitted duration for lower threshold alerts.

response_alert_allowable_time

integer

Permitted duration for response time alerts.

upper_alert_allowable_time

integer

Permitted duration for upper threshold alerts.

threshold

dictionary

QoS threshold configuration.

is_lower_iops_enabled

boolean

Activates minimum IOPS restriction.

Choices:

  • false

  • true

is_lower_transfer_rate_enabled

boolean

Activates minimum transfer rate restriction.

Choices:

  • false

  • true

is_response_priority_enabled

boolean

Activates response priority setting.

Choices:

  • false

  • true

is_upper_iops_enabled

boolean

Activates maximum IOPS restriction.

Choices:

  • false

  • true

is_upper_transfer_rate_enabled

boolean

Activates maximum transfer rate restriction.

Choices:

  • false

  • true

lower_iops

integer

Minimum IOPS threshold.

lower_transfer_rate

integer

Minimum transfer rate threshold.

response_priority

integer

Response priority level.

upper_iops

integer

Maximum IOPS threshold.

upper_transfer_rate

integer

Maximum transfer rate threshold.

saving_setting

string

Data reduction function configuration.

Choices:

  • "compression"

  • "deduplication_and_compression"

  • "disabled"

server_ids

list / elements=integer

Collection of server identifiers for volume attachment.

volume_id

integer

Volume identifier.

volume_name

dictionary

Naming configuration for the volume.

base_name

string / required

Foundation name for volume naming.

number_of_digits

integer

Digit count for the numerical portion of volume names.

start_number

integer

Initial number for volume name sequencing.

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"

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
      saving_setting: "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_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

string

Free capacity in MB.

Returned: success

id

integer

ID of the volume.

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

Saving setting (e.g., COMPRESSION).

Returned: success

total_capacity

integer

Total capacity of the volume.

Returned: success

total_capacity_in_mb

string

Total capacity in MB.

Returned: success

used_capacity

integer

Used capacity of the volume.

Returned: success

used_capacity_in_mb

string

Used capacity in MB.

Returned: success

volume_types

list / elements=string

List of volume types.

Returned: success

Authors

  • Hitachi Vantara LTD (@hitachi-vantara)