hitachivantara.vspone_block.vsp.hv_ldev_bulk module – Manages multiple logical devices (LDEVs) in bulk on VSP block storage systems.

Note

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

New in hitachivantara.vspone_block 4.7.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.

connection_type

string

Type of connection to the storage system.

Choices:

  • "direct" ← (default)

password

string

Password for authentication. This is a required field.

username

string

Username for authentication. This is a required field.

spec

dictionary / required

Specification for bulk LDEV operations. Supports creating, modifying, or deleting multiple LDEVs.

capacity_saving

string

Whether to enable the capacity saving functions for all LDEVs in the bulk operation. Valid value is one of the following three options: - 1. compression - Enable the capacity saving function (compression). - 2. compression_deduplication - Enable the capacity saving function (compression and deduplication). - 3 disabled - Disable the capacity saving function (compression and deduplication) Default value is disabled. This setting will be applied to all LDEVs created in the bulk operation. Optional for bulk creating multiple LDEVs within a range of LDEV IDs using parallel execution. Required for bulk creating multiple LDEVs with capacity saving and data_reduction_share.

clpr_id

integer

The CLPR (Control Logical Partition) ID to which all LDEVs will be assigned. This is used for specifying the CLPR for multiple LDEVs. If not specified, the LDEVs will be assigned to the default CLPR. This setting will be applied to all LDEVs in the bulk operation. Required for bulk setting CLPR ID for multiple volumes.

cylinder

integer

The cylinder number for Mainframe LDEVs. This is used for specifying the cylinder for multiple LDEVs. This setting will be applied to all mainframe LDEVs in the bulk operation.

data_reduction_process_mode

string

The data reduction process mode of the capacity saving function for all LDEVs. This setting will be applied to all LDEVs in the bulk operation. Valid values are: - “post_process” - Post-process mode. - “inline” - Inline mode. Optional for bulk changing settings for multiple volumes.

Choices:

  • "post_process"

  • "inline"

data_reduction_share

boolean

Specify whether to create data reduction shared volumes for all LDEVs in the bulk operation. This value is set to true for Thin Image Advance. This setting will be applied to all LDEVs created in the bulk operation. Required for bulk creating multiple LDEVs with capacity saving and data_reduction_share.

Choices:

  • false

  • true

emulation_type

string

The emulation type for Mainframe LDEVs. This is used for specifying the emulation type for multiple LDEVs. This setting will be applied to all mainframe LDEVs in the bulk operation. Example values are 3390-A and 3390-V.

end_ldev_id

string

The ending LDEV ID for the range of LDEVs to be created in bulk. Used to define the end of the LDEV ID range for bulk creation. All LDEVs from start_ldev_id to end_ldev_id will be created. Can be decimal or hexadecimal. Required for bulk creating multiple LDEVs within a range of LDEV IDs using parallel execution.

external_parity_group

string

The external parity group ID to which the LDEVs will be assigned. This is used for specifying the external parity group for multiple LDEVs in bulk operations. If not specified, the LDEVs will be assigned to the default parity group. Optional for bulk creating multiple LDEVs using external parity group and auto free LDEV ID selection.

force

boolean

Force delete multiple LDEVs. Deletes the LDEVs and removes them from hostgroups, iscsi targets or NVM subsystem namespace. When used with bulk operations, this will apply to all specified LDEVs in ldev_ids list. Required for bulk force deleting multiple LDEVs and removing them from hostgroups, iSCSI targets or NVM subsystem namespace.

Choices:

  • false

  • true

format_type

string

The format type for multiple volumes. Valid values are: - “quick” - Quick formatting. - “normal” - Normal formatting. It may take time to finish the formatting process for all volumes. This format type will be applied to all LDEVs in the bulk operation. Optional for bulk formatting multiple volumes.

Choices:

  • "quick" ← (default)

  • "normal"

host_nqns

list / elements=string

List of host NQNs to add to or remove from multiple LDEVs depending on the state value. When used in bulk operations, these NQNs will be applied to all specified LDEVs. Optional for bulk operations with NVM subsystems.

is_alua_enabled

boolean

