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
This module is designed for bulk operations on logical devices (LDEVs) on VSP block storage systems.
It allows for efficient creation, modification, or deletion of multiple LDEVs in a single operation.
Supports parallel execution for faster processing of bulk LDEV operations.
Use this module when you need to perform operations on multiple LDEVs simultaneously.
For single LDEV operations, use the `hv_ldev` module instead.
For creating multiple volumes on VSP One Block or VSP E Series storage systems, you can also use `hv_vsp_one_volume` module for optimized execution.
For examples, go to URL https://github.com/hitachi-vantara/vspone-block-ansible/blob/main/playbooks/vsp_direct/ldev.yml
For examples to create multiple LDEVs, go to URL https://github.com/hitachi-vantara/vspone-block-ansible/blob/main/playbooks/vsp_direct/ldev_bulk.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. |
|
Type of connection to the storage system. Choices:
|
|
Password for authentication. This is a required field. |
|
Username for authentication. This is a required field. |
|
Specification for bulk LDEV operations. Supports creating, modifying, or deleting multiple LDEVs. |
|
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. |
|
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. |
|
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. |
|
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:
|
|
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:
|
|
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. |
|
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. |
|
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 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:
|
|
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:
|
|
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. |
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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]. |
|
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 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 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. |
|
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: |
|
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: |
|
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: |
|
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. |
|
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. |
|
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. |
|
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 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 to be applied to all LDEVs in the bulk operation. Optional for bulk configuring QoS settings for multiple existing/new volumes. |
|
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 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 to be applied to all LDEVs in the bulk operation. Optional for bulk configuring QoS settings for multiple existing/new volumes. |
|
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 to be applied to all LDEVs in the bulk operation. Optional for bulk configuring QoS settings for multiple existing/new volumes. |
|
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 limit to be applied to all LDEVs in the bulk operation. Optional for bulk configuring QoS settings for multiple existing/new volumes. |
|
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. |
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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. |
|
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. |
|
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 of the NVM subsystems task for bulk operations. This is valid only when nvm_subsystem_name is specified.
Optional for bulk operations with NVM subsystems. Choices:
|
|
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 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 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 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 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 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, a value from 0 to 31. Applied to all LDEVs in the bulk operation. Optional for bulk creating multiple new volumes with tiering policy. |
|
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’. |
|
The desired state for bulk LDEV operations. Choices:
|
|
Information about the storage system. This field is an optional field. |
|
The serial number of the storage system. |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: none |
Determines if the module should run in check mode. |
Notes
Note
The output parameters
entitlement_status,subscriber_idandpartner_idwere removed in version 3.4.0. They were also deprecated due to internal API simplification and are no longer supported.Connection type
gatewaywas 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 |
|---|---|
Storage volume with its attributes. Returned: success |
|
Unique identifier for the volume. Returned: success Sample: |
|
CLPR (Control Logical Partition) ID. Returned: success Sample: |
|
Status of compression accelerator. Returned: success Sample: |
|
Cylinder number for mainframe volumes. Returned: success Sample: |
|
Data reduction process mode. Returned: success Sample: |
|
Progress percentage of deduplication and compression. Returned: success Sample: |
|
Status of deduplication and compression. Returned: success Sample: |
|
Mode of deduplication and compression. Returned: success Sample: |
|
Emulation type of the volume. Returned: success Sample: |
|
List of host groups associated with the volume. Returned: success Sample: |
|
Indicates if ALUA is enabled. Returned: success Sample: |
|
Indicates if the volume is a command device. Returned: success |
|
Whether compression accelerator is enabled. Returned: success Sample: |
|
Indicates if data reduction share is enabled. Returned: success Sample: |
|
Indicates if device group definition is enabled. Returned: success |
|
Indicates if encryption is enabled. Returned: success Sample: |
|
Indicates if full allocation is enabled. Returned: success Sample: |
|
Indicates if tier relocation is enabled. Returned: success |
|
Indicates if security is enabled. Returned: success |
|
Indicates if user authentication is enabled. Returned: success |
|
Indicates if write protection is enabled. Returned: success |
|
Indicates if write protection by key is enabled. Returned: success |
|
List of iSCSI targets associated with the volume. Returned: success Sample: |
|
Logical Device ID. Returned: success Sample: |
|
Logical Device ID in hexadecimal. Returned: success Sample: |
|
MP blade ID. Returned: success Sample: |
|
Name of the volume. Returned: success Sample: |
|
Number of ports associated with the volume. Returned: success Sample: |
|
List of NVMe subsystems associated with the volume. Returned: success Sample: |
|
Parent volume ID for snapshot volumes. Returned: success Sample: |
|
Parent volume ID in hexadecimal format. Returned: success Sample: |
|
Parity group ID. Returned: success Sample: |
|
Path count to the volume. Returned: success Sample: |
|
Pool ID where the volume resides. Returned: success Sample: |
|
List of ports associated with the volume. Returned: success Sample: |
|
Host group name. Returned: success Sample: |
|
Host group number. Returned: success Sample: |
|
Logical Unit Number. Returned: success Sample: |
|
Port identifier. Returned: success Sample: |
|
Provisioning type of the volume. Returned: success Sample: |
|
QoS settings for the volume. Returned: success |
|
Resource group ID of the volume. Returned: success Sample: |
|
List of snapshots associated with the volume. Returned: success Sample: |
|
Subsystem ID for mainframe volumes. Returned: success Sample: |
|
Current status of the volume. Returned: success Sample: |
|
Serial number of the storage system. Returned: success Sample: |
|
Tiering policy details. Returned: success Sample: |
|
Total capacity of the volume. Returned: success Sample: |
|
Total capacity of the volume in megabytes. Returned: success Sample: |
|
Used capacity of the volume. Returned: success Sample: |
|
Used capacity of the volume in megabytes. Returned: success Sample: |
|
Virtual Logical Device ID. Returned: success Sample: |
|
Virtual Logical Device ID in hexadecimal. Returned: success Sample: |