hitachivantara.vspone_block.vsp.hv_ldev module – Manages logical devices (LDEVs) on VSP block storage systems.
Note
This module is part of the hitachivantara.vspone_block collection (version 4.8.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_ldev.
New in hitachivantara.vspone_block 3.0.0
Synopsis
- This module allows for the creation, modification, or deletion of logical devices (LDEVs) on VSP block storage systems.
- It supports operations such as creating a new LDEV, updating an existing LDEV, or deleting a LDEV.
- To create multiple volumes/LDEVs in a single task on VSP One Block or VSP E Series storage systems, use `hv_vsp_one_volume` module for faster execution. See `hv_vsp_one_volume` module documentation for more information. For other volume/LDEV configurations not available in `hv_vsp_one_volume` module, use `hv_ldev` module.
- 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 |
|---|---|
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:
|
|
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 the LDEV. |
|
capacity_saving string |
Whether to enable the capacity saving functions. 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. Optional for the Create ldev with free ID and present to NVM System /Create LDEV within a range of LDEV IDs using parallel execution tasks. Required for the Create LDEV with capacity saving and data_reduction_share task. |
|
clpr_id integer |
The CLPR (Control Logical Partition) ID to which the LDEV will be assigned. This is used for specifying the CLPR for the LDEV. If not specified, the LDEV will be assigned to the default CLPR. Required for the Set CLPR id of a volume task. |
|
cylinder integer |
The cylinder number for the Mainframe LDEV. This is used for specifying the cylinder for the LDEV. |
|
data_reduction_process_mode string |
The data reduction process mode of the capacity saving function. Valid values are: - “post_process” - Post-process mode. - “inline” - Inline mode. Optional for the Change volume settings task. Choices:
|
|
boolean |
Specify whether to create a data reduction shared volume. This value is set to true for Thin Image Advance. Optional for the Create ldev with free ID and present to NVM System task. Required for the Create LDEV with capacity saving and data_reduction_share task. Choices:
|
|
emulation_type string |
The emulation type for the Mainframe LDEV. This is used for specifying the emulation type for the LDEV. Example values are 3390-A and 3390-V. |
|
external_parity_group string |
The external parity group ID to which the LDEV will be assigned. This is used for specifying the external parity group for the LDEV. If not specified, the LDEV will be assigned to the default parity group. Optional for the Create LDEV using external parity group and auto free LDEV ID selection task. |
|
force boolean |
Force delete. Delete the LDEV and removes the LDEV from hostgroups, iscsi targets or NVM subsystem namespace. Required for the Force delete LDEV removes the LDEV from hostgroups, iSCSI targets or NVM subsystem namespace task. Choices:
|
|
format_type string |
The format type of the volume. Valid values are: - “quick” - Quick formatting. - “normal” - Normal formatting, It may take time to finish the formatting process. Optional for the Format a volume task. Choices:
|
|
host_nqns list / elements=string |
List of host nqns to add to or remove from the LDEV depending on the state value. Required for the Create ldev with free ID and present to NVM System /Remove host NQNs from existing volume of NVM System tasks. Optional for the Present existing volume to NVM System task. |
|
is_alua_enabled boolean |
Whether the ALUA (Asymmetric Logical Unit Access) is enabled for the LDEV. Optional for the Change volume settings task. Choices:
|
|
is_compression_acceleration_enabled boolean |
Whether the compression accelerator of the capacity saving function is enabled. Optional for the Create LDEV within a range of LDEV IDs using parallel execution /Change volume settings tasks. Choices:
|
|
is_ese_volume boolean |
Whether the LDEV is an ESE (Enhanced Space Efficiency) volume. This is used for specifying if the LDEV is an ESE volume. Choices:
|
|
is_full_allocation_enabled boolean |
Whether the LDEV is a full allocation volume. Optional for the Change volume settings task. Choices:
|
|
is_parallel_execution_enabled boolean |
Whether to enable parallel execution for the LDEV operations. This is used to speed up the LDEV operations. If set to true, it will enable parallel execution for the LDEV operations. Required for the Create LDEV within a range of LDEV IDs using parallel execution task. Choices:
|
|
is_relocation_enabled boolean |
Specify whether to enable the tier relocation setting for the HDT volume. Required for the Create new volume with tiering policy task. Optional for the Change volume settings task. Choices:
|
|
is_tse_volume boolean |
Whether the LDEV is a TSE (Thin Provisioning with Space Efficiency) volume. This is used for specifying if the LDEV is a TSE volume. Choices:
|
|
ldev_id string |
ID of the LDEV (required for delete and update operations), for new it will assigned to this ldev if it’s free. Can be decimal or hexadecimal. Required for the Create LDEV with a specific LDEV ID /Present existing volume to NVM System /Expand the size of LDEV /Remove host NQNs from existing volume of NVM System /Delete LDEV /Force delete LDEV removes the LDEV from hostgroups, iSCSI targets or NVM subsystem namespace /Shredding an existing volume /Shredding an existing volume before deleting /Configuring QoS settings for an existing volume /Assign virtual LDEV Id for a volume /Unassign virtual LDEV Id for a volume /Set MP blade ID of a volume /Set CLPR id of a volume /Reclaiming zero pages of a DP volume /Format a volume /Change volume settings tasks. |
|
mp_blade_id integer |
The MP blade ID to which the LDEV will be assigned. This is used for specifying the MP blade for the LDEV. If not specified, the LDEV will be assigned to the default MP blade. Optional for the Set MP blade ID of a volume task. |
|
name string |
Name of the LDEV (optional). If not given, it assigns the name of the LDEV to “smrha-<ldev_id>”. Optional for the Create ldev with free ID and present to NVM System /Create LDEV within a range of LDEV IDs using parallel execution /Create LDEV using a parity group and auto-free LDEV ID selection /Create LDEV using external parity group and auto free LDEV ID selection tasks. |
|
nvm_subsystem_name string |
Specify whether the LDEV created will be part of an NVM subsystem. Required for the Create ldev with free ID and present to NVM System /Present existing volume to NVM System /Remove host NQNs from existing volume of NVM System tasks. |
|
parity_group_id aliases: parity_group string |
ID of the parity_group where the LDEV will be created. Options pool_id and parity_group_id are mutually exclusive. Required for the Create LDEV using a parity group and auto-free LDEV ID selection task. |
|
pool_id integer |
ID of the pool where the LDEV will be created. Options pool_id and parity_group_id are mutually exclusive. Required for the Create LDEV with a specific LDEV ID /Create ldev with free ID and present to NVM System /Create LDEV within a range of LDEV IDs using parallel execution /Create LDEV with capacity saving and data_reduction_share /Configuring QoS settings for a new volume /Create new volume with tiering policy /Create new volume with virtual ldev tasks. |
|
qos_settings dictionary |
QoS settings for the LDEV. Required for the Configuring QoS settings for an existing volume /Configuring QoS settings for a new volume tasks. |
|
lower_alert_allowable_time integer |
Lower alert allowable time. Optional for the Configuring QoS settings for an existing volume /Configuring QoS settings for a new volume tasks. |
|
lower_iops integer |
Lower IOPS limit. Optional for the Configuring QoS settings for an existing volume /Configuring QoS settings for a new volume tasks. |
|
lower_transfer_rate integer |
Lower transfer rate limit. Optional for the Configuring QoS settings for an existing volume /Configuring QoS settings for a new volume tasks. |
|
response_alert_allowable_time integer |
Response alert allowable time. Optional for the Configuring QoS settings for an existing volume /Configuring QoS settings for a new volume tassk. |
|
response_priority integer |
Response priority. Optional for the Configuring QoS settings for an existing volume /Configuring QoS settings for a new volume tasks. |
|
upper_alert_allowable_time integer |
Upper alert allowable time. Optional for the Configuring QoS settings for an existing volume /Configuring QoS settings for a new volume tasks. |
|
upper_iops integer |
Upper IOPS limit. Optional for the Configuring QoS settings for an existing volume /Configuring QoS settings for a new volume tasks. |
|
upper_transfer_rate integer |
Upper transfer rate limit. Optional for the Configuring QoS settings for an existing volume /Configuring QoS settings for a new volume tasks. |
|
resource_group_id integer |
The resource group ID for the LDEV. This is used for specifying the resource group for the LDEV. |
|
should_format_volume boolean |
Whether to format the volume after creation or existing volume. Required for the Format a volume task. Choices:
|
|
should_reclaim_zero_pages boolean |
Whether to reclaim zero pages of a DP volume. This is used to reclaim space in a DP volume. If set to true, it will reclaim the zero pages of the DP volume. Required for the Reclaiming zero pages of a DP volume task. Choices:
|
|
should_shred_volume_enable boolean |
It shreds an LDEV (basic volume) or DP volume. Overwrites the volume three times with dummy data. Required for the Shredding an existing volume /Shredding an existing volume before deleting task. Choices:
|
|
should_stop_all_volume_format boolean |
Whether to stop all volume format operations. This is used to stop ongoing volume format tasks. If set to true, it will stop all volume format operations. Optional for stopping all volume format operations. Choices:
|
|
size string |
Size of the LDEV. Can be specified in units such as GB, TB, or MB (e.g., ‘10GB’, ‘5TB’, ‘100MB’, 200). Required for the Create LDEV with a specific LDEV ID /Create ldev with free ID and present to NVM System /Create LDEV within a range of LDEV IDs using parallel execution /Expand the size of LDEV /Create LDEV using a parity group and auto-free LDEV ID selection /Create LDEV using external parity group and auto free LDEV ID selection /Create LDEV with capacity saving and data_reduction_share /Configuring QoS settings for a new volume /Create new volume with tiering policy /Create new volume with virtual ldev tasks. |
|
ssid string |
The SSID (Subsystem ID) for the Mainframe LDEV. This is used for specifying the SSID for the LDEV. if not specified, the default SSID will be used. if specified, it will use the specified ssid if ssid id is not assigned It will use the existing SSID of the free LDEV if ssid is already assigned to any LDEV. |
|
state string |
State of the NVM subsystems task. This is valid only when nvm_subsystem_name is specified.
Optional for the Create ldev with free ID and present to NVM System task. Choices:
|
|
tier_level_for_new_page_allocation string |
Specify which tier of the HDT pool will be prioritized when a new page is allocated. Required for the Create new volume with tiering policy task. |
|
tiering_policy dictionary |
Tiering policy for the LDEV. Required for the Create new volume with tiering policy task. |
|
tier1_allocation_rate_max integer |
Tier1 max, a value from 1 to 100. Optional for the Create new volume with tiering policy task. |
|
tier1_allocation_rate_min integer |
Tier1 min, a value from 1 to 100. Optional for the Create new volume with tiering policy task. |
|
tier3_allocation_rate_max integer |
Tier3 max, a value from 1 to 100. Optional for the Create new volume with tiering policy task. |
|
tier3_allocation_rate_min integer |
Tier3 min, a value from 1 to 100. Optional for the Create new volume with tiering policy task. |
|
tier_level integer |
Tier level, a value from 0 to 31. Optional for the Create new volume with tiering policy task. |
|
vldev_id string |
Specify the virtual LDEV id. Specify -1 if you want to unassign the vldev_id. Can be decimal or hexadecimal. Required for the Create new volume with virtual ldev /Assign virtual LDEV Id for a volume /Unassign virtual LDEV Id for a volume tasks. |
state string | The desired state of the LDEV. Choices:
|
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_idandpartner_idwere removed in version 3.4.0. They were also deprecated due to internal API simplification and are no longer supported. - The input parameter
parity_groupwill be removed in version 5.0.0. It is recommended to useparity_group_idinstead, which provides the same functionality. - Connection type
gatewaywas removed starting from version 3.4.0. Please use an earlier version if you require this connection type.
Examples
- name: Create ldev with free id and present to NVM System
hitachivantara.vspone_block.vsp.hv_ldev:
state: present
connection_info:
address: storage.company.com
username: "admin"
password: "passw0rd"
spec:
pool_id: 1
size: "10GB"
name: "New_LDEV"
capacity_saving: "compression_deduplication"
data_reduction_share: true
state: "add_host_nqn"
nvm_subsystem_name: "nvm_subsystem_01"
host_nqns: ["nqn.2014-08.org.example:uuid:4b73e622-ddc1-449a-99f7-412c0d3baa39"]
- name: Present existing volume to NVM System
hitachivantara.vspone_block.vsp.hv_ldev:
state: present
connection_info:
address: storage.company.com
username: "admin"
password: "passw0rd"
spec:
ldev_id: 1
state: "add_host_nqn"
nvm_subsystem_name: "nvm_subsystem_01"
host_nqns: ["nqn.2014-08.org.example:uuid:4b73e622-ddc1-449a-99f7-412c0d3baa39"]
- name: Force delete ldev removes the ldev from hostgroups, iscsi targets or NVMe subsystem namespace
hitachivantara.vspone_block.vsp.hv_ldev:
state: absent
connection_info:
address: storage.company.com
username: "admin"
password: "passw0rd"
spec:
ldev_id: 123
force: true
- name: Update the qos settings for an existing LDEV
hitachivantara.vspone_block.vsp.hv_ldev:
state: absent
connection_info:
address: storage.company.com
username: "admin"
password: "passw0rd"
spec:
ldev_id: 123
qos_settings:
upper_iops: 1000
lower_iops: 500
upper_transfer_rate: 1000
lower_transfer_rate: 500
upper_alert_allowable_time: 1000
lower_alert_allowable_time: 500
response_priority: 1000
response_alert_allowable_time: 1000
- name: Set MP blade id of a volume.
hitachivantara.vspone_block.vsp.hv_ldev:
connection_info:
address: storage.company.com
username: "admin"
password: "passw0rd"
state: "present"
spec:
ldev_id: 11
mp_blade_id: 1
- name: Set CLPR ID of a volume.
hitachivantara.vspone_block.vsp.hv_ldev:
connection_info:
address: storage.company.com
username: "admin"
password: "passw0rd"
state: "present"
spec:
ldev_id: 11
clpr_id: 1
- name: Reclaiming zero pages of a DP volume.
hitachivantara.vspone_block.vsp.hv_ldev:
connection_info:
address: storage.company.com
username: "admin"
password: "passw0rd"
state: "present"
spec:
ldev_id: 12
should_reclaim_zero_pages: true
- name: Format a volume.
hitachivantara.vspone_block.vsp.hv_ldev:
connection_info:
address: storage.company.com
username: "admin"
password: "passw0rd"
state: "present"
spec:
ldev_id: 12
should_format_volume: true
- name: Change volume settings.
hitachivantara.vspone_block.vsp.hv_ldev:
connection_info:
address: storage.company.com
username: "admin"
password: "passw0rd"
state: "present"
spec:
ldev_id: 12
is_alua_enabled: true
is_full_allocation_enabled: true
is_compression_acceleration_enabled: true
is_relocation_enabled: true
data_reduction_process_mode: "inline"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
volume dictionary | Storage volume with its attributes. Returned: success |
|
canonical_name string |
Unique identifier for the volume. Returned: success Sample: |
|
clpr_id integer |
CLPR (Control Logical Partition) ID. Returned: success Sample: |
|
compression_acceleration_status string |
Status of compression accelerator. Returned: success Sample: |
|
cylinder integer |
Cylinder number for mainframe volumes. Returned: success Sample: |
|
data_reduction_process_mode string |
Data reduction process mode. Returned: success Sample: |
|
dedup_compression_progress integer |
Progress percentage of deduplication and compression. Returned: success Sample: |
|
dedup_compression_status string |
Status of deduplication and compression. Returned: success Sample: |
|
deduplication_compression_mode string |
Mode of deduplication and compression. Returned: success Sample: |
|
emulation_type string |
Emulation type of the volume. Returned: success Sample: |
|
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: |
|
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: |
|
boolean |
Indicates if data reduction share is enabled. Returned: success Sample: |
|
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: |
|
is_full_allocation_enabled boolean |
Indicates if full allocation is enabled. Returned: success Sample: |
|
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: |
|
ldev_id_hex string |
Logical Device ID in hexadecimal. Returned: success Sample: |
|
mp_blade_id integer |
MP blade ID. Returned: success Sample: |
|
name string |
Name of the volume. Returned: success Sample: |
|
num_of_ports integer |
Number of ports associated with the volume. Returned: success Sample: |
|
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: |
|
parent_volume_id_hex string |
Parent volume ID in hexadecimal format. Returned: success Sample: |
|
parity_group_id string |
Parity group ID. Returned: success Sample: |
|
path_count integer |
Path count to the volume. Returned: success Sample: |
|
pool_id integer |
Pool ID where the volume resides. Returned: success Sample: |
|
ports list / elements=dictionary |
List of ports associated with the volume. Returned: success Sample: |
|
host_group_name string |
Host group name. Returned: success Sample: |
|
host_group_number integer |
Host group number. Returned: success Sample: |
|
lun integer |
Logical Unit Number. Returned: success Sample: |
|
port_id string |
Port identifier. Returned: success Sample: |
|
provision_type string |
Provisioning type of the volume. Returned: success Sample: |
|
qos_settings dictionary |
QoS settings for the volume. Returned: success |
|
resource_group_id integer |
Resource group ID of the volume. Returned: success Sample: |
|
snapshots list / elements=dictionary |
List of snapshots associated with the volume. Returned: success Sample: |
|
ssid string |
Subsystem ID for mainframe volumes. Returned: success Sample: |
|
status string |
Current status of the volume. Returned: success Sample: |
|
storage_serial_number string |
Serial number of the storage system. Returned: success Sample: |
|
tiering_policy dictionary |
Tiering policy details. Returned: success Sample: |
|
total_capacity string |
Total capacity of the volume. Returned: success Sample: |
|
total_capacity_in_mb float |
Total capacity of the volume in megabytes. Returned: success Sample: |
|
used_capacity string |
Used capacity of the volume. Returned: success Sample: |
|
used_capacity_in_mb float |
Used capacity of the volume in megabytes. Returned: success Sample: |
|
virtual_ldev_id integer |
Virtual Logical Device ID. Returned: success Sample: |
|
virtual_ldev_id_hex string |
Virtual Logical Device ID in hexadecimal. Returned: success Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/hitachivantara/vspone_block/vsp.hv_ldev_module.html