Whether the ALUA (Asymmetric Logical Unit Access) is enabled for all LDEVs. This setting will be applied to all LDEVs in the bulk operation. Optional for bulk changing settings for multiple volumes.

Choices:

  • false

  • true

is_compression_acceleration_enabled

boolean

Whether the compression accelerator of the capacity saving function is enabled for all LDEVs. This setting will be applied to all LDEVs in the bulk operation. Optional for bulk creating multiple LDEVs within a range of LDEV IDs using parallel execution /Bulk changing settings for multiple volumes.

Choices:

  • false

  • true

is_ese_volume

boolean

Whether the LDEVs are ESE (Enhanced Space Efficiency) volumes. This is used for specifying if multiple LDEVs are ESE volumes. This setting will be applied to all LDEVs in the bulk operation.

Choices:

  • false

  • true

is_full_allocation_enabled

boolean

Whether the LDEVs are full allocation volumes. This setting will be applied to all LDEVs in the bulk operation. Optional for bulk changing settings for multiple volumes.

Choices:

  • false

  • true

is_parallel_execution_enabled

boolean

Whether to enable parallel execution for bulk LDEV operations. This significantly speeds up bulk operations. If set to true, multiple LDEV operations will be executed in parallel. Highly recommended when working with large numbers of LDEVs. Required for bulk creating multiple LDEVs within a range of LDEV IDs using parallel execution.

Choices:

  • false

  • true

is_relocation_enabled

boolean

Specify whether to enable the tier relocation setting for multiple HDT volumes. This setting will be applied to all LDEVs in the bulk operation. Optional for bulk changing settings for multiple volumes /Bulk creating multiple new volumes with tiering policy.

Choices:

  • false

  • true

is_tse_volume

boolean

Whether the LDEVs are TSE (Thin Provisioning with Space Efficiency) volumes. This is used for specifying if multiple LDEVs are TSE volumes. This setting will be applied to all LDEVs in the bulk operation.

Choices:

  • false

  • true

ldev_ids

list / elements=integer

A list of LDEV IDs for bulk operations. Specify multiple LDEV IDs to perform operations on them simultaneously. Use this for bulk delete, bulk update, bulk format, or other bulk operations on existing LDEVs. Example: [100, 101, 102, 103, 104].

mp_blade_id

integer

The MP blade ID to which all LDEVs will be assigned. This is used for specifying the MP blade for multiple LDEVs. If not specified, the LDEVs will be assigned to the default MP blade. This setting will be applied to all LDEVs in the bulk operation. Optional for bulk setting MP blade ID for multiple volumes.

name

string

Name for a single LDEV (optional). For bulk operations, use the ‘names’ parameter instead. If given, the LDEV name will be ‘name-<ldev_id>’. If not given and ‘names’ is not specified, assigns default names to LDEVs as “name-<ldev_id>” if start_ldev_id and end_ldev_id are specified,otherwise “smrha-<ldev_id>”. This naming convention is applicable for both single and bulk LDEV creation.

names

dictionary

Names configuration for multiple LDEVs in bulk operations. This is used for automatically generating sequential names for multiple LDEVs. Example: base_name=”vol”, start_number=1, number_of_digits=3 generates vol001, vol002, vol003, etc.

base_name

string

The base name prefix for the LDEVs in bulk operation. The actual name of each LDEV will be generated by appending a sequential number to this base name. Example: base_name=”prod_vol” generates prod_vol001, prod_vol002, etc.

Default: "smrha"

number_of_digits

integer

The number of digits for the sequential number in the generated LDEV names. Used for zero-padding. Example: number_of_digits=4 generates 0001, 0002, 0003, etc. Used in conjunction with base_name to generate names for multiple LDEVs.

Default: 3

start_number

integer

The starting number for generating sequential LDEV names in bulk operations. Used in conjunction with base_name to generate names for multiple LDEVs. Example: start_number=5 with base_name=”vol” generates vol005, vol006, etc.

Default: 0

number_of_ldevs

integer

The number of LDEVs to be created in the bulk operation. The system will automatically assign free LDEV IDs for the specified number of LDEVs. Use this when you want to create a specific count of LDEVs without specifying exact LDEV IDs. Example: number_of_ldevs=10 will create 10 new LDEVs.

