hitachivantara.vspone_block.vsp.hv_ldev module – Manages logical devices (LDEVs) on Hitachi VSP storage systems.
Note
This module is part of the hitachivantara.vspone_block collection (version 4.1.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
.
New in hitachivantara.vspone_block 3.0.0
Synopsis
This module allows for the creation, modification, or deletion of logical devices (LDEVs) on Hitachi VSP storage systems.
It supports operations such as creating a new LDEV, updating an existing LDEV, or deleting a LDEV.
For examples, go to URL https://github.com/hitachi-vantara/vspone-block-ansible/blob/main/playbooks/vsp_direct/ldev.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 the LDEV. |
|
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. |
|
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. |
|
The data reduction process mode of the capacity saving function. Valid values are: - “post_process” - Post-process mode. - “inline” - Inline mode. Choices:
|
|
Specify whether to create a data reduction shared volume. This value is set to true for Thin Image Advance. Choices:
|
|
The ending LDEV ID for the range of LDEVs to be created. This is used when creating multiple LDEVs. If not specified, only one LDEV will be created. |
|
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. |
|
Force delete. Delete the LDEV and removes the LDEV from hostgroups, iscsi targets or NVM subsystem namespace. Choices:
|
|
The format type of the volume. Valid values are: - “quick” - Quick formatting. - “normal” - Normal formatting, It may take time to finish the formatting process. Choices:
|
|
List of host nqns to add to or remove from the LDEV depending on the state value. |
|
Whether the ALUA (Asymmetric Logical Unit Access) is enabled for the LDEV. Choices:
|
|
Whether the compression accelerator of the capacity saving function is enabled. Choices:
|
|
Whether the LDEV is a full allocation volume. Choices:
|
|
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. Choices:
|
|
Specify whether to enable the tier relocation setting for the HDT volume. Choices:
|
|
ID of the LDEV (required for delete and update operations), for new it will assigned to this ldev if it’s free. |
|
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. |
|
Name of the LDEV (optional). If not given, it assigns the name of the LDEV to “smrha-<ldev_id>”. |
|
Specify whether the LDEV created will be part of an NVM subsystem. |
|
ID of the parity_group where the LDEV will be created. Options pool_id and parity_group_id are mutually exclusive. |
|
ID of the pool where the LDEV will be created. Options pool_id and parity_group_id are mutually exclusive. |
|
QoS settings for the LDEV. |
|
Lower alert allowable time. |
|
Lower IOPS limit. |
|
Lower transfer rate limit. |
|
Response alert allowable time. |
|
Response priority. |
|
Upper alert allowable time. |
|
Upper IOPS limit. |
|
Upper transfer rate limit. |
|
Whether to format the volume after creation or existing volume. Choices:
|
|
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. Choices:
|
|
It shreds an LDEV (basic volume) or DP volume. Overwrites the volume three times with dummy data. Choices:
|
|
Size of the LDEV. Can be specified in units such as GB, TB, or MB (e.g., ‘10GB’, ‘5TB’, ‘100MB’, 200). |
|
The starting LDEV ID for the range of LDEVs to be created. This is used when creating multiple LDEVs. If not specified, a free LDEV ID will be assigned. |
|
State of the NVM subsystems task. This is valid only when nvm_subsystem_name is specified.
Choices:
|
|
Specify which tier of the HDT pool will be prioritized when a new page is allocated. |
|
Tiering policy for the LDEV. |
|
Tier1 max, a value from 1 to 100. |
|
Tier1 min, a value from 1 to 100. |
|
Tier3 max, a value from 1 to 100. |
|
Tier3 min, a value from 1 to 100. |
|
Tier level, a value from 0 to 31. |
|
Specify the virtual LDEV id. |
|
The desired state of the LDEV. 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_id
andpartner_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 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 |
---|---|
Storage volumes with their attributes. Returned: success |
|
Unique identifier for the volume. 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 Sample: |
|
Indicates if data reduction share is enabled. Returned: success Sample: |
|
Indicates if device group definition is enabled. Returned: success Sample: |
|
Indicates if encryption is enabled. Returned: success Sample: |
|
Indicates if security is enabled. Returned: success Sample: |
|
Indicates if user authentication is enabled. Returned: success Sample: |
|
Indicates if the volume is write-protected. Returned: success Sample: |
|
Indicates if the volume is write-protected by key. Returned: success Sample: |
|
List of associated iSCSI targets. Returned: success Sample: |
|
Logical Device ID. Returned: success Sample: |
|
Logical Unit ID in hexadecimal format. Returned: success Sample: |
|
Name of the volume. Returned: success Sample: |
|
Number of ports associated with the volume. Returned: success Sample: |
|
List of associated NVM subsystems. Returned: success Sample: |
|
Parity group ID of the volume. Returned: success Sample: |
|
Number of paths to the volume. Returned: success Sample: |
|
Pool ID where the volume resides. Returned: success Sample: |
|
Provisioning type of the volume. Returned: success Sample: |
|
Quality of Service settings for the volume. Returned: success Sample: |
|
Resource group ID of the volume. Returned: success Sample: |
|
List of snapshots associated with the volume. Returned: success Sample: |
|
Current status of the volume. Returned: success Sample: |
|
Serial number of the storage system. Returned: success Sample: |
|
Tiering policy applied to the volume. 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: |