nvm_subsystem_name

string

Specify the NVM subsystem name where LDEVs will be presented. Can be used for bulk presenting multiple LDEVs to an NVM subsystem. Optional for bulk operations involving NVM subsystems.

parity_group_id

string

ID of the parity_group where the LDEVs will be created. Options pool_id and parity_group_id are mutually exclusive. Required for bulk creating multiple LDEVs using a parity group and auto-free LDEV ID selection.

pool_id

integer

ID of the pool where the LDEVs will be created. Options pool_id and parity_group_id are mutually exclusive. Required for bulk creating multiple LDEVs within a pool /Creating multiple LDEVs within a range of LDEV IDs using parallel execution /Creating multiple LDEVs with capacity saving and data_reduction_share /Configuring QoS settings for multiple volumes /Creating multiple volumes with tiering policy /Creating multiple volumes with virtual ldev assignment.

qos_settings

dictionary

QoS settings to be applied to multiple LDEVs in the bulk operation. These settings will be applied to all LDEVs specified in ldev_ids or all newly created LDEVs. Required for bulk configuring QoS settings for multiple existing volumes /Bulk configuring QoS settings for multiple new volumes.

lower_alert_allowable_time

integer

Lower alert allowable time to be applied to all LDEVs in the bulk operation. Optional for bulk configuring QoS settings for multiple existing/new volumes.

lower_iops

integer

Lower IOPS limit to be applied to all LDEVs in the bulk operation. Optional for bulk configuring QoS settings for multiple existing/new volumes.

lower_transfer_rate

integer

Lower transfer rate limit to be applied to all LDEVs in the bulk operation. Optional for bulk configuring QoS settings for multiple existing/new volumes.

response_alert_allowable_time

integer

Response alert allowable time to be applied to all LDEVs in the bulk operation. Optional for bulk configuring QoS settings for multiple existing/new volumes.

response_priority

integer

Response priority to be applied to all LDEVs in the bulk operation. Optional for bulk configuring QoS settings for multiple existing/new volumes.

upper_alert_allowable_time

integer

Upper alert allowable time to be applied to all LDEVs in the bulk operation. Optional for bulk configuring QoS settings for multiple existing/new volumes.

upper_iops

integer

Upper IOPS limit to be applied to all LDEVs in the bulk operation. Optional for bulk configuring QoS settings for multiple existing/new volumes.

upper_transfer_rate

integer

Upper transfer rate limit to be applied to all LDEVs in the bulk operation. Optional for bulk configuring QoS settings for multiple existing/new volumes.

resource_group_id

integer

The resource group ID for multiple LDEVs. This is used for specifying the resource group for multiple LDEVs. This setting will be applied to all LDEVs in the bulk operation.

should_format_volume

boolean

Whether to format multiple volumes after creation or for existing volumes. When set to true, all LDEVs specified in ldev_ids will be formatted. Required for bulk formatting multiple volumes.

Choices:

  • false

  • true

should_reclaim_zero_pages

boolean

Whether to reclaim zero pages of multiple DP volumes. This is used to reclaim space in multiple DP volumes. If set to true, it will reclaim the zero pages of all specified DP volumes. Required for bulk reclaiming zero pages of multiple DP volumes.

Choices:

  • false

  • true

should_shred_volume_enable

boolean

Shreds multiple LDEVs (basic volumes) or DP volumes. Overwrites each volume three times with dummy data. When used with bulk operations, this will apply to all specified LDEVs in ldev_ids list. Required for bulk shredding multiple existing volumes /Bulk shredding multiple existing volumes before deleting.

Choices:

  • false

  • true

should_stop_all_volume_format

boolean

Whether to stop all ongoing volume format operations for multiple volumes. This is used to stop ongoing volume format tasks across multiple LDEVs. If set to true, it will stop all volume format operations. Optional for stopping all volume format operations in bulk.

Choices:

  • false

  • true

size

string

Size for each LDEV. Can be specified in units such as GB, TB, or MB (e.g., ‘10GB’, ‘5TB’, ‘100MB’, 200). This size will be applied to all LDEVs created in the bulk operation. Required for bulk creating multiple LDEVs within a range of LDEV IDs using parallel execution /Expanding the size of multiple LDEVs /Creating multiple LDEVs using a parity group and auto-free LDEV ID selection /Creating multiple LDEVs using external parity group and auto free LDEV ID selection /Creating multiple LDEVs with capacity saving and data_reduction_share /Configuring QoS settings for multiple new volumes /Creating multiple new volumes with tiering policy.

ssid

string

The SSID (Subsystem ID) for Mainframe LDEVs. This is used for specifying the SSID for multiple LDEVs. If not specified, the default SSID will be used for all LDEVs. If specified, it will use the specified SSID. This setting will be applied to all mainframe LDEVs in the bulk operation.

start_ldev_id

string

The starting LDEV ID for the range of LDEVs to be created in bulk. Used to define the beginning of the LDEV ID range for bulk creation. If not specified, a free LDEV ID will be assigned. Can be decimal or hexadecimal. Required for bulk creating multiple LDEVs within a range of LDEV IDs using parallel execution.

state

string

State of the NVM subsystems task for bulk operations. This is valid only when nvm_subsystem_name is specified.

add_host_nqn - Add the host NQNs to multiple LDEVs.

remove_host_nqn - Remove the host NQNs from multiple LDEVs.

Optional for bulk operations with NVM subsystems.

Choices:

  • "add_host_nqn" ← (default)

  • "remove_host_nqn"

tier_level_for_new_page_allocation

string

Specify which tier of the HDT pool will be prioritized when a new page is allocated for multiple volumes. This setting will be applied to all LDEVs in the bulk operation. Optional for bulk creating multiple new volumes with tiering policy.

tiering_policy

dictionary

Tiering policy to be applied to multiple LDEVs in the bulk operation. This setting will be applied to all LDEVs in the bulk operation. Optional for bulk creating multiple new volumes with tiering policy.

tier1_allocation_rate_max

integer

Tier1 max, a value from 1 to 100. Applied to all LDEVs in the bulk operation. Optional for bulk creating multiple new volumes with tiering policy.

tier1_allocation_rate_min

integer

Tier1 min, a value from 1 to 100. Applied to all LDEVs in the bulk operation. Optional for bulk creating multiple new volumes with tiering policy.

tier3_allocation_rate_max

integer

Tier3 max, a value from 1 to 100. Applied to all LDEVs in the bulk operation. Optional for bulk creating multiple new volumes with tiering policy.

tier3_allocation_rate_min

integer

Tier3 min, a value from 1 to 100. Applied to all LDEVs in the bulk operation. Optional for bulk creating multiple new volumes with tiering policy.

tier_level

integer

Tier level, a value from 0 to 31. Applied to all LDEVs in the bulk operation. Optional for bulk creating multiple new volumes with tiering policy.

vldev_ids

list / elements=integer

A list of virtual LDEV IDs for bulk virtual LDEV assignment operations. Use this to assign virtual LDEVs to multiple LDEVs in bulk. Must be used in conjunction with ldev_ids and state=’assign_virtual_ldev’.

state

string

The desired state for bulk LDEV operations.

Choices:

  • "present" ← (default)

  • "absent"

  • "assign_virtual_ldev"

storage_system_info

dictionary

Information about the storage system. This field is an optional field.

serial

string

The serial number of the storage system.

Attributes

Attribute

Support

Description

check_mode

Support: none

Determines if the module should run in check mode.

Notes

Note

  • The output parameters entitlement_status, subscriber_id and partner_id were removed in version 3.4.0. They were also deprecated due to internal API simplification and are no longer supported.

  • Connection type gateway was removed starting from version 3.4.0. Please use an earlier version if you require this connection type.

Examples

- name: Create multiple LDEVs within a range using parallel execution
  hitachivantara.vspone_block.vsp.hv_ldev_bulk:
    state: present
    connection_info:
      address: storage.company.com
      username: "admin"
      password: "passw0rd"
    spec:
      pool_id: 1
      size: "10GB"
      start_ldev_id: 100
      end_ldev_id: 110
      is_parallel_execution_enabled: true
      names:
        base_name: "bulk_vol"
        start_number: 1
        number_of_digits: 3

- name: Create multiple LDEVs with specific count
  hitachivantara.vspone_block.vsp.hv_ldev_bulk:
    state: present
    connection_info:
      address: storage.company.com
      username: "admin"
      password: "passw0rd"
    spec:
      pool_id: 1
      size: "20GB"
      number_of_ldevs: 5
      capacity_saving: "compression_deduplication"
      names:
        base_name: "prod_vol"
        start_number: 1

- name: Delete multiple LDEVs in bulk
  hitachivantara.vspone_block.vsp.hv_ldev_bulk:
    state: absent
    connection_info:
      address: storage.company.com
      username: "admin"
      password: "passw0rd"
    spec:
      ldev_ids: [100, 101, 102, 103, 104]
      force: true

- name: Update QoS settings for multiple LDEVs
  hitachivantara.vspone_block.vsp.hv_ldev_bulk:
    state: present
    connection_info:
      address: storage.company.com
      username: "admin"
      password: "passw0rd"
    spec:
      ldev_ids: [100, 101, 102]
      qos_settings:
        upper_iops: 1000
        lower_iops: 500
        upper_transfer_rate: 1000
        lower_transfer_rate: 500

- name: Format multiple volumes in bulk
  hitachivantara.vspone_block.vsp.hv_ldev_bulk:
    connection_info:
      address: storage.company.com
      username: "admin"
      password: "passw0rd"
    state: "present"
    spec:
      ldev_ids: [100, 101, 102, 103]
      should_format_volume: true
      format_type: "quick"

- name: Assign virtual LDEVs to multiple LDEVs
  hitachivantara.vspone_block.vsp.hv_ldev_bulk:
    connection_info:
      address: storage.company.com
      username: "admin"
      password: "passw0rd"
    state: "assign_virtual_ldev"
    spec:
      ldev_ids: [100, 101, 102]
      vldev_ids: [200, 201, 202]

- name: Reclaim zero pages for multiple DP volumes
  hitachivantara.vspone_block.vsp.hv_ldev_bulk:
    connection_info:
      address: storage.company.com
      username: "admin"
      password: "passw0rd"
    state: "present"
    spec:
      ldev_ids: [100, 101, 102]
      should_reclaim_zero_pages: true

- name: Create multiple mainframe LDEVs with specific configuration
  hitachivantara.vspone_block.vsp.hv_ldev_bulk:
    connection_info:
      address: storage.company.com
      username: "admin"
      password: "passw0rd"
    state: "present"
    spec:
      pool_id: 1
      cylinder: 65945
      emulation_type: "3390-V"
      number_of_ldevs: 10
      ssid: "000C"
      names:
        base_name: "mf_vol"
        start_number: 1
        number_of_digits: 4

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

volumes

list / elements=dictionary

Storage volume with its attributes.

Returned: success

canonical_name

string

Unique identifier for the volume.

Returned: success

Sample: "naa.60060e8028273d005080273d00000102"

clpr_id

integer

CLPR (Control Logical Partition) ID.

Returned: success

Sample: 0

compression_acceleration_status

string

Status of compression accelerator.

Returned: success

Sample: "ENABLED"

cylinder

integer

Cylinder number for mainframe volumes.

Returned: success

Sample: 65945

data_reduction_process_mode

string

Data reduction process mode.

Returned: success

Sample: "inline"

dedup_compression_progress

integer

Progress percentage of deduplication and compression.

Returned: success

Sample: -1

dedup_compression_status

string

Status of deduplication and compression.

Returned: success

Sample: "ENABLED"

deduplication_compression_mode

string

Mode of deduplication and compression.

Returned: success

Sample: "compression_deduplication"

emulation_type

string

Emulation type of the volume.

Returned: success

Sample: "3390-V-CVS"

hostgroups

list / elements=dictionary

List of host groups associated with the volume.

Returned: success

Sample: []

is_alua

boolean

Indicates if ALUA is enabled.

Returned: success

Sample: false

is_command_device

boolean

Indicates if the volume is a command device.

Returned: success

is_compression_acceleration_enabled

boolean

Whether compression accelerator is enabled.

Returned: success

Sample: true

is_data_reduction_share_enabled

boolean

Indicates if data reduction share is enabled.

Returned: success

Sample: true

is_device_group_definition_enabled

boolean

Indicates if device group definition is enabled.

Returned: success

is_encryption_enabled

boolean

Indicates if encryption is enabled.

Returned: success

Sample: false

is_full_allocation_enabled

boolean

Indicates if full allocation is enabled.

Returned: success

Sample: false

is_relocation_enabled

boolean

Indicates if tier relocation is enabled.

Returned: success

is_security_enabled

boolean

Indicates if security is enabled.

Returned: success

is_user_authentication_enabled

boolean

Indicates if user authentication is enabled.

Returned: success

is_write_protected

boolean

Indicates if write protection is enabled.

Returned: success

is_write_protected_by_key

boolean

Indicates if write protection by key is enabled.

Returned: success

iscsi_targets

list / elements=dictionary

List of iSCSI targets associated with the volume.

Returned: success

Sample: []

ldev_id

integer

Logical Device ID.

Returned: success

Sample: 10010

ldev_id_hex

string

Logical Device ID in hexadecimal.

Returned: success

Sample: "00:27:1A"

mp_blade_id

integer

MP blade ID.

Returned: success

Sample: 3

name

string

Name of the volume.

Returned: success

Sample: "smrha-258"

num_of_ports

integer

Number of ports associated with the volume.

Returned: success

Sample: 2

nvm_subsystems

list / elements=dictionary

List of NVMe subsystems associated with the volume.

Returned: success

Sample: []

parent_volume_id

integer

Parent volume ID for snapshot volumes.

Returned: success

Sample: -1

parent_volume_id_hex

string

Parent volume ID in hexadecimal format.

Returned: success

Sample: "-0:00:01"

parity_group_id

string

Parity group ID.

Returned: success

Sample: "1-8"

path_count

integer

Path count to the volume.

Returned: success

Sample: 2

pool_id

integer

Pool ID where the volume resides.

Returned: success

Sample: 13

ports

list / elements=dictionary

List of ports associated with the volume.

Returned: success

Sample: [{"host_group_name": "1C-G00", "host_group_number": 156, "lun": 26, "port_id": "CL1-C"}]

host_group_name

string

Host group name.

Returned: success

Sample: "1C-G00"

host_group_number

integer

Host group number.

Returned: success

Sample: 156

lun

integer

Logical Unit Number.

Returned: success

Sample: 26

port_id

string

Port identifier.

Returned: success

Sample: "CL1-C"

provision_type

string

Provisioning type of the volume.

Returned: success

Sample: "CVS"

qos_settings

dictionary

QoS settings for the volume.

Returned: success

resource_group_id

integer

Resource group ID of the volume.

Returned: success

Sample: 0

snapshots

list / elements=dictionary

List of snapshots associated with the volume.

Returned: success

Sample: []

ssid

string

Subsystem ID for mainframe volumes.

Returned: success

Sample: "000C"

status

string

Current status of the volume.

Returned: success

Sample: "NML"

storage_serial_number

string

Serial number of the storage system.

Returned: success

Sample: "70033"

tiering_policy

dictionary

Tiering policy details.

Returned: success

Sample: {}

total_capacity

string

Total capacity of the volume.

Returned: success

Sample: "54.71GB"

total_capacity_in_mb

float

Total capacity of the volume in megabytes.

Returned: success

Sample: 56023.04

used_capacity

string

Used capacity of the volume.

Returned: success

Sample: "0.00B"

used_capacity_in_mb

float

Used capacity of the volume in megabytes.

Returned: success

Sample: 0.0

virtual_ldev_id

integer

Virtual Logical Device ID.

Returned: success

Sample: -1

virtual_ldev_id_hex

string

Virtual Logical Device ID in hexadecimal.

Returned: success

Sample: ""

Authors

  • Hitachi Vantara LTD (@hitachi-vantara)